diff --git a/Control/AthViews/CMakeLists.txt b/Control/AthViews/CMakeLists.txt index 8cfbffaab5b77b1237b32d2e7c621fab940f3d3b..594026fe12ec14d50f6e3dd822cb95b638dfa042 100644 --- a/Control/AthViews/CMakeLists.txt +++ b/Control/AthViews/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_library( AthViews src/*.cxx PUBLIC_HEADERS AthViews INCLUDE_DIRS ${TBB_INCLUDE_DIRS} - LINK_LIBRARIES ${TBB_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib TrigSteeringEvent ) + LINK_LIBRARIES ${TBB_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib TrigSteeringEvent SGTools ) atlas_add_component( AthViewsAlgs src/components/*.cxx diff --git a/Control/AthViews/src/SimpleView.cxx b/Control/AthViews/src/SimpleView.cxx index 5b2821f7055510d444da388c3eacc3433deeb4ef..9c232b98026abfc7b5c723a32bae6d5c010740f0 100644 --- a/Control/AthViews/src/SimpleView.cxx +++ b/Control/AthViews/src/SimpleView.cxx @@ -5,6 +5,7 @@ #include <stdexcept> #include "AthViews/SimpleView.h" #include "AthViews/View.h" +#include "SGTools/transientKey.h" SimpleView::SimpleView( std::string Name, bool AllowFallThrough, std::string const& storeName ) : m_store( storeName, Name ), @@ -25,7 +26,7 @@ SimpleView::~SimpleView() */ std::string SimpleView::viewKey (const std::string& key) const { - return m_name + "_" + key; + return SG::transientKey (m_name + "_" + key); } diff --git a/Control/AthViews/test/ViewCollectionMerge_test.cxx b/Control/AthViews/test/ViewCollectionMerge_test.cxx index 87b69137572312ff7e06cac63fa42eef9ff54d94..cb23953eff99669ec293348e9e52a9dbeb4908d3 100644 --- a/Control/AthViews/test/ViewCollectionMerge_test.cxx +++ b/Control/AthViews/test/ViewCollectionMerge_test.cxx @@ -477,7 +477,7 @@ TEST_F( ViewCollectionMerge_test, elementLinkViewRemapTest ) { ASSERT_TRUE( outputDataHandle2.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_" + DATA_NAME, "testView_" + DATA_NAME + "2", 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "_testView_" + DATA_NAME, "_testView_" + DATA_NAME + "2", 0 ); // Test the link again - should not have changed ASSERT_TRUE( dataLink.isValid() ); @@ -566,8 +566,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapTest ) { ASSERT_TRUE( outputDataHandle.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_1_" + DATA_NAME, DATA_NAME, 0 ); - evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "testView_2_" + DATA_NAME, DATA_NAME, 1 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "_testView_1_" + DATA_NAME, DATA_NAME, 0 ); + evtStore()->remap( ClassID_traits< DataVector< int > >::ID(), "_testView_2_" + DATA_NAME, DATA_NAME, 1 ); // Element link should still be pointing to view container ASSERT_TRUE( dataLink.isValid() ); @@ -665,8 +665,8 @@ TEST_F( ViewCollectionMerge_test, elementLinkMergeRemapBookkeepTest ) { ASSERT_TRUE( auxHandle.isValid() ); // Declare remapping - pretty hacky, have to specify view object names explicitly - evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView_1_" + DATA_NAME, DATA_NAME, 0 ); - evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "testView_2_" + DATA_NAME, DATA_NAME, 1 ); + evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "_testView_1_" + DATA_NAME, DATA_NAME, 0 ); + evtStore()->remap( ClassID_traits< DataVector< DummyData > >::ID(), "_testView_2_" + DATA_NAME, DATA_NAME, 1 ); // Element link should still be pointing to view container ASSERT_TRUE( dataLink.isValid() );