Skip to content
Snippets Groups Projects
Commit ebbcfa96 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'ALFAROBMonitor' into 'master'

converting direct access to StoreGate by handle

See merge request !42047
parents a36c0287 0a0bae8c
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!42047converting direct access to StoreGate by handle
......@@ -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;
}
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment