diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/ATLAS_CHECK_THREAD_SAFETY b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..c8ff8d467f2e467acb2dfbe0483c978732a432e8 --- /dev/null +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Database/AthenaPOOL/AthenaPoolCnvSvc diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.h index 5c9b1cc2eba2541f845076d11fb80f68d1d42024..915b733626a7ca545fa30b33833566f04275013d 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.h +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAPOOLCNVSVC_T_ATHENAPOOLCOOLMULTCHANCNV_H @@ -59,7 +59,8 @@ protected: /// @param obj [IN] pointer to the collection of objects. /// @param attrListColl [OUT] CondAttrListCollection filled with tokens /// @param token [OUT] Token from writing out CondMultChanCollImpl - StatusCode objectToAttrListColl(COLL_T* obj, IOpaqueAddress*& pAddr, + StatusCode objectToAttrListColl ATLAS_NOT_THREAD_SAFE + (COLL_T* obj, IOpaqueAddress*& pAddr, CondAttrListCollection*& attrListColl, Token*& token); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc index 67c716be95e24d1554db581b359790209db95b0e..a10b205d7945216008a2edc26c578947d64ccfbd 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCoolMultChanCnv.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @file T_AthenaPoolCoolMultChanCnv.icc @@ -23,6 +23,8 @@ #include "AthenaKernel/CLASS_DEF.h" #include "AthenaKernel/StorableConversions.h" +#include "CxxUtils/checker_macros.h" + #include <exception> #include <string> @@ -111,9 +113,10 @@ StatusCode T_AthenaPoolCoolMultChanCnv<COLL_T, ELEM_T, ELEM_P>::createObj(IOpaqu //__________________________________________________________________________ template <class COLL_T, class ELEM_T, class ELEM_P> StatusCode -T_AthenaPoolCoolMultChanCnv<COLL_T, ELEM_T, ELEM_P>::objectToAttrListColl(COLL_T* obj, IOpaqueAddress*& pAddr, - CondAttrListCollection*& attrListColl, - Token*& implToken) +T_AthenaPoolCoolMultChanCnv<COLL_T, ELEM_T, ELEM_P>::objectToAttrListColl ATLAS_NOT_THREAD_SAFE + (COLL_T* obj, IOpaqueAddress*& pAddr, + CondAttrListCollection*& attrListColl, + Token*& implToken) { ATH_MSG_DEBUG("Creating a CondAttrListCollection from a collection"); @@ -209,7 +212,8 @@ StatusCode T_AthenaPoolCoolMultChanCnv<COLL_T, ELEM_T, ELEM_P>::createRep(DataOb } CondAttrListCollection* coll = 0; Token* token = 0; - StatusCode sc = objectToAttrListColl(obj, pAddr, coll, token); + // Ok, because it's just creating a new list. + StatusCode sc ATLAS_THREAD_SAFE = objectToAttrListColl(obj, pAddr, coll, token); if (sc != StatusCode::SUCCESS || !token) { ATH_MSG_ERROR("Unable to get objects and fill CondAttrListCollection with tokens"); return(StatusCode::FAILURE); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolViewVectorCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolViewVectorCnv.icc index f81a845fe7d39e9c1b9a73b10d7707601f59b3a8..55755fddca168312dd30aebf3812f3c7f956c6e6 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolViewVectorCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolViewVectorCnv.icc @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file AthenaPoolCnvSvc/T_AthenaPoolViewVectorCnv.icc * @author scott snyder <snyder@bnl.gov> @@ -146,7 +144,7 @@ T_AthenaPoolViewVectorCnv<DV>::createTransient NO_SANITIZE_UNDEFINED () // FIXME: To get rid of this @c const_cast, the converter interfaces // need to be changed to allow returning a const pointer // all the way back to StoreGate. - trans_t* vv = const_cast<trans_t*>(c.release()->asDataVector()); + trans_t* vv ATLAS_THREAD_SAFE = const_cast<trans_t*>(c.release()->asDataVector()); vv->clearPersistent(); return vv; } diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolCnvSvc/CMakeLists.txt index 8c29c9128235b0d8bc863357aa096408d247236f..c729d86f535411a300ce77048e975e310144d94c 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/CMakeLists.txt +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/CMakeLists.txt @@ -49,26 +49,22 @@ atlas_add_test( T_AthenaPoolCreateFuncs_test atlas_add_test( T_AthenaPoolViewVectorCnv_test SOURCES test/T_AthenaPoolViewVectorCnv_test.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools - ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools ) atlas_add_test( T_AthenaPoolxAODCnv_test SOURCES test/T_AthenaPoolxAODCnv_test.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools - ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools ) atlas_add_test( T_AthenaPoolAuxContainerCnv_test SOURCES test/T_AthenaPoolAuxContainerCnv_test.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools - ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools ) atlas_add_test( T_AthenaPoolTPCnvCnv_test SOURCES test/T_AthenaPoolTPCnvCnv_test.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools - ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib TestTools ) atlas_add_test( T_AuxContainerCopyTPCnv_test SOURCES test/T_AuxContainerCopyTPCnv_test.cxx @@ -77,4 +73,4 @@ atlas_add_test( T_AuxContainerCopyTPCnv_test # Install files from the package: atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) +atlas_install_joboptions( share/*.py share/*.txt ) diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvElt_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvElt_test.cxx index 37fd692d71c30c276e615faf13a88b53d090f69f..afd263e14af244f19e6766c969b825a411f58ea0 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvElt_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvElt_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** * @file AthenaPoolCnvSvc/test/TPCnvElt_test.cxx @@ -44,8 +44,8 @@ public: }; -std::string X_guid = "CAE53A87-64AD-4576-A203-1A4142E1E10F"; -std::string X_p1_guid = "6AD63B61-BE75-40FC-B0C6-DD3C7801D871"; +const std::string X_guid = "CAE53A87-64AD-4576-A203-1A4142E1E10F"; +const std::string X_p1_guid = "6AD63B61-BE75-40FC-B0C6-DD3C7801D871"; class TestConverter diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvList_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvList_test.cxx index 4788bcf513dceb14326d253943bdc2395c4db137..4a8fb3ea064b8a9f012f5bc9be36fe487df23094 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvList_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/TPCnvList_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** * @file AthenaPoolCnvSvc/test/TPCnvList_test.cxx @@ -65,9 +65,9 @@ public: }; -std::string X_guid = "CAE53A87-64AD-4576-A203-1A4142E1E10F"; -std::string X_p1_guid = "6AD63B61-BE75-40FC-B0C6-DD3C7801D871"; -std::string X_p2_guid = "0AAC9C99-726D-4CF4-B9F9-00B6674C57DD"; +const std::string X_guid = "CAE53A87-64AD-4576-A203-1A4142E1E10F"; +const std::string X_p1_guid = "6AD63B61-BE75-40FC-B0C6-DD3C7801D871"; +const std::string X_p2_guid = "0AAC9C99-726D-4CF4-B9F9-00B6674C57DD"; class TestConverter diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx index ca841566f1272b3437707c448581c583756a67cb..ff8d44c2bd68904ffebbf7cd6ab10c5a370e9789 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx @@ -35,8 +35,8 @@ using namespace AthenaPoolCnvSvcTest; -std::string YAuxCont_v1_guid = "BEE3C14E-149E-4366-9E24-8A32C419A3B4"; -std::string YAuxCont_v2_guid = "170BFEE4-F6B2-4AF4-919B-7EB3986656FA"; +const std::string YAuxCont_v1_guid = "BEE3C14E-149E-4366-9E24-8A32C419A3B4"; +const std::string YAuxCont_v2_guid = "170BFEE4-F6B2-4AF4-919B-7EB3986656FA"; class TestCnvSvc @@ -133,7 +133,9 @@ void test1_checkThinned (const YAuxCont_v2* pers, // Writing -void test1 (ISvcLocator* svcloc, TestCnvSvc& /*testsvc*/) +void test1 (ISvcLocator* svcloc, + SGTest::TestStore& store, + TestCnvSvc& /*testsvc*/) { std::cout << "test1\n"; const size_t N = 10; @@ -141,7 +143,7 @@ void test1 (ISvcLocator* svcloc, TestCnvSvc& /*testsvc*/) DataVector<Y_v2>* vec = new DataVector<Y_v2>; for (size_t i = 0; i < N; i++) vec->push_back (new Y_v2(i)); - SGTest::store.record (vec, "vec"); + store.record (vec, "vec"); T_AthenaPoolAuxContainerCnv<YAuxCont_v2, YAuxContCnv_v1> cnv (svcloc); assert (static_cast<AthenaPoolConverter&>(cnv).initialize().isSuccess()); @@ -157,7 +159,7 @@ void test1 (ISvcLocator* svcloc, TestCnvSvc& /*testsvc*/) x2[i] = i*2; l2[i] = Link_t ("vec", i); } - SGTest::store.record (trans2, "store"); + store.record (trans2, "store"); YAuxCont_v2* pers2a = cnv.createPersistentWithKey (trans2, "store"); assert (pers2a->size() == trans2->size()); @@ -170,11 +172,11 @@ void test1 (ISvcLocator* svcloc, TestCnvSvc& /*testsvc*/) } SG::sgkey_t sgkey_store = - SGTest::store.stringToKey ("store", - ClassID_traits<YAuxCont_v2>::ID()); + store.stringToKey ("store", + ClassID_traits<YAuxCont_v2>::ID()); SG::sgkey_t sgkey_vec = - SGTest::store.stringToKey ("vec", - ClassID_traits<DataVector<Y_v2> >::ID()); + store.stringToKey ("vec", + ClassID_traits<DataVector<Y_v2> >::ID()); SG::ThinningCache cache; SG::ThinningDecisionBase dec_store; @@ -291,9 +293,9 @@ void test2 (ISvcLocator* svcloc, TestCnvSvc& testsvc) int main() { CxxUtils::ubsan_suppress ([]() {TInterpreter::Instance(); }); - SGTest::initTestStore(); + std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore(); ISvcLocator* pSvcLoc = nullptr; - if (!Athena_test::initGaudi("test.txt", pSvcLoc)) { + if (!Athena_test::initGaudi("AthenaPoolCnvSvc/test.txt", pSvcLoc)) { std::cerr << "This test can not be run" << std::endl; return 0; } @@ -306,7 +308,7 @@ int main() gSystem->Load("libAthenaPoolCnvSvcTestDict"); - test1 (pSvcLoc, *svc); + test1 (pSvcLoc, *testStore, *svc); test2 (pSvcLoc, *svc); return 0; } diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx index 3b835aef78183e635dcd43c1d48ff97870b5df01..ac964f1fb8fe4281a87b7b9ca9c476a23819b139 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx * @author scott snyder <snyder@bnl.gov> @@ -30,9 +28,9 @@ using namespace AthenaPoolCnvSvcTest; -std::string XCont_guid = "6AEA6831-8777-4571-8595-95FFF40B171F"; -std::string XCont_p1_guid = "421C967C-CB57-4234-A33F-EBE4928036C2"; -std::string XCont_p2_guid = "F151C81D-869A-4585-8086-5F8835AB12E1"; +const std::string XCont_guid = "6AEA6831-8777-4571-8595-95FFF40B171F"; +const std::string XCont_p1_guid = "421C967C-CB57-4234-A33F-EBE4928036C2"; +const std::string XCont_p2_guid = "F151C81D-869A-4585-8086-5F8835AB12E1"; class TestCnvSvc @@ -209,13 +207,14 @@ void test2 (ISvcLocator* svcloc, TestCnvSvc& testsvc) int main() { CxxUtils::ubsan_suppress ([]() {TInterpreter::Instance(); }); - SGTest::initTestStore(); ISvcLocator* pSvcLoc = nullptr; - if (!Athena_test::initGaudi("test.txt", pSvcLoc)) { + if (!Athena_test::initGaudi("AthenaPoolCnvSvc/test.txt", pSvcLoc)) { std::cerr << "This test can not be run" << std::endl; return 0; } + std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore(); + TestCnvSvc* svc = new TestCnvSvc ("AthenaPoolCnvSvc", pSvcLoc); ISvcManager* mgr = dynamic_cast<ISvcManager*> (pSvcLoc); if (!mgr) std::abort(); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx index 3ca278d78692c16a578d96d2ba9b9fc825b8bd82..03d9e441712982d54c83594399a62cb27a11ed3b 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx @@ -1,8 +1,6 @@ /* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx * @author scott snyder <snyder@bnl.gov> @@ -34,10 +32,10 @@ using namespace AthenaPoolCnvSvcTest; -std::string YCont_v1_guid2 = "7E1826B9-3666-42B3-A2E7-C916BD10A5B8"; -std::string YCont_v2_guid2 = "80C19103-FE9B-4227-8E48-8C0DB468F892"; -std::string YCont_v1_guid = "C5454482-92F6-4EE5-BBAB-44B36D571942"; -std::string YCont_v2_guid = "CA993B46-C358-4F5E-9EE2-3693A8F3CDAF"; +const std::string YCont_v1_guid2 = "7E1826B9-3666-42B3-A2E7-C916BD10A5B8"; +const std::string YCont_v2_guid2 = "80C19103-FE9B-4227-8E48-8C0DB468F892"; +const std::string YCont_v1_guid = "C5454482-92F6-4EE5-BBAB-44B36D571942"; +const std::string YCont_v2_guid = "CA993B46-C358-4F5E-9EE2-3693A8F3CDAF"; class ViewVectorBaseTest @@ -121,11 +119,13 @@ public: }; -void test1 (ISvcLocator* svcloc, TestCnvSvc& testsvc, DataVector<Y_v2>& vec) +void test1 (ISvcLocator* svcloc, + SGTest::TestStore& store, + TestCnvSvc& testsvc, DataVector<Y_v2>& vec) { std::cout << "test1\n"; SG::sgkey_t sgkey = - SGTest::store.stringToKey ("vec", ClassID_traits<DataVector<Y_v2> >::ID()); + store.stringToKey ("vec", ClassID_traits<DataVector<Y_v2> >::ID()); T_AthenaPoolCnv<ViewVector<DataVector<Y_v2> > > cnv (svcloc); assert (cnv.initialize().isSuccess()); @@ -233,13 +233,13 @@ void test2 (ISvcLocator* svcloc, TestCnvSvc& testsvc, DataVector<Y_v2>& vec) } -DataVector<Y_v2>& makeVecs() +DataVector<Y_v2>& makeVecs (SGTest::TestStore& store) { auto vec = std::make_unique<DataVector<Y_v2> >(); for (size_t i = 0; i < 10; i++) vec->push_back (new Y_v2(i)); DataVector<Y_v2>& ret = *vec.get(); - SGTest::store.record (vec.release(), "vec"); + store.record (vec.release(), "vec"); return ret; } @@ -247,9 +247,9 @@ DataVector<Y_v2>& makeVecs() int main() { CxxUtils::ubsan_suppress ([]() {TInterpreter::Instance(); }); - SGTest::initTestStore(); + std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore(); ISvcLocator* pSvcLoc = nullptr; - if (!Athena_test::initGaudi("test.txt", pSvcLoc)) { + if (!Athena_test::initGaudi("AthenaPoolCnvSvc/test.txt", pSvcLoc)) { std::cerr << "This test can not be run" << std::endl; return 0; } @@ -261,8 +261,8 @@ int main() std::abort(); gSystem->Load("libAthenaPoolCnvSvcTestDict"); - DataVector<Y_v2>& vec = makeVecs(); - test1 (pSvcLoc, *svc, vec); + DataVector<Y_v2>& vec = makeVecs (*testStore); + test1 (pSvcLoc, *testStore, *svc, vec); test2 (pSvcLoc, *svc, vec); } diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx index 5499be0a14925482d341b15aa49ba022fdd3f567..8c85da607c8af48f46874f67383c92b98fd9929a 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** @@ -33,8 +33,8 @@ using namespace AthenaPoolCnvSvcTest; -std::string YCont_v1_guid = "05309E49-5567-4790-BE56-2E541E0B4B24"; -std::string YCont_v2_guid = "0CC6B32E-6C95-4B0E-B97A-9B9040A8A9BE"; +const std::string YCont_v1_guid = "05309E49-5567-4790-BE56-2E541E0B4B24"; +const std::string YCont_v2_guid = "0CC6B32E-6C95-4B0E-B97A-9B9040A8A9BE"; class TestCnvSvc @@ -198,13 +198,14 @@ void test2 (ISvcLocator* svcloc, TestCnvSvc& /*testsvc*/) int main() { CxxUtils::ubsan_suppress ([]() {TInterpreter::Instance(); }); - SGTest::initTestStore(); ISvcLocator* pSvcLoc = nullptr; - if (!Athena_test::initGaudi("test.txt", pSvcLoc)) { + if (!Athena_test::initGaudi("AthenaPoolCnvSvc/test.txt", pSvcLoc)) { std::cerr << "This test can not be run" << std::endl; return 0; } + std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore(); + TestCnvSvc* svc = new TestCnvSvc ("AthenaPoolCnvSvc", pSvcLoc); ISvcManager* mgr = dynamic_cast<ISvcManager*> (pSvcLoc); if (!mgr) std::abort();