diff --git a/Trigger/TrigT1/L1Common/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/L1Common/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..98169f72a7f63a241e27e3f334ef9f06aed98fc0 --- /dev/null +++ b/Trigger/TrigT1/L1Common/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/L1Common diff --git a/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..cef590503543f9f3ab13d2916ae0dba479cd2555 --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloCalibAthenaPool diff --git a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..84108d866a38ea17acf5434e4674aa33a55416a8 --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/TrigT1CaloCalibToolInterfaces/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloCalibToolInterfaces diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt index dea05e30876b4d07b4727f0cf3df81f56a26543e..5c9ff5adc62e1bc85886fef65665c9acba755939 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_library( TrigT1CaloCalibToolsLib src/*.cxx PUBLIC_HEADERS TrigT1CaloCalibTools INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AsgTools AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib DerivationFrameworkInterfaces GaudiKernel Identifier LArCablingLib LArElecCalib LArIdentifier LArRawEvent LArRecConditions StoreGateLib TileConditionsLib TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1CaloUtilsLib TrigT1Interfaces xAODTrigL1Calo + LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AsgTools AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib CxxUtils DerivationFrameworkInterfaces GaudiKernel Identifier LArCablingLib LArElecCalib LArIdentifier LArRawEvent LArRecConditions StoreGateLib TileConditionsLib TileEvent TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloToolInterfaces TrigT1CaloUtilsLib TrigT1Interfaces xAODTrigL1Calo PRIVATE_LINK_LIBRARIES AthenaMonitoringLib EventInfo LWHists ) atlas_add_component( TrigT1CaloCalibTools diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h index 12b5b5e7575de2ca20da37740723c914cd8e613d..30793d03584dabe8071463b66ef15643b46bf5b3 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloCells2TriggerTowers.h @@ -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 */ #ifndef _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOCELLS2TRIGGERTOWERS_H_ @@ -8,6 +8,7 @@ // Athena Includes #include "AsgTools/AsgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "CxxUtils/checker_macros.h" #include "StoreGate/StoreGateSvc.h" // Calo includes @@ -47,7 +48,9 @@ */ namespace LVL1 { -class L1CaloCells2TriggerTowers final : virtual public IL1CaloCells2TriggerTowers, public asg::AsgTool + +class ATLAS_NOT_THREAD_SAFE // use of LArCablingBase +L1CaloCells2TriggerTowers final : virtual public IL1CaloCells2TriggerTowers, public asg::AsgTool { /// Create a proper constructor for Athena ASG_TOOL_CLASS( L1CaloCells2TriggerTowers , LVL1::IL1CaloCells2TriggerTowers ) diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h index 0324a1222bb79718d792a545102b6e7326a0164f..e27c105778b1fa2b27a24a63ae518f7c64962b79 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h @@ -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 */ #ifndef _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOLARTOWERENERGY_H_ @@ -8,6 +8,7 @@ // Athena includes #include "AsgTools/AsgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "CxxUtils/checker_macros.h" #include "StoreGate/StoreGateSvc.h" #include "Identifier/Identifier.h" @@ -40,7 +41,8 @@ namespace LVL1 { -class L1CaloLArTowerEnergy : virtual public IL1CaloLArTowerEnergy, public asg::AsgTool +class ATLAS_NOT_THREAD_SAFE // use of LArCablingBase +L1CaloLArTowerEnergy : virtual public IL1CaloLArTowerEnergy, public asg::AsgTool { /// Create a proper constructor for Athena ASG_TOOL_CLASS( L1CaloLArTowerEnergy , LVL1::IL1CaloLArTowerEnergy ) diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h index cb833277f7d5e08b96508f01a9e6b6a63f997e7b..fbf55e5fe6d63d63c4da6f3a4ef8d03f719621f7 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.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 */ // ******************************************************** @@ -66,6 +66,7 @@ #include "TrigT1CaloMonitoringTools/TrigT1CaloLWHistogramTool.h" #include "GaudiKernel/ToolHandle.h" +#include "CxxUtils/checker_macros.h" class TTree; class TFile; @@ -111,7 +112,7 @@ public: StatusCode Fill(const L1CaloCoolChannelId& coolId,const unsigned int timeSlice,const unsigned int rodHeaderStep,const int adc); StatusCode Fill(const L1CaloCoolChannelId& coolId,const unsigned int rodHeaderStep,const std::vector<int> adc); - StatusCode Finalize(void); + StatusCode Finalize ATLAS_NOT_REENTRANT(void); TProfile* GetRawSignalShape(const L1CaloCoolChannelId& coolId){return GetMapIterator(coolId)->second->GetRawSignalShape();}; unsigned int GetRawMaxPeakBin(const L1CaloCoolChannelId& coolId){return GetMapIterator(coolId)->second->GetRawMaxPeakBin();}; diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h index fa709b934a6e37c2fc07b825d7f37fc2d257a2bd..a81603779d53ef6c7ddf67c412a46195bbea5640 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/TriggerTowerThinningAlg.h @@ -58,11 +58,11 @@ namespace DerivationFramework { double m_minRandom; // Counters - mutable unsigned long m_nEventsProcessed; - mutable unsigned long m_nEventsAllTriggerTowersKeptByRandom; - mutable unsigned long m_nTriggerTowersProcessed; - mutable unsigned long m_nTriggerTowersKept; - mutable unsigned long m_nTriggerTowersRejected; + mutable std::atomic<unsigned long> m_nEventsProcessed; + mutable std::atomic<unsigned long> m_nEventsAllTriggerTowersKeptByRandom; + mutable std::atomic<unsigned long> m_nTriggerTowersProcessed; + mutable std::atomic<unsigned long> m_nTriggerTowersKept; + mutable std::atomic<unsigned long> m_nTriggerTowersRejected; // Tools and random number generator TRandom3* m_random; diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx index a00492c4171f2e5a652a932db9b37c0f7ed6cbf6..0c5f9fdf1c31d4b54fa3891ef72d22d4830b4db3 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPhos4ShapeCollection.cxx @@ -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 */ #include "TrigT1CaloCalibTools/L1CaloPprPhos4ShapeCollection.h" @@ -231,7 +231,7 @@ StatusCode L1CaloPprPhos4ShapeCollection::Fill(const L1CaloCoolChannelId& coolId return itr->second->Fill(rodHeaderStep, adc); } -StatusCode L1CaloPprPhos4ShapeCollection::Finalize(void) { +StatusCode L1CaloPprPhos4ShapeCollection::Finalize ATLAS_NOT_REENTRANT(void) { // want to store the profiles and histograms for each cool id into // a TTree, which will be output to a file. diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt index 44651b2ef6596a626ac881719db57ab36f969655..6e5b814fd23a6bc6fc3b18204367168d0409e614 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/CMakeLists.txt @@ -16,7 +16,7 @@ atlas_add_library( TrigT1CaloCalibUtilsLib INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloIdentifier CaloTriggerToolLib EventInfo GaudiKernel Identifier LArCablingLib LArElecCalib RegistrationServicesLib StoreGateLib TrigConfHLTData TrigConfL1Data TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolsLib TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib xAODTrigL1Calo + LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloIdentifier CaloTriggerToolLib CxxUtils EventInfo GaudiKernel Identifier LArCablingLib LArElecCalib RegistrationServicesLib StoreGateLib TrigConfHLTData TrigConfL1Data TrigT1CaloCalibConditions TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolsLib TrigT1CaloCondSvcLib TrigT1CaloEventLib TrigT1CaloMonitoringToolsLib TrigT1CaloUtilsLib xAODTrigL1Calo PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloDetDescrLib CaloEvent TrigT1CaloToolInterfaces TrigT1Interfaces xAODEventInfo ) atlas_add_component( TrigT1CaloCalibUtils diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..03ad5ea50020526e489f574d40168b359fc7810e --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloCalibUtils diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h index 25f944f7dda793cd577a637cf676c43a1be9d2e4..93e7853e378901141ff0cd1cd10e2c73ca97d7c3 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h @@ -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 */ // *************************************************************************** @@ -17,7 +17,8 @@ #include <map> // Athena includes -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthAlgorithm.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/ToolHandle.h" @@ -65,11 +66,10 @@ class L1CaloPprPhos4ShapeMaker : public AthAlgorithm public: // These are the standard Athena public member functions. L1CaloPprPhos4ShapeMaker(const std::string& name, ISvcLocator* pSvcLocator); - virtual ~L1CaloPprPhos4ShapeMaker(){}; - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + virtual StatusCode finalize ATLAS_NOT_THREAD_SAFE() override; private: // Unless you provide a class with a default constructor, copy constructor and copy asignment operator diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.cxx index 5d2aafe406920a6c12a826b185de9e8c52c2899e..c4b152758cf81dbc9c16eeae8b8fffd949423726 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloPprPhos4ShapeMaker.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 */ #include "TrigT1CaloCalibUtils/L1CaloPprPhos4ShapeMaker.h" @@ -431,7 +431,7 @@ StatusCode L1CaloPprPhos4ShapeMaker::execute(){ return StatusCode::SUCCESS; } -StatusCode L1CaloPprPhos4ShapeMaker::finalize(){ +StatusCode L1CaloPprPhos4ShapeMaker::finalize ATLAS_NOT_THREAD_SAFE(){ // Place your post-event-loop code here ATH_MSG_INFO("In finalize()"); diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.cxx index 7aecf0681cdb54e805f14a10bc4e02dd73f1355c..3e852a5f9fce2473082ef64c1d5fab9408c370fc 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloRampMaker.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 */ #include "TrigT1CaloCalibUtils/L1CaloRampMaker.h" @@ -37,8 +37,8 @@ // define Accessors namespace { -xAOD::TriggerTower::ConstAccessor<float> ttCellsEnergy("CaloCellEnergy"); -xAOD::TriggerTower::ConstAccessor<float> ttCellsET("CaloCellET"); + const xAOD::TriggerTower::ConstAccessor<float> ttCellsEnergy("CaloCellEnergy"); + const xAOD::TriggerTower::ConstAccessor<float> ttCellsET("CaloCellET"); } L1CaloRampMaker::L1CaloRampMaker(const std::string& name, ISvcLocator* pSvcLocator) diff --git a/Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..b512f3b52a08f5a5f95423d947df0788de64a3bf --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloEvent diff --git a/Trigger/TrigT1/TrigT1CaloMonitoringTools/TrigT1CaloMonitoringTools/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloMonitoringTools/TrigT1CaloMonitoringTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..53397ca4d1fc16048a7c84294af7555fbeda7791 --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloMonitoringTools/TrigT1CaloMonitoringTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloMonitoringTools diff --git a/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..9429994cf2d9941233b2649c62dfc92ac683c149 --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloToolInterfaces/TrigT1CaloToolInterfaces/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloToolInterfaces diff --git a/Trigger/TrigT1/TrigT1CaloTools/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..d26ab96957ac884512240eacc110d29051fe3eef --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloTools diff --git a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..0290e04599e7ffe2e6419068061e363ab9b4ebe8 --- /dev/null +++ b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1CaloUtils diff --git a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h index 3c278b02840dc2913ca5e41acc28323e5af05a87..1f9ebdb98afd083f119b4975eb913c3c0b3f365b 100755 --- a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h +++ b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/BinAndCoord.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** BinAndCoord.h - description @@ -37,13 +37,13 @@ class BinAndCoord { public: BinAndCoord(int phiBin, int etaBin, Coordinate* centralCoords): m_phiBin(phiBin), m_etaBin(etaBin), m_centralCoords(centralCoords){} ; - virtual ~BinAndCoord(){ delete m_centralCoords;}; + ~BinAndCoord(){ delete m_centralCoords;}; public: int phiBin() const {return m_phiBin;}; int etaBin() const {return m_etaBin;}; - Coordinate* coords() const {return m_centralCoords;}; + const Coordinate* coords() const {return m_centralCoords;}; private: diff --git a/Trigger/TrigT1/TrigT1EventTPCnv/TrigT1EventTPCnv/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1EventTPCnv/TrigT1EventTPCnv/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..afad21f4121a5ef41a0cb531a9861e17ff3e30a8 --- /dev/null +++ b/Trigger/TrigT1/TrigT1EventTPCnv/TrigT1EventTPCnv/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1EventTPCnv diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..7b2e4fe99288363d76f87b3105408a7ee20fa149 --- /dev/null +++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1Interfaces diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h index b3ae7e8a37133be91509edab55f738404f8a9964..31f5a4eb039cba40bf8f520db5b55608e2c779b6 100644 --- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h +++ b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/CTPSLink.h @@ -1,8 +1,7 @@ -// Dear emacs, this is -*- c++ -*- -#ifndef TRIGT1INTERFACES_CTPSLINK_H /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ +#ifndef TRIGT1INTERFACES_CTPSLINK_H #define TRIGT1INTERFACES_CTPSLINK_H // std include(s): @@ -67,7 +66,7 @@ namespace LVL1CTP { unsigned int getSize() const; //! retrieve CTP version number - unsigned int getCTPVersionNumber() const { return m_ctpVersionNumber;} + unsigned int getCTPVersionNumber() const { return m_ctpVersionNumber;} /* access data content */ @@ -116,10 +115,10 @@ namespace LVL1CTP { unsigned int m_ctpVersionNumber; CTPdataformatVersion * m_ctpVersion; - mutable unsigned int m_wordsPerHeader; //!< number of words per header - mutable unsigned int m_wordsPerDataElement; //!< number of words per data element - mutable unsigned int m_wordsPerTrailer; //!< number of words per trailer - mutable unsigned int m_wordsPerCTPSLink; //!< number of words per CTPSLink + unsigned int m_wordsPerHeader; //!< number of words per header + unsigned int m_wordsPerDataElement; //!< number of words per data element + unsigned int m_wordsPerTrailer; //!< number of words per trailer + unsigned int m_wordsPerCTPSLink; //!< number of words per CTPSLink //! convert data contetn into string (used by dump and print) const std::string convert(std::vector<uint32_t> data, diff --git a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TMUtil.h b/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TMUtil.h deleted file mode 100644 index accd3b0766a870c9ad8ca0e545eb36ec72e0b243..0000000000000000000000000000000000000000 --- a/Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/TMUtil.h +++ /dev/null @@ -1,68 +0,0 @@ -// Dear emacs, this is -*- c++ -*- -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ -#ifndef TRIGT1INTERFACES_TMUTIL_H -#define TRIGT1INTERFACES_TMUTIL_H - -// WARNING This is a legacy class used by many of the old configuration classes. -// WARNING It will likely be removed soon. Any needed functionality should be put into -// WARNING other places. - -// STL include(s): -#include <string> - -// External include(s): -#include "xercesc/dom/DOMNode.hpp" - -namespace LVL1CTP { - - /** - * @short Legacy class lingering around hopefully unused... - * - * TMUtil is a helper class which does things like conversion from - * XML DOM strings to normal strings etc. I want to get rid of that - * class in the long run, and some parts of it are really nastily - * written .... - * - * @author Thomas Schoerner-Sadenius <thomas.schoerner@cern.ch> - * - * $Revision: 187728 $ - * $Date: 2009-05-27 18:18:06 +0200 (Wed, 27 May 2009) $ - */ - class TMUtil { - - public: - /** Method returning a string representing a bit pattern for a given - integer argument. The second argument is the number of bits to use */ - static std::string intToBits( unsigned int, int ); - - /* ???? */ - static int powerOfInt( const int ); - - /** Translates a XML string to an integer */ - static int DOMToInt( const XMLCh* ); - - /** Converts a XML string to a normal std::string */ - static std::string utilTranscode( const XMLCh * ); - - /// comparison between Nodename and string - static bool compareNodeNameString( const xercesc::DOMNode*, const std::string& ); - - /// get GeV value from a XML string - static float getGevValue( const XMLCh* ); - - /** Calculates an uint from a string containing only numbers */ - static unsigned int uintFromString( std::string ); - - /* ???? */ - static int getMuonThresholdMult( const unsigned int, const int, const int ); - static int getEMThresholdMult( const unsigned int, const int, const int ); - static int getEnergyThreshold( const unsigned int, const int, - const int, const int ); - - }; // class TMUtil - -} // namespace LVL1CTP - -#endif // TRIGT1INTERFACES_TMUTIL_H diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx index 2d3cf57869082cfed6e35a6278fceec932b570d8..83454893b8bf5987714c0624caddfe752e6eb380 100644 --- a/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx +++ b/Trigger/TrigT1/TrigT1Interfaces/src/CTPSLink.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TrigT1Interfaces/CTPSLink.h" @@ -12,10 +12,6 @@ // local LVL1 include(s): #include "TrigT1Interfaces/TrigT1CTPDefs.h" -// tdaq-common includes for CTP format definition -//#include "CTPfragment/CTPdataformat.h" - - namespace LVL1CTP { // CTPSLink contains only information of triggered bunch! diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx index 7c57a93ad4d15654f5070bc38bed553217e0c097..afb88f14dee0fafc8cb628f291ab7778e32aea62 100644 --- a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx +++ b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInput.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include <iostream> @@ -49,7 +49,7 @@ namespace LVL1MUONIF { size_t sectorAddress, int bcid ) const { - static Lvl1MuBarrelSectorLogicData dummy; + static const Lvl1MuBarrelSectorLogicData dummy; for( size_t ip=0; ip<m_data[systemAddress].size(); ip++){ int bc=((m_data[systemAddress]).at(ip)).first; if (bc != bcid) continue; diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx index 1467c3639a123f6677cb0d799dc52168934052af..b93409ace6c438ac83157b0c48a8efeebd4767a9 100644 --- a/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.cxx +++ b/Trigger/TrigT1/TrigT1Interfaces/src/Lvl1MuCTPIInputPhase1.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 */ #include <iostream> #include <iomanip> @@ -48,7 +48,7 @@ namespace LVL1MUONIF { size_t sectorAddress, int bcid ) const { - static Lvl1MuBarrelSectorLogicDataPhase1 dummy; + static const Lvl1MuBarrelSectorLogicDataPhase1 dummy; for( size_t ip=0; ip<m_data[systemAddress].size(); ip++){ int bc=((m_data[systemAddress]).at(ip)).first; if (bc != bcid) continue; diff --git a/Trigger/TrigT1/TrigT1Interfaces/src/TMUtil.cxx b/Trigger/TrigT1/TrigT1Interfaces/src/TMUtil.cxx deleted file mode 100644 index ec4289982d2a6e7db78aaaa03ea1c758aa4a44e7..0000000000000000000000000000000000000000 --- a/Trigger/TrigT1/TrigT1Interfaces/src/TMUtil.cxx +++ /dev/null @@ -1,164 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#include <sstream> -#include <cmath> - -#include "xercesc/util/XMLString.hpp" - -#include "TrigT1Interfaces/TMUtil.h" - -namespace LVL1CTP { - - int TMUtil::getEMThresholdMult( const unsigned int word, - const int threshold, const int length ) { - - int returnValue; - const int nbit( 32 ); - std::string bitPattern( intToBits( word, nbit ) ); - // bit 01234567890123456789012345678901 - // info xxxxxxP888777666555444333222111x - bitPattern = bitPattern.substr( 7 + ( 8 - threshold ) * length, length ); - returnValue = static_cast<int>( uintFromString( bitPattern ) ); - return returnValue; - - } - - int TMUtil::getMuonThresholdMult( const unsigned int word, - const int threshold, const int length ) { - - int returnValue; - const int nbit( 32 ); - std::string bitPattern( intToBits( word, nbit ) ); - // bit 01234567890123456789012345678901 - // info xxxxxxxxxxxxxx666555444333222111 - bitPattern = bitPattern.substr( 14 + ( 6 - threshold ) * length, length ); - returnValue = static_cast<int>( uintFromString( bitPattern ) ); - return returnValue; - - } - - int TMUtil::getEnergyThreshold( const unsigned int word, - const int threshold, const int offSet, - const int number ) { - - int returnValue; - const int nbit( 32 ); - std::string bitPattern( intToBits( word, nbit ) ); - // bit 01234567890123456789012345678901 - // info xxxxxxP888777666555444333222111x - bitPattern = bitPattern.substr( ( offSet + ( number - threshold ) ), 1 ); - returnValue = static_cast<int>( uintFromString( bitPattern ) ); - return returnValue; - - } - - //const std::string TMUtil::intToBits(const int i,const int nbit) const - std::string TMUtil::intToBits( unsigned int i, int nbit ) { - - std::string bitString = ""; - std::string ONE = "1"; - std::string ZERO = "0"; - if ( i > ( pow( 2, 31 ) - 1 ) ) { - bitString += "1"; - nbit--; - i -= static_cast<unsigned int>( pow( 2, 31 ) ); - } - for ( int j = nbit - 1;j >= 0;j-- ) - if ( pow( 2, j ) <= i ) { - i -= ( int ) pow( 2, j ); - bitString += ONE; - } else - bitString += ZERO; - return bitString; - - } - - int TMUtil::powerOfInt( const int i ) { - int out; - if ( i < 0 || i > 9 ) { - exit( i ); - } else { - out = 1; - for ( int j = 0;j < i;j++ ) - out *= 10; - } - return out; - } - - int TMUtil::DOMToInt( const XMLCh * thisDOMString ) { - - int returnValue( 0 ); - int sign( 1 ); - std::string helpString( TMUtil::utilTranscode( thisDOMString ) ); - if ( helpString.substr( 0, 1 ) == "-" ) { - sign = -1; - helpString = helpString.substr( 1, std::string::npos ); - } - - std::istringstream is( helpString ); - // istrstream is(helpString.c_str(),helpString.size()); - // I think this ^^^ is a gcc32 fix. Don't have time to test it now. EJWM. - is >> returnValue; - - return sign*returnValue; - - } - - std::string TMUtil::utilTranscode( const XMLCh * t ) { - - char* cstr = xercesc::XMLString::transcode( t ); - std::string str = cstr; - xercesc::XMLString::release( &cstr ); - return str; - - } - - unsigned int TMUtil::uintFromString( std::string pattern ) { - - int size = pattern.size() - 1; - unsigned int result = 0; - for ( unsigned int i = 0;i < pattern.size();i++ ) { - if ( pattern[ i ] == '1' ) - result += static_cast<int>( pow( 2, size ) ); - size--; - } - - return result; - - } - - bool TMUtil::compareNodeNameString( const xercesc::DOMNode * domNode, const std::string & string2 ) { - - char* nodename = xercesc::XMLString::transcode( domNode->getNodeName() ); - bool result = ( 0 == xercesc::XMLString::compareString( nodename, string2.c_str() ) ); - xercesc::XMLString::release( &nodename ); - return result; - - } - - float TMUtil::getGevValue( const XMLCh* xmlStr ) { - - // convert XMLCh* to string - const std::string str = utilTranscode( xmlStr ); - - // look for "GeV" - if ( std::string::npos == str.find( "GeV" ) ) - return 0; - - // look for "*" - std::string::size_type idx = str.find( "*" ); - if ( std::string::npos == idx ) - return 0; - - // convert to float - std::istringstream is( str.substr( 0, idx ) ); - float ret; - is >> ret; - - return ret; - - } - -} // namespace LVL1CTP diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..6d251c6ac81e0b7c55c6e92bf5e15906e39e2036 --- /dev/null +++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/TrigT1MuctpiPhase1/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1MuctpiPhase1 diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..b7156ae092844b97bba99157eb03966c134f3a7c --- /dev/null +++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigT1/TrigT1ResultByteStream