ATLAS Offline Software
StreamTagMakerTool.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_STREAMTAGMAKERTOOL_H
5 #define TRIGOUTPUTHANDLING_STREAMTAGMAKERTOOL_H
6 
7 // Trigger includes
8 #include "TrigConfData/HLTMenu.h"
11 #include "TrigPartialEventBuilding/PEBInfoWriterToolBase.h" // Defines PEBInfo and keys to retrieve it
12 
13 // Athena includes
15 
16 // System includes
17 #include <string>
18 #include <unordered_map>
19 #include <tuple>
20 
25 class StreamTagMakerTool : public extends<AthAlgTool, HLTResultMTMakerTool> {
26 public:
27  StreamTagMakerTool(const std::string& type, const std::string& name, const IInterface* parent);
28  virtual ~StreamTagMakerTool() override = default;
29 
30  virtual StatusCode fill( HLT::HLTResultMT& resultToFill, const EventContext& ctx ) const override;
31 
32  virtual StatusCode initialize() override;
33  virtual StatusCode start() override;
34 
36  using StreamTagInfo = std::tuple<std::string, std::string, bool, bool>;
37 
38 private:
39  SG::ReadHandleKey<TrigConf::HLTMenu> m_hltMenuKey{"DetectorStore+HLTTriggerMenu"};
40 
42  "Container with final chain decisions" };
43 
45  "Decisions including PEBInfo" };
46 
48  std::unordered_map<TrigCompositeUtils::DecisionID, std::vector<StreamTagInfo> > m_mapping;
49 
51  StatusCode fillPEBInfoMap(std::unordered_map<TrigCompositeUtils::DecisionID, PEBInfoWriterToolBase::PEBInfo>& map, const EventContext& ctx) const;
52 };
53 
54 
55 #endif // TRIGOUTPUTHANDLING_STREAMTAGMAKERTOOL_H
StreamTagMakerTool::StreamTagMakerTool
StreamTagMakerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: StreamTagMakerTool.cxx:24
StreamTagMakerTool::fill
virtual StatusCode fill(HLT::HLTResultMT &resultToFill, const EventContext &ctx) const override
Definition: StreamTagMakerTool.cxx:96
StreamTagMakerTool::m_pebDecisionKeys
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_pebDecisionKeys
Definition: StreamTagMakerTool.h:44
TrigCompositeUtils.h
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
HLT::HLTResultMT
A container class for data required to build online output from HLT.
Definition: HLTResultMT.h:38
SG::ReadHandleKey< TrigConf::HLTMenu >
StreamTagMakerTool::StreamTagInfo
std::tuple< std::string, std::string, bool, bool > StreamTagInfo
Type describing StreamTag information needed by the tool: {name, type, obeysLumiBlock,...
Definition: StreamTagMakerTool.h:36
PEBInfoWriterToolBase.h
StreamTagMakerTool::initialize
virtual StatusCode initialize() override
Definition: StreamTagMakerTool.cxx:29
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
HLTResultMTMakerTool.h
StreamTagMakerTool::m_mapping
std::unordered_map< TrigCompositeUtils::DecisionID, std::vector< StreamTagInfo > > m_mapping
Chain to streams map filled from the HLT Menu JSON.
Definition: StreamTagMakerTool.h:48
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
StreamTagMakerTool::m_finalChainDecisions
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_finalChainDecisions
Definition: StreamTagMakerTool.h:41
StreamTagMakerTool::~StreamTagMakerTool
virtual ~StreamTagMakerTool() override=default
StreamTagMakerTool
Makes stream tags out of chain decisions.
Definition: StreamTagMakerTool.h:25
StreamTagMakerTool::fillPEBInfoMap
StatusCode fillPEBInfoMap(std::unordered_map< TrigCompositeUtils::DecisionID, PEBInfoWriterToolBase::PEBInfo > &map, const EventContext &ctx) const
Helper method to fill the chainID->PEBInfo map.
Definition: StreamTagMakerTool.cxx:187
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
StreamTagMakerTool::m_hltMenuKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuKey
Definition: StreamTagMakerTool.h:39
HLTMenu.h
StreamTagMakerTool::start
virtual StatusCode start() override
Definition: StreamTagMakerTool.cxx:39