ATLAS Offline Software
DecisionSummaryMakerAlg.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 TRIGOUTPUTHANDLING_DECISIONSUMMARYMAKERALG_H
5 #define TRIGOUTPUTHANDLING_DECISIONSUMMARYMAKERALG_H
6 
8 #include "TrigConfData/HLTMenu.h"
12 
13 #include <string>
14 #include <vector>
15 #include <unordered_map>
16 
17 
24 public:
25  DecisionSummaryMakerAlg(const std::string& name, ISvcLocator* pSvcLocator);
26  virtual ~DecisionSummaryMakerAlg() override = default;
27 
28  virtual StatusCode initialize() override;
29  virtual StatusCode start() override;
30  virtual StatusCode execute(const EventContext& context) const override;
31  virtual StatusCode finalize() override;
32 
33 private:
35  void monitorRoIs(const TrigCompositeUtils::Decision* terminusNode) const;
36 
37  SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_summaryKey{ this, "DecisionsSummaryKey", "HLTNav_Summary",
38  "Location of final decision" };
39 
41  "Final stage of all decisions" };
42 
43  SG::WriteHandleKey<std::vector<std::string>> m_streamsSummaryKey{ this, "StreamsSummaryKey", "HLTStreamsSummary",
44  "Set of streams accepted in the event"};
45 
46  SG::ReadHandleKey<xAOD::TrigCompositeContainer> m_hltSeedingSummaryKey { this, "HLTSeedingSummaryKey", "HLTSeedingSummary",
47  "Chains status after L1 and prescaling" };
48 
49  SG::ReadHandleKey<TrigConf::HLTMenu> m_hltMenuKey{this, "HLTMenuKey", "DetectorStore+HLTTriggerMenu",
50  "HLT Menu"};
51 
52  ToolHandle<IPrescalingTool> m_prescaler{this, "Prescaler", "PrescalingTool/PrescalingTool",
53  "Prescaling tool used to determine express stream prescale decisions"};
54 
55  ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "",
56  "Monitoring tool" };
57 
58  Gaudi::Property< std::map< std::string, std::vector<std::string> > > m_lastStepForChain{ this, "FinalStepDecisions", {},
59  "The map of chain name to names of the collections in which the final decision is found" };
60 
61  Gaudi::Property<bool> m_warnOnLargeRoIUpdates{this, "WarnOnLargeRoIUpdates", true,
62  "Print warnings from RoI update monitoring if the difference between initial and final RoI is large"};
63 
64  Gaudi::Property<bool> m_setFilterStatus{this, "SetFilterStatus", false,
65  "Enables chain-passed filter. This will cause the downstream EDMCreator to not run if no chains pass, saving CPU in rejected events. "
66  "Cannot be used in jobs producing RDO output."};
67 
68  std::map<std::string, TrigCompositeUtils::DecisionIDContainer> m_collectionFilter;
69 
71  std::unordered_map<TrigCompositeUtils::DecisionID, std::vector<std::string>> m_chainToStreamsMap;
72 };
73 
74 #endif // TRIGOUTPUTHANDLING_DECISIONSUMMARYMAKERALG_H
DecisionSummaryMakerAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: DecisionSummaryMakerAlg.h:55
DecisionSummaryMakerAlg::m_streamsSummaryKey
SG::WriteHandleKey< std::vector< std::string > > m_streamsSummaryKey
Definition: DecisionSummaryMakerAlg.h:43
DecisionSummaryMakerAlg::start
virtual StatusCode start() override
Definition: DecisionSummaryMakerAlg.cxx:43
DecisionSummaryMakerAlg::m_warnOnLargeRoIUpdates
Gaudi::Property< bool > m_warnOnLargeRoIUpdates
Definition: DecisionSummaryMakerAlg.h:61
DecisionSummaryMakerAlg::m_summaryKey
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_summaryKey
Definition: DecisionSummaryMakerAlg.h:37
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DecisionSummaryMakerAlg::execute
virtual StatusCode execute(const EventContext &context) const override
Definition: DecisionSummaryMakerAlg.cxx:61
DecisionSummaryMakerAlg::~DecisionSummaryMakerAlg
virtual ~DecisionSummaryMakerAlg() override=default
DecisionSummaryMakerAlg::m_setFilterStatus
Gaudi::Property< bool > m_setFilterStatus
Definition: DecisionSummaryMakerAlg.h:64
IPrescalingTool.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
DecisionSummaryMakerAlg::m_collectionFilter
std::map< std::string, TrigCompositeUtils::DecisionIDContainer > m_collectionFilter
Definition: DecisionSummaryMakerAlg.h:68
TrigCompositeUtils.h
DecisionSummaryMakerAlg::m_prescaler
ToolHandle< IPrescalingTool > m_prescaler
Definition: DecisionSummaryMakerAlg.h:52
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DecisionSummaryMakerAlg::DecisionSummaryMakerAlg
DecisionSummaryMakerAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: DecisionSummaryMakerAlg.cxx:17
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
DecisionSummaryMakerAlg::m_chainToStreamsMap
std::unordered_map< TrigCompositeUtils::DecisionID, std::vector< std::string > > m_chainToStreamsMap
Chain to streams map filled from the HLT Menu JSON.
Definition: DecisionSummaryMakerAlg.h:71
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
DecisionSummaryMakerAlg
Definition: DecisionSummaryMakerAlg.h:23
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DecisionSummaryMakerAlg::m_lastStepForChain
Gaudi::Property< std::map< std::string, std::vector< std::string > > > m_lastStepForChain
Definition: DecisionSummaryMakerAlg.h:58
DecisionSummaryMakerAlg::m_finalDecisionKeys
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_finalDecisionKeys
Definition: DecisionSummaryMakerAlg.h:40
DecisionSummaryMakerAlg::initialize
virtual StatusCode initialize() override
Definition: DecisionSummaryMakerAlg.cxx:20
DecisionSummaryMakerAlg::m_hltSeedingSummaryKey
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_hltSeedingSummaryKey
Definition: DecisionSummaryMakerAlg.h:46
DecisionSummaryMakerAlg::finalize
virtual StatusCode finalize() override
Definition: DecisionSummaryMakerAlg.cxx:57
HLTMenu.h
DecisionSummaryMakerAlg::monitorRoIs
void monitorRoIs(const TrigCompositeUtils::Decision *terminusNode) const
Monitor RoI updates between initial and final RoI.
Definition: DecisionSummaryMakerAlg.cxx:213
DecisionSummaryMakerAlg::m_hltMenuKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuKey
Definition: DecisionSummaryMakerAlg.h:49