From 45410b0f4048626ae4018d011d276f922a92b096 Mon Sep 17 00:00:00 2001 From: scott snyder Date: Thu, 14 Apr 2022 12:19:51 -0400 Subject: [PATCH] TileTPCnv: Enable thread-safety checking. Enable thread-safety checking and fix warnings. --- .../TileTPCnv/ATLAS_CHECK_THREAD_SAFETY | 1 + .../test/TileBeamElemCnv_p1_test.cxx | 6 ++--- .../test/TileBeamElemContainerCnv_p1_test.cxx | 25 +++++++++-------- .../test/TileCosmicMuonCnv_p1_test.cxx | 9 +++---- .../test/TileCosmicMuonCnv_p2_test.cxx | 9 +++---- .../TileTPCnv/test/TileDigitsCnv_p1_test.cxx | 6 ++--- .../TileTPCnv/test/TileDigitsCnv_p2_test.cxx | 6 ++--- .../TileTPCnv/test/TileDigitsCnv_p3_test.cxx | 6 ++--- .../test/TileDigitsContainerCnv_p1_test.cxx | 25 +++++++++-------- .../test/TileDigitsContainerCnv_p2_test.cxx | 25 +++++++++-------- .../test/TileDigitsContainerCnv_p3_test.cxx | 25 +++++++++-------- .../test/TileHitContainerCnv_p1_test.cxx | 27 +++++++++---------- .../test/TileRawChannelCnv_p1_test.cxx | 6 ++--- .../TileRawChannelContainerCnv_p1_test.cxx | 25 +++++++++-------- .../test/TileTTL1CellCnv_p1_test.cxx | 9 +++---- .../TileTPCnv/test/TileTTL1Cnv_p1_test.cxx | 9 +++---- 16 files changed, 105 insertions(+), 114 deletions(-) create mode 100644 TileCalorimeter/TileSvc/TileTPCnv/TileTPCnv/ATLAS_CHECK_THREAD_SAFETY diff --git a/TileCalorimeter/TileSvc/TileTPCnv/TileTPCnv/ATLAS_CHECK_THREAD_SAFETY b/TileCalorimeter/TileSvc/TileTPCnv/TileTPCnv/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 00000000000..3990f26715b --- /dev/null +++ b/TileCalorimeter/TileSvc/TileTPCnv/TileTPCnv/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +TileCalorimeter/TileSvc/TileTPCnv diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemCnv_p1_test.cxx index a97de3c5daf..81d21d86004 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileBeamElemCnv_p1_test.cxx @@ -66,7 +66,7 @@ void testit (const TileBeamElem& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -78,7 +78,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { IdDictParser parser; TileCablingSvc::init_idhelpers(parser); diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemContainerCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemContainerCnv_p1_test.cxx index 7a6e49a8954..24d15daa634 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemContainerCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileBeamElemContainerCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileBeamElemContainerCnv_p1_test.cxx @@ -22,15 +22,10 @@ #include -TileHWID hwid; -TileTBID tbid; -TileID tileid; - class TileCablingSvc { public: - static - void init_idhelpers ATLAS_NOT_THREAD_SAFE (IdDictParser& parser) + TileCablingSvc (IdDictParser& parser) ATLAS_NOT_THREAD_SAFE { tileid.set_do_neighbours (false); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); @@ -45,6 +40,10 @@ public: svc->setTileTBID (&tbid); svc->setTileID (&tileid); } + + TileHWID hwid; + TileTBID tbid; + TileID tileid; }; @@ -106,7 +105,7 @@ void testit (const TileBeamElemContainer& trans1) std::unique_ptr -makecont() +makecont (const TileID& tileid) { auto cont = std::make_unique (false, TileFragHash::Default, @@ -158,22 +157,22 @@ makecont() } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE (const TileID& tileid) { std::cout << "test1\n"; Athena_test::Leakcheck check; - std::unique_ptr trans1 = makecont(); + std::unique_ptr trans1 = makecont (tileid); testit (*trans1); } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "TileTPCnv/TileBeamElemContainerCnv_p1_test\n"; IdDictParser parser; - TileCablingSvc::init_idhelpers(parser); - test1(); + TileCablingSvc helpers(parser); + test1 (helpers.tileid); return 0; } diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p1_test.cxx index 8b4f74fefb8..06914c2501a 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p1_test.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file TileTPCnv/test/TileCosmicMuonCnv_p1_test.cxx * @author scott snyder @@ -15,6 +13,7 @@ #include "TileTPCnv/TileCosmicMuonCnv_p1.h" #include "TestTools/initGaudi.h" #include "TestTools/leakcheck.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/MsgStream.h" #include #include @@ -60,7 +59,7 @@ void testit (const TileCosmicMuon& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -91,7 +90,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { test1(); return 0; diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p2_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p2_test.cxx index 185be4011a3..db37783cf49 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p2_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileCosmicMuonCnv_p2_test.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file TileTPCnv/test/TileCosmicMuonCnv_p2_test.cxx * @author scott snyder @@ -15,6 +13,7 @@ #include "TileTPCnv/TileCosmicMuonCnv_p2.h" #include "TestTools/initGaudi.h" #include "TestTools/leakcheck.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/MsgStream.h" #include #include @@ -66,7 +65,7 @@ void testit (const TileCosmicMuon& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -97,7 +96,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { test1(); return 0; diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p1_test.cxx index 8b8bb51fa7f..e4b93b0d209 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileDigitsCnv_p1_test.cxx @@ -66,7 +66,7 @@ void testit (const TileDigits& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -78,7 +78,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { IdDictParser parser; TileCablingSvc::init_idhelpers(parser); diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p2_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p2_test.cxx index 7aa0ec10cf2..7771053bf50 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p2_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p2_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileDigitsCnv_p2_test.cxx @@ -66,7 +66,7 @@ void testit (const TileDigits& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -78,7 +78,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { IdDictParser parser; TileCablingSvc::init_idhelpers(parser); diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p3_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p3_test.cxx index a4193a53101..659bc525175 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p3_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsCnv_p3_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileDigitsCnv_p3_test.cxx @@ -66,7 +66,7 @@ void testit (const TileDigits& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -78,7 +78,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { IdDictParser parser; TileCablingSvc::init_idhelpers(parser); diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p1_test.cxx index c35725df09a..28b791c484b 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileDigitsContainerCnv_p1_test.cxx @@ -22,15 +22,10 @@ #include -TileHWID hwid; -TileTBID tbid; -TileID tileid; - class TileCablingSvc { public: - static - void init_idhelpers ATLAS_NOT_THREAD_SAFE (IdDictParser& parser) + TileCablingSvc (IdDictParser& parser) ATLAS_NOT_THREAD_SAFE { tileid.set_do_neighbours (false); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); @@ -45,6 +40,10 @@ public: svc->setTileTBID (&tbid); svc->setTileID (&tileid); } + + TileHWID hwid; + TileTBID tbid; + TileID tileid; }; @@ -106,7 +105,7 @@ void testit (const TileDigitsContainer& trans1) std::unique_ptr -makecont() +makecont (const TileID& tileid) { auto cont = std::make_unique (false, TileFragHash::Default, @@ -158,22 +157,22 @@ makecont() } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE (const TileID& tileid) { std::cout << "test1\n"; Athena_test::Leakcheck check; - std::unique_ptr trans1 = makecont(); + std::unique_ptr trans1 = makecont (tileid); testit (*trans1); } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "TileTPCnv/TileDigitsContainerCnv_p1_test\n"; IdDictParser parser; - TileCablingSvc::init_idhelpers(parser); - test1(); + TileCablingSvc helpers(parser); + test1 (helpers.tileid); return 0; } diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p2_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p2_test.cxx index fe71a508998..0995b6d960a 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p2_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p2_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileDigitsContainerCnv_p2_test.cxx @@ -22,15 +22,10 @@ #include -TileHWID hwid; -TileTBID tbid; -TileID tileid; - class TileCablingSvc { public: - static - void init_idhelpers ATLAS_NOT_THREAD_SAFE (IdDictParser& parser) + TileCablingSvc (IdDictParser& parser) ATLAS_NOT_THREAD_SAFE { tileid.set_do_neighbours (false); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); @@ -45,6 +40,10 @@ public: svc->setTileTBID (&tbid); svc->setTileID (&tileid); } + + TileHWID hwid; + TileTBID tbid; + TileID tileid; }; @@ -106,7 +105,7 @@ void testit (const TileDigitsContainer& trans1) std::unique_ptr -makecont() +makecont (const TileID& tileid) { auto cont = std::make_unique (false, TileFragHash::Default, @@ -159,22 +158,22 @@ makecont() } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE (const TileID& tileid) { std::cout << "test1\n"; Athena_test::Leakcheck check; - std::unique_ptr trans1 = makecont(); + std::unique_ptr trans1 = makecont (tileid); testit (*trans1); } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "TileTPCnv/TileDigitsContainerCnv_p2_test\n"; IdDictParser parser; - TileCablingSvc::init_idhelpers(parser); - test1(); + TileCablingSvc helpers(parser); + test1 (helpers.tileid); return 0; } diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p3_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p3_test.cxx index 052d7a16f4a..d5e0dcd0127 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p3_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileDigitsContainerCnv_p3_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileDigitsContainerCnv_p3_test.cxx @@ -22,15 +22,10 @@ #include -TileHWID hwid; -TileTBID tbid; -TileID tileid; - class TileCablingSvc { public: - static - void init_idhelpers ATLAS_NOT_THREAD_SAFE (IdDictParser& parser) + TileCablingSvc (IdDictParser& parser) ATLAS_NOT_THREAD_SAFE { tileid.set_do_neighbours (false); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); @@ -45,6 +40,10 @@ public: svc->setTileTBID (&tbid); svc->setTileID (&tileid); } + + TileHWID hwid; + TileTBID tbid; + TileID tileid; }; @@ -106,7 +105,7 @@ void testit (const TileDigitsContainer& trans1) std::unique_ptr -makecont() +makecont (const TileID& tileid) { auto cont = std::make_unique (false, TileFragHash::Default, @@ -158,22 +157,22 @@ makecont() } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE (const TileID& tileid) { std::cout << "test1\n"; Athena_test::Leakcheck check; - std::unique_ptr trans1 = makecont(); + std::unique_ptr trans1 = makecont (tileid); testit (*trans1); } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "TileTPCnv/TileDigitsContainerCnv_p3_test\n"; IdDictParser parser; - TileCablingSvc::init_idhelpers(parser); - test1(); + TileCablingSvc helpers(parser); + test1 (helpers.tileid); return 0; } diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileHitContainerCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileHitContainerCnv_p1_test.cxx index 1fa0e40b303..cd4c910ec8f 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileHitContainerCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileHitContainerCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileHitContainerCnv_p1_test.cxx @@ -22,16 +22,10 @@ #include -TileHWID hwid; -TileTBID tbid; -TileID tileid; -IdDictParser parser; - class TileCablingSvc { public: - static - void init_idhelpers ATLAS_NOT_THREAD_SAFE () + TileCablingSvc (IdDictParser& parser) ATLAS_NOT_THREAD_SAFE { tileid.set_do_neighbours (false); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); @@ -46,6 +40,10 @@ public: svc->setTileTBID (&tbid); svc->setTileID (&tileid); } + + TileHWID hwid; + TileTBID tbid; + TileID tileid; }; @@ -111,7 +109,7 @@ void testit (const TileHitContainer& trans1) std::unique_ptr -makecont() +makecont (const TileID& tileid) { auto cont = std::make_unique (false, TileFragHash::Default, @@ -160,21 +158,22 @@ makecont() } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE (const TileID& tileid) { std::cout << "test1\n"; Athena_test::Leakcheck check; - std::unique_ptr trans1 = makecont(); + std::unique_ptr trans1 = makecont (tileid); testit (*trans1); } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "TileTPCnv/TileHitContainerCnv_p1_test\n"; - TileCablingSvc::init_idhelpers(); - test1(); + IdDictParser parser; + TileCablingSvc helpers(parser); + test1 (helpers.tileid); return 0; } diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelCnv_p1_test.cxx index 61ed07caca2..2529f56f1b5 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileRawChannelCnv_p1_test.cxx @@ -76,7 +76,7 @@ void testit (const TileRawChannel& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -91,7 +91,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { IdDictParser parser; TileCablingSvc::init_idhelpers(parser); diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelContainerCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelContainerCnv_p1_test.cxx index b7a96568920..e0e3684efc5 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelContainerCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileRawChannelContainerCnv_p1_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ /** * @file TileTPCnv/test/TileRawChannelContainerCnv_p1_test.cxx @@ -22,15 +22,10 @@ #include -TileHWID hwid; -TileTBID tbid; -TileID tileid; - class TileCablingSvc { public: - static - void init_idhelpers ATLAS_NOT_THREAD_SAFE (IdDictParser& parser) + TileCablingSvc (IdDictParser& parser) ATLAS_NOT_THREAD_SAFE { tileid.set_do_neighbours (false); IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml"); @@ -45,6 +40,10 @@ public: svc->setTileTBID (&tbid); svc->setTileID (&tileid); } + + TileHWID hwid; + TileTBID tbid; + TileID tileid; }; @@ -116,7 +115,7 @@ void testit (const TileRawChannelContainer& trans1) std::unique_ptr -makecont() +makecont (const TileID& tileid) { auto cont = std::make_unique (false, TileFragHash::Default, @@ -168,22 +167,22 @@ makecont() } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE (const TileID& tileid) { std::cout << "test1\n"; Athena_test::Leakcheck check; - std::unique_ptr trans1 = makecont(); + std::unique_ptr trans1 = makecont (tileid); testit (*trans1); } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "TileTPCnv/TileRawChannelContainerCnv_p1_test\n"; IdDictParser parser; - TileCablingSvc::init_idhelpers(parser); - test1(); + TileCablingSvc helpers(parser); + test1 (helpers.tileid); return 0; } diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1CellCnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1CellCnv_p1_test.cxx index 702c3e9054f..e082dd4ac31 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1CellCnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1CellCnv_p1_test.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file TileTPCnv/test/TileTTL1CellCnv_p1_test.cxx * @author scott snyder @@ -15,6 +13,7 @@ #include "TileTPCnv/TileTTL1CellCnv_p1.h" #include "TestTools/initGaudi.h" #include "TestTools/leakcheck.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/MsgStream.h" #include #include @@ -45,7 +44,7 @@ void testit (const TileTTL1Cell& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -55,7 +54,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { test1(); return 0; diff --git a/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1Cnv_p1_test.cxx b/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1Cnv_p1_test.cxx index 1fb11937d02..088d0aed9aa 100644 --- a/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1Cnv_p1_test.cxx +++ b/TileCalorimeter/TileSvc/TileTPCnv/test/TileTTL1Cnv_p1_test.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file TileTPCnv/test/TileTTL1Cnv_p1_test.cxx * @author scott snyder @@ -15,6 +13,7 @@ #include "TileTPCnv/TileTTL1Cnv_p1.h" #include "TestTools/initGaudi.h" #include "TestTools/leakcheck.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/MsgStream.h" #include #include @@ -42,7 +41,7 @@ void testit (const TileTTL1& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -52,7 +51,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { test1(); return 0; -- GitLab