ATLAS Offline Software
L1DataConsistencyChecker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef HLTSEEDING_L1DATACONSISTENCYCHECKER_H
5 #define HLTSEEDING_L1DATACONSISTENCYCHECKER_H
6 
7 // Trigger includes
9 #include "TrigConfData/HLTMenu.h"
10 #include "TrigConfData/L1Menu.h"
12 
13 // Athena includes
17 
23 public:
24  L1DataConsistencyChecker(const std::string& type, const std::string& name, const IInterface* parent)
25  : AthAlgTool(type, name, parent) {}
26 
28  // @{
29  virtual StatusCode initialize() override;
30  virtual StatusCode start() override;
31  // @}
32 
34  StatusCode consistencyCheck(const HLT::IDVec& l1SeededChains, const EventContext& ctx) const;
35 
36 private:
38  this, "HLTMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu"};
40  this, "L1Menu", "DetectorStore+L1TriggerMenu", "L1 Menu"};
41 
42  ToolHandle<GenericMonitoringTool> m_monTool {
43  this, "MonTool", "", "Monitoring tool"};
44 
45  Gaudi::Property<bool> m_errorOnMissingTOB {
46  this, "ErrorOnMissingTOB", true, "Set to true to enable strict-mode which will generate an ERROR on missing (non-overflow) TOB events in HLT-seeding from L1"};
47 
48  Gaudi::Property<std::map<std::string,std::string>> m_thresholdToDecisionMap {
49  this, "ThresholdToDecisionMap", {}, "Map between L1 threshold type and the corresponding DecisionContainer name"};
50 
51  Gaudi::Property<std::vector<std::string>> m_excludedThresholdTypes {
52  this, "ExcludedThresholdTypes", {
53  "internal", // internal to CTP (randoms)
54  "TOPO", "R2TOPO", "ZBTopo", "LArSat", // topo (data not used in HLTSeeding)
55  "TE", "XE", "XS", "jTE", "jXE", "gTE", "gXE", // energy (data not used in HLTSeeding)
56  "ALFA", "BCM", "BCMCMB", "BPTX", "CALREQ", "LUCID", "MBTS", "MBTSSI", "NIM", "ZDC", "NSWMon" // direct signals from detectors to CTP (no TOB readout)
57  },
58  "L1 threshold types which are not subject to the consistency check "
59  "(because either there are no corresponding TOBs or HLT doesn't use them)"};
60 
61  using MultiplicityInfo = std::unordered_map<TrigCompositeUtils::DecisionID, unsigned int>; //< {L1ThresholdHash, multiplicity}
62  std::unordered_map<TrigCompositeUtils::DecisionID, MultiplicityInfo> m_thresholdMap; //< {HLTChainHash, MultiplicityInfo}
63  std::unordered_map<TrigCompositeUtils::DecisionID, std::string> m_thresholdNames; //< {L1ThresholdHash, L1ThresholdName}
64  std::unordered_map<TrigCompositeUtils::DecisionID, std::string> m_thresholdTypes; //< {L1ThresholdHash, L1ThresholdType}
65  std::set<TrigCompositeUtils::DecisionID> m_monitoredThresholds;
66 
68  bool doDebug() const {return ATH_UNLIKELY(msgLevel(MSG::DEBUG));}
69 };
70 
71 #endif // HLTSEEDING_L1DATACONSISTENCYCHECKER_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
L1DataConsistencyChecker::m_thresholdNames
std::unordered_map< TrigCompositeUtils::DecisionID, std::string > m_thresholdNames
Definition: L1DataConsistencyChecker.h:63
L1DataConsistencyChecker::m_hltMenuKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuKey
Definition: L1DataConsistencyChecker.h:37
L1DataConsistencyChecker::start
virtual StatusCode start() override
Definition: L1DataConsistencyChecker.cxx:36
L1DataConsistencyChecker::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: L1DataConsistencyChecker.h:42
ATH_UNLIKELY
#define ATH_UNLIKELY(x)
Definition: AthUnlikelyMacros.h:17
SG::ReadHandleKey< TrigConf::HLTMenu >
L1DataConsistencyChecker
Checks the consistency between CTP active items and L1 RoIs (TOBs) received from RoIB/readout.
Definition: L1DataConsistencyChecker.h:22
L1DataConsistencyChecker::m_thresholdTypes
std::unordered_map< TrigCompositeUtils::DecisionID, std::string > m_thresholdTypes
Definition: L1DataConsistencyChecker.h:64
L1DataConsistencyChecker::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: L1DataConsistencyChecker.h:39
GenericMonitoringTool.h
HLT::IDVec
std::vector< HLT::Identifier > IDVec
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:62
L1DataConsistencyChecker::m_errorOnMissingTOB
Gaudi::Property< bool > m_errorOnMissingTOB
Definition: L1DataConsistencyChecker.h:45
L1DataConsistencyChecker::m_thresholdMap
std::unordered_map< TrigCompositeUtils::DecisionID, MultiplicityInfo > m_thresholdMap
Definition: L1DataConsistencyChecker.h:62
L1DataConsistencyChecker::m_thresholdToDecisionMap
Gaudi::Property< std::map< std::string, std::string > > m_thresholdToDecisionMap
Definition: L1DataConsistencyChecker.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
L1DataConsistencyChecker::MultiplicityInfo
std::unordered_map< TrigCompositeUtils::DecisionID, unsigned int > MultiplicityInfo
Definition: L1DataConsistencyChecker.h:61
TrigCompositeContainer.h
L1DataConsistencyChecker::initialize
virtual StatusCode initialize() override
Definition: L1DataConsistencyChecker.cxx:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
L1DataConsistencyChecker::doDebug
bool doDebug() const
Shorter alias for a check whether we are in DEBUG logging mode.
Definition: L1DataConsistencyChecker.h:68
L1DataConsistencyChecker::consistencyCheck
StatusCode consistencyCheck(const HLT::IDVec &l1SeededChains, const EventContext &ctx) const
Perform the check and fill the corresponding histograms.
Definition: L1DataConsistencyChecker.cxx:84
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
L1DataConsistencyChecker::m_excludedThresholdTypes
Gaudi::Property< std::vector< std::string > > m_excludedThresholdTypes
Definition: L1DataConsistencyChecker.h:51
HLTIdentifier.h
HLTMenu.h
L1DataConsistencyChecker::m_monitoredThresholds
std::set< TrigCompositeUtils::DecisionID > m_monitoredThresholds
Definition: L1DataConsistencyChecker.h:65
AthAlgTool
Definition: AthAlgTool.h:26
L1Menu.h
L1DataConsistencyChecker::L1DataConsistencyChecker
L1DataConsistencyChecker(const std::string &type, const std::string &name, const IInterface *parent)
Definition: L1DataConsistencyChecker.h:24