diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h index d1a631b0dcc453f4e89837b67953de4aa9e43507..6d9f66fd8f1a282bfcc4be4be3eb5b4e688ac4b8 100755 --- a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h @@ -125,8 +125,6 @@ class AthenaMonManager : public AthAlgorithm { protected: ToolHandleArray<IMonitorToolBase> m_monTools; - virtual void setEventInfo(); - ITHistSvc* m_THistSvc; private: diff --git a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py index 8fd60183f37c87fb9d63c6a68a396b642cd209d2..6780f16fbc368a805fb60bbaea1b4df6a3cccab4 100644 --- a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py +++ b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py @@ -263,6 +263,18 @@ if DQMonFlags.doMonitoring(): if isinstance(_, AthenaMonManager): toolset.update(_.AthenaMonTools) + # in MT the initialization can be in random order ... force all managers to have common setup + _.FileKey = DQMonFlags.monManFileKey() + _.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup() + _.DataType = DQMonFlags.monManDataType() + _.Environment = DQMonFlags.monManEnvironment() + _.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval() + _.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval() + _.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval() + _.ManualRunLBSetup = DQMonFlags.monManManualRunLBSetup() + _.Run = DQMonFlags.monManRun() + _.LumiBlock = DQMonFlags.monManLumiBlock() + for tool in toolset: # stop lumi access if we're in MC or enableLumiAccess == False if 'EnableLumi' in dir(tool): diff --git a/Control/AthenaMonitoring/src/AthenaMonManager.cxx b/Control/AthenaMonitoring/src/AthenaMonManager.cxx index f8d2f71dda21772448389a7f7e6b74342b9db707..3c2bae6dd60246b55dd85d598220c9bdf8d8564a 100755 --- a/Control/AthenaMonitoring/src/AthenaMonManager.cxx +++ b/Control/AthenaMonitoring/src/AthenaMonManager.cxx @@ -104,10 +104,6 @@ public: bool m_forkedProcess; pid_t m_lastPID; - // Retrieval key - SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoKey - { "EventInfo" }; - //NB: The LW hist leak checker is now also looking for //inappropriate usage of MonGroup copy constructors (temporary //until we outlaw copy/assignment of MonGroups): @@ -184,6 +180,7 @@ public: static DataType_t s_dataType; static Environment_t s_environment; + static bool s_runLBOverridden; static unsigned int s_lumiBlock; static unsigned int s_run; static unsigned int s_fill; @@ -201,6 +198,7 @@ std::string AthenaMonManager::Imp::s_environmentStr("user") AthenaMonManager::DataType_t AthenaMonManager::Imp::s_dataType(userDefined); AthenaMonManager::Environment_t AthenaMonManager::Imp::s_environment(user); +bool AthenaMonManager::Imp::s_runLBOverridden(false); unsigned int AthenaMonManager::Imp::s_lumiBlock(0); unsigned int AthenaMonManager::Imp::s_run(0); unsigned int AthenaMonManager::Imp::s_fill(0); @@ -363,7 +361,11 @@ unsigned int AthenaMonManager:: lumiBlockNumber() { - return Imp::s_lumiBlock; + if (Imp::s_runLBOverridden) { + return Imp::s_lumiBlock; + } else { + return Gaudi::Hive::currentContext().eventID().lumi_block(); + } } @@ -371,7 +373,11 @@ unsigned int AthenaMonManager:: runNumber() { - return Imp::s_run; + if (Imp::s_runLBOverridden) { + return Imp::s_run; + } else { + return Gaudi::Hive::currentContext().eventID().run_number(); + } } @@ -394,8 +400,6 @@ initialize() if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "AthenaMonManager::initialize():" << endmsg; - ATH_CHECK( m_d->m_EventInfoKey.initialize() ); - if (Imp::s_svcLocator->service("SGAudSvc", m_d->m_sgAudSvc, false/*do not create*/).isFailure()) m_d->m_sgAudSvc=0; @@ -454,6 +458,7 @@ initialize() if( m_d->m_manualRunLBProp ) { Imp::s_run = m_d->m_runProp; Imp::s_lumiBlock = m_d->m_lumiBlockProp; + Imp::s_runLBOverridden = true; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " --> using run = " << Imp::s_run << ", lumiBlock = " << Imp::s_lumiBlock << endmsg; } else { @@ -545,11 +550,6 @@ execute() StatusCode sc; sc.setChecked(); - if( !m_d->m_manualRunLBProp ) { - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " --> Calling setEventInfo()" << endmsg; - setEventInfo(); - } - ToolHandleArray<IMonitorToolBase>::iterator monToolsEnd = m_monTools.end(); for( ToolHandleArray<IMonitorToolBase>::iterator i = m_monTools.begin(); i != monToolsEnd; ++i ) { ToolHandle<IMonitorToolBase>& tool = *i; @@ -921,25 +921,6 @@ writeAndDelete( const std::string& key ) // Protected Methods // ********************************************************************* -void -AthenaMonManager:: -setEventInfo() -{ - if( m_d->m_isPrimaryManager ) { - SG::ReadHandle<xAOD::EventInfo> evt(m_d->m_EventInfoKey); - if (! evt.isValid()) { - ATH_MSG_ERROR("!! Unable to retrieve Event from StoreGate !!"); - } - - Imp::s_run = evt->runNumber(); - Imp::s_lumiBlock = evt->lumiBlock(); - - if (msgLvl(MSG::DEBUG)) - msg(MSG::DEBUG) << " --> setEventInfo: run = " << Imp::s_run << ", lumiBlock = " << Imp::s_lumiBlock << endmsg; - - } -} - // ********************************************************************* // Private Methods diff --git a/DataQuality/DataQualityTools/DataQualityTools/DQTDetSynchMonAlg.h b/DataQuality/DataQualityTools/DataQualityTools/DQTDetSynchMonAlg.h index d1dcfdad28821e39f531394ae8530fc0057f43c3..0c73e5d93230e9c569fb62289d81d2386eabb5db 100644 --- a/DataQuality/DataQualityTools/DataQualityTools/DQTDetSynchMonAlg.h +++ b/DataQuality/DataQualityTools/DataQualityTools/DQTDetSynchMonAlg.h @@ -76,13 +76,13 @@ private: // storegate keys SG::ReadHandleKeyArray<InDetTimeCollection> m_InDetTimeCollectionKeys - { "TRT_BCID", "SCT_BCID", "PixelBCID", "TRT_LVL1ID", "SCT_LVL1ID", "PixelLVL1ID" } ; + { this, "InDetTimeCollectionKeys", {"TRT_BCID", "SCT_BCID", "PixelBCID", "TRT_LVL1ID", "SCT_LVL1ID", "PixelLVL1ID"} } ; SG::ReadHandleKey<LArFebHeaderContainer> m_LArFebHeaderContainerKey - { "LArFebHeader" }; + { this, "LArFebHeaderKey", "LArFebHeader" }; SG::ReadHandleKey<TileDigitsContainer> m_TileDigitsContainerKey - { "TileDigitsFlt" }; + { this, "TileDigitsContainerKey", "TileDigitsFlt" }; SG::ReadHandleKey<RpcPadContainer> m_RpcPadContainerKey - { "RPCPAD" }; + { this, "RpcPadContainerKey", "RPCPAD" }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}; diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalMotherTrigMonTool.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalMotherTrigMonTool.h index 04c55b3add251ffbc857de3815f5fd91285eb8bb..944499086047fa63d454c8a35fe8675c9fc05751 100755 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalMotherTrigMonTool.h +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalMotherTrigMonTool.h @@ -69,7 +69,7 @@ class InDetGlobalMotherTrigMonTool : public InDetGlobalMotherMonTool private: int m_firedTriggers[8]; std::vector<unsigned int> m_activeMenuItems; - SG::ReadHandleKey<EventInfo> m_eventInfoKey{this,"EventInfoKey","BysteStreamEventInfo","Event Info Key for Global Trigger Montioring"}; + SG::ReadHandleKey<EventInfo> m_eventInfoKey{this,"EventInfoKey","ByteStreamEventInfo","Event Info Key for Global Trigger Montioring"}; }; #endif diff --git a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx index 544677bed44ec78365973639d4c6f02cb1359d81..4a563e57e10ae32929a0c59aad4a628fa2a2f102 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx @@ -160,6 +160,9 @@ LArNoiseCorrelationMon::initialize() /** Retrieve pedestals container*/ ATH_CHECK(m_keyPedestal.initialize()); + /** Configure event info */ + ATH_CHECK(m_eventInfoKey.initialize()); + /** get the trigger list from the 'm_triggerChainProp'*/ m_triggers.clear(); if(m_isCalibrationRun) { @@ -236,8 +239,12 @@ LArNoiseCorrelationMon::fillHistograms() bool passTrig = m_isCalibrationRun; if(!m_isCalibrationRun) { /**EventID is a part of EventInfo, search event informations:*/ - const xAOD::EventInfo* thisEvent; - ATH_CHECK(evtStore()->retrieve(thisEvent)); + SG::ReadHandle<xAOD::EventInfo> thisEvent{m_eventInfoKey}; + + if (!thisEvent.isValid()) { + ATH_MSG_ERROR("xAOD::EventInfo retrieval failed"); + return StatusCode::FAILURE; + } m_evtId = thisEvent->eventNumber(); ATH_MSG_DEBUG("Event nb " << m_evtId ); diff --git a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h index 5c0681a450e0cfd380c0843a03228b35c44dd8d2..cec7901843e1fd864d117feea5fc8398bcd8d4f5 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h +++ b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h @@ -19,6 +19,7 @@ #include "LArElecCalib/ILArPedestal.h" #include "LArRecConditions/ILArBadChannelMasker.h" #include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/ReadHandleKey.h" #include "LArCabling/LArOnOffIdMapping.h" @@ -69,6 +70,9 @@ protected: /** Handle to pedestal */ SG::ReadCondHandleKey<ILArPedestal> m_keyPedestal{this,"LArPedestalKey","LArPedestal","SG key of LArPedestal CDO"}; + + /** Handle to event info */ + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"}; private: diff --git a/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx index 58d22489abd360e019741938bcce9fba37393d0a..ca69e2a5bf0131340e06ba4525c560f95d24b873 100755 --- a/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx +++ b/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.cxx @@ -11,8 +11,6 @@ #include "LArFEBMonAlg.h" #include "LArRecEvent/LArEventBitInfo.h" -#include "LArRawEvent/LArFebHeaderContainer.h" -#include "LArRawEvent/LArFebErrorSummary.h" #include "LArRawConditions/LArDSPThresholdsComplete.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" @@ -70,6 +68,9 @@ StatusCode LArFEBMonAlg::initialize() { ATH_MSG_DEBUG( "Missing FEBs key" << m_BFKey.key() << " initialized" ); } + ATH_CHECK( m_hdrContKey.initialize() ); + ATH_CHECK( m_lArFebErrorSummaryKey.initialize() ); + m_histoGroups.reserve(m_SubDetNames.size()); for (unsigned i=0; i<m_SubDetNames.size(); ++i) { std::vector<std::string> part; @@ -111,22 +112,20 @@ StatusCode LArFEBMonAlg::fillHistograms(const EventContext& ctx) const { ATH_MSG_DEBUG( "LArFEBMonAlg Lumi block: "<<lumi_block); - const LArFebHeaderContainer* hdrCont; - const LArFebErrorSummary* lArFebErrorSummary; - StatusCode sc = evtStore()->retrieve(hdrCont); - if (sc.isFailure() || !hdrCont) { - ATH_MSG_WARNING( "No LArFebHeaderContainer found in TDS" ); - return sc; + SG::ReadHandle<LArFebHeaderContainer> hdrCont(m_hdrContKey, ctx); + SG::ReadHandle<LArFebErrorSummary> lArFebErrorSummary(m_lArFebErrorSummaryKey, ctx); + if (!hdrCont.isValid()) { + ATH_MSG_ERROR( "No LArFebHeaderContainer found in TDS" ); + return StatusCode::FAILURE; } if (hdrCont->size()==0) { - ATH_MSG_WARNING( "Got empty LArFebHeaderContainer. Do nothing" ); + ATH_MSG_ERROR( "Got empty LArFebHeaderContainer. Do nothing" ); return StatusCode::FAILURE; } - sc=evtStore()->retrieve( lArFebErrorSummary, "LArFebErrorSummary"); - if (sc.isFailure()) { - ATH_MSG_WARNING( "No LArFebErrorSummary found in TDS" ); + if (!lArFebErrorSummary.isValid()) { + ATH_MSG_ERROR( "No LArFebErrorSummary found in TDS" ); return StatusCode::FAILURE; } @@ -416,7 +415,7 @@ StatusCode LArFEBMonAlg::fillHistograms(const EventContext& ctx) const { } - return sc; + return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.h b/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.h index 7c4adf8a8c0ffdbbcc118c30d55adaec50741001..8dfe63c1785283926fb30f39791c21cc48c4150a 100755 --- a/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.h +++ b/LArCalorimeter/LArMonitoring/src/LArFEBMonAlg.h @@ -12,6 +12,8 @@ #include "StoreGate/ReadCondHandleKey.h" #include "LArRecConditions/LArBadChannelCont.h" #include "LArRawConditions/LArDSPThresholdsComplete.h" +#include "LArRawEvent/LArFebHeaderContainer.h" +#include "LArRawEvent/LArFebErrorSummary.h" #include "AthenaPoolUtilities/AthenaAttributeList.h" #include "TrigDecisionTool/TrigDecisionTool.h" @@ -22,7 +24,6 @@ #include<mutex> -class LArFebErrorSummary; class TTree; class LArFEBMonAlg : public AthMonitorAlgorithm { @@ -43,6 +44,8 @@ private: {this, "Run1DSPThresholdsKey", "", "SG key for DSP thresholds, run1"}; SG::ReadCondHandleKey<AthenaAttributeList> m_run2DSPThresholdsKey {this, "Run2DSPThresholdsKey", "", "SG key for DSP thresholds, run2"}; + SG::ReadHandleKey<LArFebHeaderContainer> m_hdrContKey{this, "LArFebHeaderKey", "LArFebHeader"}; + SG::ReadHandleKey<LArFebErrorSummary> m_lArFebErrorSummaryKey{this, "LArFebErrorSummaryKey", "LArFebErrorSummary"}; Gaudi::Property<bool> m_ignoreMissingHeaderEMB{this, "IgnoreMissingHeaderEMB", false}; Gaudi::Property<bool> m_ignoreMissingHeaderPS{this, "IgnoreMissingHeaderPS", false}; Gaudi::Property<int> m_nFEBnominal{this,"NominalFEBNumber",1524}; diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/share/TgcPrepDataReplicationAlg_jopOptions.py b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/share/TgcPrepDataReplicationAlg_jopOptions.py index a7d0060b7f82be350598dfd5bbffaacc1681dac6..bafb2dd00bf947af125bd5b22cd26931c0f6dfad 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/share/TgcPrepDataReplicationAlg_jopOptions.py +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/share/TgcPrepDataReplicationAlg_jopOptions.py @@ -1,11 +1,12 @@ include.block ("MuonTGC_CnvTools/TgcPrepDataReplicationAlg_jopOptions.py") # Muon::TgcPrepDataReplicationTool -from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcPrepDataReplicationTool -TgcPrepDataReplicationTool = Muon__TgcPrepDataReplicationTool("Muon::TgcPrepDataReplicationTool") -ToolSvc += TgcPrepDataReplicationTool +from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcPrepDataReplicationToolAllBCto3BC +TgcPrepDataReplicationToolAllBCto3BC = Muon__TgcPrepDataReplicationToolAllBCto3BC("Muon::TgcPrepDataReplicationTool") +ToolSvc += TgcPrepDataReplicationToolAllBCto3BC # Muon::TgcPrepDataReplicationAlg from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcPrepDataReplicationAlg TgcPrepDataReplicationAlg = Muon__TgcPrepDataReplicationAlg("Muon::TgcPrepDataReplicationAlg") +TgcPrepDataReplicationAlg.Tool = TgcPrepDataReplicationToolAllBCto3BC topSequence += TgcPrepDataReplicationAlg diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.cxx index 6321d4e7d9702155db84f6b607217c66589172e9..bc0116977eeebd31622e0a7e39abef61802bbfb2 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.cxx +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.cxx @@ -7,7 +7,7 @@ namespace Muon { TgcPrepDataReplicationAlg::TgcPrepDataReplicationAlg(const std::string& name, ISvcLocator* pSvcLocator) - : AthAlgorithm(name, pSvcLocator), m_tool("Muon::TgcPrepDataReplicationTool") + : AthAlgorithm(name, pSvcLocator) { } diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.h index c6554ad88804d2f853a2c84085afdc472e05ddd7..513e6b2070b2876d505627f68f20846bb5a4317e 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.h +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationAlg.h @@ -23,7 +23,7 @@ namespace Muon private: /** ITgcPrepDataReplicationTool.h */ - ToolHandle<ITgcPrepDataReplicationTool> m_tool; + ToolHandle<ITgcPrepDataReplicationTool> m_tool{this, "Tool", "Muon::TgcPrepDataReplicationTool"}; }; } // end of namespace diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx index 5199e30dfc8d62745600a1bb4f6e810b075be9c3..667196766c12f5c6c4bc9fc8da5f61f70ed14121 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx @@ -55,7 +55,7 @@ StatusCode Muon::TgcPrepDataReplicationToolAllBCto3BC::initialize() } ATH_CHECK(m_3BCKeys.initialize()); - + ATH_CHECK(m_AllBCKey.initialize()); return StatusCode::SUCCESS; } diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h index 46919f86edd6c693b0bb28b17283fbd0383e5775..250c711e25b51c63a65b7bde3405f90130da9b56 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/RpcClusterization/RpcClusterBuilderPRD.h @@ -19,6 +19,8 @@ #include "MuonDigitContainer/RpcDigit.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "EventPrimitives/EventPrimitives.h" +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" class RpcIdHelper; @@ -46,11 +48,9 @@ private: std::vector<Muon::RpcPrepDataCollection*> m_coll_vect; Muon::RpcPrepDataCollection* m_temp_coll; - std::string m_colKey; - std::string m_colKeyIn; typedef std::map<int, Muon::RpcPrepData*> pattern; std::map<Identifier,pattern> m_digits; - StatusCode retrieve_rpcClusterContainer() const; + // StatusCode retrieve_rpcClusterContainer() const; float m_timeSpread; protected: @@ -62,7 +62,8 @@ protected: "Key of input MuonDetectorManager condition data"}; ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; - + SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_colKeyIn {this, "InputCollectionName", "RPC_Measurements"}; + SG::WriteHandleKey<Muon::RpcPrepDataContainer> m_colKey {this, "CollectionName", "rpcClusters"}; }; #endif diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx index 288f4aae74f828f43791816d60cb5e4696d7bb72..d58e61c971ff195c399650b4831179cb52d32565 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/RpcClusterization/src/RpcClusterBuilderPRD.cxx @@ -29,8 +29,6 @@ RpcClusterBuilderPRD::RpcClusterBuilderPRD(const std::string& name, ISvcLocator* { // Declare the properties - declareProperty("InputCollectionName", m_colKeyIn = "RPC_Measurements"); // StoreGate key for RPC clusters - declareProperty("CollectionName", m_colKey = "rpcClusters"); // StoreGate key for RPC clusters declareProperty("ClusterTimeSpread", m_timeSpread = 15.); } @@ -41,6 +39,9 @@ StatusCode RpcClusterBuilderPRD::initialize(){ ATH_CHECK(m_idHelperSvc.retrieve()); + ATH_CHECK(m_colKeyIn.initialize()); + ATH_CHECK(m_colKey.initialize()); + // Create an empty cluster container // m_rpcClusterContainer = new Muon::RpcPrepDataContainer(m_idHelperSvc->rpcIdHelper().module_hash_max()); // m_rpcClusterContainer->addRef(); @@ -51,10 +52,11 @@ StatusCode RpcClusterBuilderPRD::initialize(){ StatusCode RpcClusterBuilderPRD::execute() { - m_rpcClusterContainer = new Muon::RpcPrepDataContainer(m_idHelperSvc->rpcIdHelper().module_hash_max()); + SG::WriteHandle<Muon::RpcPrepDataContainer> clusterContainer(m_colKey); + ATH_CHECK(clusterContainer.record(std::make_unique<Muon::RpcPrepDataContainer>(m_idHelperSvc->rpcIdHelper().module_hash_max()))); + m_rpcClusterContainer = clusterContainer.ptr(); // m_rpcClusterContainer->cleanup(); - ATH_CHECK( evtStore()->record(m_rpcClusterContainer,m_colKey) ); StatusCode sc=fill_rpcClusterContainer(); @@ -85,10 +87,9 @@ StatusCode RpcClusterBuilderPRD::fill_rpcClusterContainer() { return StatusCode::FAILURE; } - const Muon::RpcPrepDataContainer* container; - StatusCode sc = evtStore()->retrieve(container,m_colKeyIn); - if (sc.isFailure()) { - ATH_MSG_WARNING(" Cannot retrieve RPC Digit Container with key " << m_colKeyIn.c_str() ); + SG::ReadHandle<Muon::RpcPrepDataContainer> container(m_colKeyIn); + if (!container.isValid()) { + ATH_MSG_WARNING(" Cannot retrieve RPC Digit Container with key " << m_colKeyIn ); return StatusCode::SUCCESS; } @@ -141,7 +142,7 @@ StatusCode RpcClusterBuilderPRD::fill_rpcClusterContainer() { for(unsigned int k=0;k<m_coll_vect.size();k++){ - sc = m_rpcClusterContainer->addCollection(m_coll_vect[k], m_coll_vect[k]->identifyHash()); + StatusCode sc = m_rpcClusterContainer->addCollection(m_coll_vect[k], m_coll_vect[k]->identifyHash()); if (sc.isFailure()) ATH_MSG_ERROR("Couldn't record RpcPrepDataCollection with key=" << m_colKey << " in StoreGate!"); @@ -458,39 +459,39 @@ void RpcClusterBuilderPRD::push_back(Muon::RpcPrepData *& newCluster){ // } } -StatusCode RpcClusterBuilderPRD::retrieve_rpcClusterContainer() const { - - typedef Muon::RpcPrepDataCollection::const_iterator cluster_iterator; - - const Muon::RpcPrepDataContainer* PRDcontainer; - ATH_CHECK( evtStore()->retrieve(PRDcontainer,m_colKey) ); - - for (Muon::RpcPrepDataContainer::const_iterator container_iterator=PRDcontainer->begin(); - container_iterator != PRDcontainer->end(); - ++container_iterator) { - - const Muon::RpcPrepDataCollection* collection = *container_iterator; - ATH_MSG_INFO("Size of the collection is " << collection->size() ); - if (collection->size() > 0) { - ATH_MSG_INFO("**************************************************************"); - cluster_iterator beginCluster = collection->begin(); - cluster_iterator endCluster = collection->end(); - for ( ; beginCluster!=endCluster; ++beginCluster) { - const Muon::RpcPrepData* cluster = *beginCluster; - Amg::Vector3D position = cluster->globalPosition(); - ATH_MSG_INFO("RPC Cluster ID, Position (mm), size = " - << m_idHelperSvc->rpcIdHelper().show_to_string(cluster->identify()) << " [" - << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.x() - << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.y() - << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.z() - // << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->width() - << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->rdoList().size() - << " ]"); - } - ATH_MSG_INFO("Number of Clusters in the collection is " << collection->size() ); - ATH_MSG_INFO("**************************************************************"); - } - } - - return StatusCode::SUCCESS; -} +// StatusCode RpcClusterBuilderPRD::retrieve_rpcClusterContainer() const { + +// typedef Muon::RpcPrepDataCollection::const_iterator cluster_iterator; + +// const Muon::RpcPrepDataContainer* PRDcontainer; +// ATH_CHECK( evtStore()->retrieve(PRDcontainer,m_colKey) ); + +// for (Muon::RpcPrepDataContainer::const_iterator container_iterator=PRDcontainer->begin(); +// container_iterator != PRDcontainer->end(); +// ++container_iterator) { + +// const Muon::RpcPrepDataCollection* collection = *container_iterator; +// ATH_MSG_INFO("Size of the collection is " << collection->size() ); +// if (collection->size() > 0) { +// ATH_MSG_INFO("**************************************************************"); +// cluster_iterator beginCluster = collection->begin(); +// cluster_iterator endCluster = collection->end(); +// for ( ; beginCluster!=endCluster; ++beginCluster) { +// const Muon::RpcPrepData* cluster = *beginCluster; +// Amg::Vector3D position = cluster->globalPosition(); +// ATH_MSG_INFO("RPC Cluster ID, Position (mm), size = " +// << m_idHelperSvc->rpcIdHelper().show_to_string(cluster->identify()) << " [" +// << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.x() +// << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.y() +// << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << position.z() +// // << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->width() +// << std::setiosflags(std::ios::fixed) << std::setprecision(3) << std::setw(12) << cluster->rdoList().size() +// << " ]"); +// } +// ATH_MSG_INFO("Number of Clusters in the collection is " << collection->size() ); +// ATH_MSG_INFO("**************************************************************"); +// } +// } + +// return StatusCode::SUCCESS; +// } diff --git a/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py b/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py index be7e6d6cfa2915ea7b3f5944a6530f461793c376..ff26b723edadbcbf43160fd7c3b72088006376f4 100644 --- a/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py +++ b/TileCalorimeter/TileMonitoring/share/TileMon_jobOptions.py @@ -265,5 +265,6 @@ if tileRawMon: from TileMonitoring.TileDQFragMonitorAlgorithm import TileDQFragMonitoringConfigOld topSequence += TileDQFragMonitoringConfigOld(DQMonFlags) -topSequence += ManagedAthenaTileMon -printfunc (ManagedAthenaTileMon) +if jp.ConcurrencyFlags.NumThreads() == 0: + topSequence += ManagedAthenaTileMon + printfunc (ManagedAthenaTileMon) diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py index 4d4efed9a2942c73ec9fb57160f18e28dcf4d98e..7451e62b3f6ed6c0b96e082e2a715322347800d6 100644 --- a/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py +++ b/Trigger/TrigT1/TrigT1CTMonitoring/share/TrigT1CTMonitoringJobOptions_forRecExCommission.py @@ -47,7 +47,7 @@ from AthenaCommon.AppMgr import ToolSvc as toolSvc from TrigT1CTMonitoring.TrigT1CTMonitoringConf import TrigT1CTMonitoring__BSMonitoring as BSMon #-----------ONLINE CODE--------------------- -if isOnline: +if isOnline and jp.ConcurrencyFlags.NumThreads() == 0: #from TrigServices.TrigServicesConf import TrigMonTHistSvc #THistSvc = TrigMonTHistSvc("THistSvc") #svcMgr += THistSvc @@ -173,7 +173,7 @@ if isOnline: #-----------OFFLINE CODE--------------------- -if not isOnline: +if not isOnline and jp.ConcurrencyFlags.NumThreads() == 0: from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter cfg = TriggerConfigGetter()