5#ifndef L1TOPOONLINEMONITORING_L1TopoOnlineMonitor_h
6#define L1TOPOONLINEMONITORING_L1TopoOnlineMonitor_h
23#include "GaudiKernel/LockedHandle.h"
44 virtual StatusCode
start()
override;
45 virtual StatusCode
fillHistograms(
const EventContext& ctx )
const override;
61 static std::bitset<s_nTopoCTPOutputs>&
createBits(std::optional<std::bitset<s_nTopoCTPOutputs>>& opt) {
62 opt = std::bitset<s_nTopoCTPOutputs>{};
98 std::vector<std::vector<std::pair<unsigned,unsigned>>>
m_startbit;
103 this,
"MonTool",
"" ,
104 "Monitoring tool to create online histograms"};
106 this,
"ErrorFlagsKey",
"L1TopoErrorFlags",
107 "Key of the output TrigCompositeContainer with L1Topo error flags"};
109 this,
"doSimMon",
true,
"Enable L1Topo simulation decision monitoring"};
111 this,
"doHwMonCTP",
true,
"Enable L1Topo HW readout from CTP"};
113 this,
"doHwMon",
true,
"Enable L1Topo HW readout from RAW"};
115 this,
"doHwErrorMon",
false,
"Enable L1Topo HW Error monitoring"};
117 this,
"doComp",
true,
"Enable L1Topo HW/Sim comparison"};
119 this,
"doMultComp",
false,
"Enable L1Topo Multiplicity HW/Sim comparison"};
121 this,
"forceCTPasHdw",
false,
"Force to CTP monitoring as primary in Sim/Hdw comparison"};
123 this,
"AlgorithmVetoList", {},
"List of L1Topo algorithm items Vetoed for monitoring in L1CaloDQ package due to known Sim/Hdw mismatches"};
125 this,
"MultiplicityVetoList", {},
"List of multiplicity items Vetoed for monitoring in L1CaloDQ package due to known Sim/Hdw mismatches"};
131 this,
"L1_TopoKey",
"L1_TopoSimResults",
"l1topo EDM"};
134 this,
"L1_TopoRawDataKey",
"L1_Phase1L1TopoRAWData",
"l1topo Raw Data"};
139 "Key of the CTP RDO object"};
144 StatusCode
doSimMon(DecisionBits& decisionBits, std::vector<std::vector<unsigned>> &multWeights,
const EventContext& ctx)
const;
147 StatusCode
doHwMonCTP(DecisionBits& decisionBits,
const EventContext& ctx)
const;
150 StatusCode
doHwMon(DecisionBits& decisionBits, std::vector<std::vector<unsigned>> &multWeights,
const EventContext& ctx)
const;
153 StatusCode
doComp(DecisionBits& decisionBits,
const EventContext& ctx)
const;
156 StatusCode
doMultComp(std::vector<std::vector<unsigned>> &multWeightsSim, std::vector<std::vector<unsigned>> &multWeightsHdw,
const EventContext& ctx)
const;
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_errorFlagsKey
Gaudi::Property< bool > m_doHwMonCTP
std::unique_ptr< float[]> m_countHdwNotSim
std::vector< std::string > m_TopoAlgTriggerNames
std::vector< std::string > m_TopoMultTriggerNames
std::unique_ptr< float[]> m_overflow_countSimNotHdw
std::unique_ptr< float[]> m_countHdwSim
ServiceHandle< StoreGateSvc > m_detStore
StatusCode doComp(DecisionBits &decisionBits, const EventContext &ctx) const
Compare hardware and simulation.
std::unique_ptr< float[]> m_currentHdwBit
std::vector< std::vector< std::pair< unsigned, unsigned > > > getStartBits(const TrigConf::L1Menu &l1menu)
std::vector< unsigned > getCtpIds(const TrigConf::L1Menu &l1menu)
Get CTP ids from menu.
Gaudi::Property< bool > m_doMultComp
std::vector< bool > m_TopoAlgTriggerNotVetoed
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode doHwMon(DecisionBits &decisionBits, std::vector< std::vector< unsigned > > &multWeights, const EventContext &ctx) const
Monitor the Hw bits from RAW data.
std::vector< std::vector< std::pair< unsigned, unsigned > > > m_startbit
std::unique_ptr< float[]> m_overflow_rateSimNotHdw
std::unique_ptr< float[]> m_rateSimNotHdw
void resetFlags(xAOD::TrigComposite &errorFlags) const
StatusCode doHwMonCTP(DecisionBits &decisionBits, const EventContext &ctx) const
Monitor the Hw bits from CTP.
std::vector< bool > m_TopoMultTriggerNotVetoed
static constexpr size_t s_nTopoCTPOutputs
Number of CTP outputs, used for histogram ranges and loops.
std::unique_ptr< float[]> m_countSimNotHdw
Gaudi::Property< bool > m_doSimMon
std::unique_ptr< float[]> m_countHdw
Gaudi::Property< bool > m_doHwMon
Gaudi::Property< std::vector< std::string > > m_AlgorithmVetoList
std::unique_ptr< float[]> m_rateHdwAndSim
std::unique_ptr< float[]> m_overflow_countHdw
std::unique_ptr< float[]> m_rateHdwNotSim
std::unique_ptr< float[]> m_countAny
L1TopoOnlineMonitor(const std::string &name, ISvcLocator *svcLoc)
std::unique_ptr< float[]> m_currentSimBit
Gaudi::Property< bool > m_forceCTPasHdw
std::unique_ptr< float[]> m_overflow_countSim
std::unique_ptr< float[]> m_overflow_rateHdwAndSim
std::vector< unsigned > m_ctpIds
std::unique_ptr< float[]> m_overflow_rateHdwSim
SG::ReadHandleKey< xAOD::L1TopoRawDataContainer > m_l1topoRawDataKey
std::unique_ptr< float[]> m_overflow_rateHdwNotSim
std::unique_ptr< float[]> m_countSim
Gaudi::Property< std::vector< std::string > > m_MultiplicityVetoList
SG::ReadHandleKey< CTP_RDO > m_ctpRdoKey
virtual StatusCode initialize() override
initialize
virtual StatusCode start() override
std::unique_ptr< float[]> m_overflow_countHdwNotSim
SG::ReadHandleKey< xAOD::L1TopoSimResultsContainer > m_l1topoKey
Gaudi::Property< bool > m_doComp
StatusCode doSimMon(DecisionBits &decisionBits, std::vector< std::vector< unsigned > > &multWeights, const EventContext &ctx) const
Monitor the simulated bits.
std::unique_ptr< float[]> m_rateHdwSim
std::unique_ptr< float[]> m_overflow_countAny
std::unique_ptr< float[]> m_overflow_countHdwSim
StatusCode doMultComp(std::vector< std::vector< unsigned > > &multWeightsSim, std::vector< std::vector< unsigned > > &multWeightsHdw, const EventContext &ctx) const
Compare hardware and simulation for the multiplicity algorithms.
Gaudi::Property< bool > m_doHwErrorMon
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
static const std::string DEFAULT_RDOOutputLocation
location of CTP RDO output in StoreGate
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
Helper structure holding decision bitsets, passed between the monitoring methods.
static std::bitset< s_nTopoCTPOutputs > & createBits(std::optional< std::bitset< s_nTopoCTPOutputs > > &opt)
Helper method to create a new bitset and get a reference to it.
std::optional< std::bitset< s_nTopoCTPOutputs > > triggerBits
std::optional< std::bitset< s_nTopoCTPOutputs > > ambiguityBitsSim
std::optional< std::bitset< s_nTopoCTPOutputs > > overflowBitsSim
std::optional< std::bitset< s_nTopoCTPOutputs > > triggerBitsSim
std::optional< std::bitset< s_nTopoCTPOutputs > > overflowBits
std::optional< std::bitset< s_nTopoCTPOutputs > > triggerBitsCtp