ATLAS Offline Software
Loading...
Searching...
No Matches
HLTResultMTMaker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGOUTPUTHANDLING_HLTRESULTMTMAKER_H
6#define TRIGOUTPUTHANDLING_HLTRESULTMTMAKER_H
7
8// Trigger includes
11
12// Athena includes
19
20// Gaudi includes
21#include "Gaudi/Interfaces/IOptionsSvc.h"
22
23// System includes
24#include <atomic>
25
30public:
32 HLTResultMTMaker(const std::string& type, const std::string& name, const IInterface* parent);
34 virtual ~HLTResultMTMaker() override = default;
35
36 // ------------------------- IStateful methods -------------------------------
37 virtual StatusCode initialize() override;
38 virtual StatusCode start() override;
39 virtual StatusCode finalize() override;
40
41 // ------------------------- Specific methods of this tool -------------------
43 StatusCode makeResult(const EventContext& eventContext) const;
45 StatusCode fillResult(HLT::HLTResultMT& hltResult, const EventContext& eventContext) const;
47 const std::string& resultName() const {return m_hltResultWHKey.key();}
48
49private:
50 // ------------------------- Methods -----------------------------------------
52 void validatePEBInfo(HLT::HLTResultMT& hltResult) const;
54 StatusCode validateExtraROBsAndSubDets();
55
56 // ------------------------- Properties --------------------------------------
59 this, "HLTResultWHKey", "HLTResultMT",
60 "Key of the output HLTResultMT object"
61 };
62
64 this, "HLTRuntimeMetadataWHKey", "HLT_RuntimeMetadata",
65 "Key of the output with additional runtime metadata" };
66
68 this, "ByteStreamMetadataRHKey", "InputMetaDataStore+ByteStreamMetadata",
69 "Key of the ByteStreamMetadataContainer to retrieve the detector mask"
70 };
71
72 ToolHandle<HLTResultMTMakerTool> m_streamTagMaker {
73 this, "StreamTagMaker", "",
74 "Tool creating stream tags (defines if event is accepted)"
75 };
76
77 ToolHandleArray<HLTResultMTMakerTool> m_makerTools {
78 this, "MakerTools", {},
79 "Set of additional tools that fill content of the HLTResultMT"
80 };
81
82 ToolHandle<GenericMonitoringTool> m_monTool {
83 this, "MonTool", "",
84 "Monitoring tool"
85 };
86
88 this, "JobOptionsSvc", "JobOptionsSvc",
89 "Job options service to retrieve DataFlowConfig"
90 };
91
92 Gaudi::Property<std::vector<uint32_t>> m_extraEnabledROBs {
93 this, "ExtraEnabledROBs", {},
94 "Extra ROBs which can be requested in a stream tag, but are not part of the ROS-ROB map"
95 };
96
97 Gaudi::Property<std::vector<uint32_t>> m_extraROBs {
98 this, "ExtraROBs", {},
99 "Same as ExtraEnabledROBs but checked against detector mask and dropped if SubDet is masked out"
100 };
101
102 Gaudi::Property<std::vector<uint32_t>> m_extraEnabledSubDets {
103 this, "ExtraEnabledSubDets", {},
104 "Extra SubDets which can be requested in a stream tag, but are not part of the ROS-ROB map"
105 };
106
107 Gaudi::Property<std::vector<uint32_t>> m_extraSubDets {
108 this, "ExtraSubDets", {},
109 "Same as ExtraEnabledSubDets but checked against detector mask and dropped if SubDet is masked out"
110 };
111
112 // ------------------------- Other private members ---------------------------
114 std::set<uint32_t> m_enabledROBs;
116 std::set<eformat::SubDetector> m_enabledSubDets;
120 mutable std::atomic_bool m_emptyPEBInfoErrorPrinted{false};
121};
122
123#endif // TRIGOUTPUTHANDLING_HLTRESULTMTMAKER_H
This file contains the class definition for the ByteStreamMetadataContainer class.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual StatusCode start() override
Gaudi::Property< std::vector< uint32_t > > m_extraEnabledROBs
Extra enabled ROBs.
HLTResultMTMaker(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Gaudi::Property< std::vector< uint32_t > > m_extraROBs
Extra enabled ROBs checked against detector mask.
ToolHandle< GenericMonitoringTool > m_monTool
Monitoring tool.
Gaudi::Property< std::vector< uint32_t > > m_extraSubDets
Extra enabled SubDets checked against detector mask.
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_runtimeMetadataWHKey
StoreGate key for HLT Runtime Metadata container.
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc
Handle to JobOptionsSvc used to retrieve the DataFlowConfig property.
bool m_skipValidatePEBInfo
If true, don't call validatePEBInfo.
void validatePEBInfo(HLT::HLTResultMT &hltResult) const
Check ROB and SubDet lists in StreamTags and remove those which are disabled.
ToolHandleArray< HLTResultMTMakerTool > m_makerTools
Tools filling the HLTResultMT object.
SG::ReadHandleKey< ByteStreamMetadataContainer > m_bsMetaDataContRHKey
StoreGate key for the ByteStreamMetadata container to retrieve detector mask.
virtual ~HLTResultMTMaker() override=default
Standard destructor.
StatusCode fillResult(HLT::HLTResultMT &hltResult, const EventContext &eventContext) const
Fill an existing HLTResultMT with event information.
SG::WriteHandleKey< HLT::HLTResultMT > m_hltResultWHKey
StoreGate key for the HLTResultMT.
StatusCode makeResult(const EventContext &eventContext) const
Create and fill a new HLTResultMT, and record it in the event store.
virtual StatusCode finalize() override
virtual StatusCode initialize() override
std::set< uint32_t > m_enabledROBs
List of enabled ROBs retrieved during initialisation.
Gaudi::Property< std::vector< uint32_t > > m_extraEnabledSubDets
Extra enabled SubDets.
StatusCode validateExtraROBsAndSubDets()
Check ExtraROBs and ExtraSubDets against the detector mask and drop the masked out IDs.
const std::string & resultName() const
Return name of the HLTResultMT.
ToolHandle< HLTResultMTMakerTool > m_streamTagMaker
Tool creating stream tags (defines if event is accepted)
std::set< eformat::SubDetector > m_enabledSubDets
List of enabled SubDets retrieved during initialisation.
std::atomic_bool m_emptyPEBInfoErrorPrinted
Flag if empty PEB list error was already printed.
A container class for data required to build online output from HLT.
Definition HLTResultMT.h:38
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.