diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx index 30fe6b061661ca4702eef57582ce7f9e9c5fdad9..aa8bcd8c0c02075df11a0ba57c3e2efa83f53cec 100755 --- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx +++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.cxx @@ -21,7 +21,6 @@ TrigALFAROBMonitor::TrigALFAROBMonitor(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator), - m_rootHistSvc("THistSvc", name), m_robDataProviderSvc( "ROBDataProviderSvc", name ), //m_hist_failedChecksumForALFAROB(0), @@ -43,8 +42,6 @@ TrigALFAROBMonitor::TrigALFAROBMonitor(const std::string& name, ISvcLocator* pSv declareProperty("DoGoodDataMonitoring", m_doDataGoodMonitoring=true); declareProperty("DoODDistanceHistograming", m_doODDistance=true); - declareProperty("keyRBResult", m_keyRBResult = ""); - // fill vectors with names of trigger items m_map_TrgNamesToHistGroups["L1_ALFA_ELAST15"] = 0; m_map_TrgNamesToHistGroups["L1_ALFA_ELAST18"] = 0; @@ -85,6 +82,7 @@ StatusCode TrigALFAROBMonitor::initialize(){ m_ALFARobIds.push_back(m_lvl1ALFA2ROBid.value()); ATH_CHECK( m_L1MenuKey.initialize() ); + ATH_CHECK( m_RBResultKey.initialize() ); ATH_CHECK( m_monTools.retrieve() ); @@ -124,23 +122,23 @@ StatusCode TrigALFAROBMonitor::execute (const EventContext& ctx) const { ATH_MSG_DEBUG(" Decoded lumi block nb: " <<LB); // Now try to extract L1 decisons from ROIB fragment - if(!evtStore()->contains<ROIB::RoIBResult>(m_keyRBResult)) { - ATH_MSG_INFO("RoIBResult does not exist with key: " << m_keyRBResult); + //if(!evtStore()->contains<ROIB::RoIBResult>(m_RBResultKey)) { + //ATH_MSG_INFO("RoIBResult does not exist with key: " << m_RBResultKey); + //} + + SG::ReadHandle<ROIB::RoIBResult> h_roIBResult (m_RBResultKey, ctx); + if (!h_roIBResult.isValid()) { + ATH_MSG_INFO("RoIBResult does not exist with key: " << m_RBResultKey); + return StatusCode::SUCCESS; } - const ROIB::RoIBResult* roIBResult=0; - StatusCode sc = evtStore()->retrieve(roIBResult,m_keyRBResult); + const ROIB::RoIBResult* roIBResult = h_roIBResult.cptr(); - if(sc.isFailure()){ - ATH_MSG_INFO(" Unable to retrieve RoIBResult from storeGate!"); - return StatusCode::SUCCESS; //HLT::NO_LVL1_RESULT; - } else { - const std::vector<ROIB::CTPRoI> ctpRoIVecAV = roIBResult->cTPResult().TAV(); - for (unsigned int iWord = 0; iWord < ctpRoIVecAV.size(); ++iWord) { + const std::vector<ROIB::CTPRoI> ctpRoIVecAV = roIBResult->cTPResult().TAV(); + for (unsigned int iWord = 0; iWord < ctpRoIVecAV.size(); ++iWord) { uint32_t roIWord = ctpRoIVecAV[iWord].roIWord(); - ATH_MSG_DEBUG(" roiAV "<<std::hex<<roIWord<<std::dec); - } - } + ATH_MSG_INFO(" roiAV "<<std::hex<<roIWord<<std::dec); + } // get the ALFA ROBs //std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> ALFARobFragmentVec; @@ -235,8 +233,6 @@ StatusCode TrigALFAROBMonitor::start() { //eformat::helper::SourceIdentifier srcID_CTP( eformat::TDAQ_CTP ,0); //eformat::helper::SourceIdentifier srcID_HLT( eformat::TDAQ_HLT, 0); - // release histogramming service - // when we plan to book now histograms at the LB boundaries we should not release the histogramming service ...m_rootHistSvc.release().ignore(); return StatusCode::SUCCESS; } diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h index 5f1adcbd1e9b3045f692799dccd1a43b30ac681c..521484ec2381bb0240503948e4e0173ccde27ba2 100755 --- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h +++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigALFAROBMonitor.h @@ -3,7 +3,8 @@ */ #include "AthenaBaseComps/AthReentrantAlgorithm.h" -#include "GaudiKernel/ServiceHandle.h" +#include "StoreGate/ReadHandleKey.h" +//#include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/SmartIF.h" #include "GaudiKernel/ITHistSvc.h" #include "GaudiKernel/HistoProperty.h" @@ -44,13 +45,11 @@ private: * @return value of the message level for this algorithm. */ - ServiceHandle<ITHistSvc> m_rootHistSvc; - std::string m_keyRBResult; // Key to retrieve the RoIBResult from SG - std::string m_keyL1Result; // key to retrieve the L1Result from SG - - typedef ServiceHandle<IROBDataProviderSvc> IIROBDataProviderSvc_t; - /// Reference to the ROBDataProviderSvc service + ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc; + SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }; + SG::ReadHandleKey<ROIB::RoIBResult> m_RBResultKey{ this, "RoIBBResultRHKey", "RoIBResult", "StoreGate key for reading RoIB results" }; + /// Source identifiers for ROB fragments IntegerProperty m_lvl1CTPROBid ; @@ -60,12 +59,9 @@ private: UnsignedIntegerProperty m_ctpModuleID; - SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }; - /// Switch for setting the debug StreamTag and name for debug stream BooleanProperty m_setDebugStream; StringProperty m_debugStreamName; - StringProperty m_calibrationStreamName; /// Switch for ROB checksum test