ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAlgorithms
TrigPartialEventBuilding
TrigPartialEventBuilding
PEBInfoWriterToolBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TrigPartialEventBuilding_PEBInfoWriterToolBase_h
6
#define TrigPartialEventBuilding_PEBInfoWriterToolBase_h
7
8
// Trigger includes
9
#include "
TrigCompositeUtils/HLTIdentifier.h
"
10
#include "
TrigCompositeUtils/TrigCompositeUtils.h
"
11
#include "
TrigSteeringEvent/TrigRoiDescriptorCollection.h
"
12
13
// Athena includes
14
#include "
AthenaBaseComps/AthAlgTool.h
"
15
16
#include <cstdint>
17
23
class
PEBInfoWriterToolBase
:
public
AthAlgTool
{
24
public
:
25
// ------------------------- Public types ------------------------------------
27
struct
Input
{
28
Input
(
TrigCompositeUtils::Decision
* d,
29
const
EventContext& ctx,
30
const
ElementLink<TrigRoiDescriptorCollection>
&
r
,
31
const
TrigCompositeUtils::Decision
* pd,
32
const
uint8_t
tt
)
33
:
decision
(d),
34
eventContext
(ctx),
35
roiEL
(
r
),
36
previousDecisionIDs
(
TrigCompositeUtils
::
decisionIDs
(pd).begin(),
TrigCompositeUtils
::
decisionIDs
(pd).end()),
37
tt
(
tt
)
38
{}
39
TrigCompositeUtils::Decision
*
decision
;
40
const
EventContext&
eventContext
;
41
const
ElementLink<TrigRoiDescriptorCollection>
roiEL
;
42
const
TrigCompositeUtils::DecisionIDContainer
previousDecisionIDs
;
43
const
uint8_t
tt
;
44
};
45
46
struct
PEBInfo
{
47
std::set<uint32_t>
robs
;
48
std::set<uint32_t>
subdets
;
// uint8_t is sufficient to represent eformat::SubDetector, but uint32_t makes the
49
// implementation and bookkeeping easier
50
};
51
52
// ------------------------- Public methods ----------------------------------
54
PEBInfoWriterToolBase
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent);
56
virtual
~PEBInfoWriterToolBase
();
57
59
StatusCode
decide
(
const
EventContext& ctx, std::vector<Input>& inputs)
const
;
61
HLT::Identifier
id
()
const
{
return
m_decisionId
;}
63
static
std::string
robListKey
() {
return
"PEBROBList"
;}
65
static
std::string
subDetListKey
() {
return
"PEBSubDetList"
;}
66
67
protected
:
69
virtual
PEBInfo
createPEBInfo
(
const
EventContext& ctx,
const
Input
& input)
const
= 0;
71
Gaudi::Property<int>
m_maxRoIs
{
72
this
,
"MaxRoIs"
, -1,
"Create PEB list only for the first N RoIs from input decisions (<0 means no limit)"
73
};
74
75
Gaudi::Property<std::vector<unsigned int>>
m_matchTriggerType
{
76
this
,
"MatchTriggerType"
, {},
"L1 trigger type to match"
77
};
78
79
private
:
81
HLT::Identifier
m_decisionId
;
82
};
83
84
std::ostream&
operator<<
(std::ostream&
str
,
const
PEBInfoWriterToolBase::PEBInfo
& pebi);
85
86
#endif
// TrigPartialEventBuilding_PEBInfoWriterToolBase_h
AthAlgTool.h
decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &id)
Extracts DecisionIDs stored in the Decision object.
Definition
TrigCompositeUtilsRoot.cxx:65
operator<<
std::ostream & operator<<(std::ostream &str, const PEBInfoWriterToolBase::PEBInfo &pebi)
Definition
PEBInfoWriterToolBase.cxx:102
HLTIdentifier.h
TrigCompositeUtils.h
TrigRoiDescriptorCollection.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
HLT::Identifier
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
PEBInfoWriterToolBase::~PEBInfoWriterToolBase
virtual ~PEBInfoWriterToolBase()
Standard destructor.
Definition
PEBInfoWriterToolBase.cxx:28
PEBInfoWriterToolBase::createPEBInfo
virtual PEBInfo createPEBInfo(const EventContext &ctx, const Input &input) const =0
Creates the PEBInfo which is attached to the decision in decide. Has to be implemented by the derived...
PEBInfoWriterToolBase::m_matchTriggerType
Gaudi::Property< std::vector< unsigned int > > m_matchTriggerType
Definition
PEBInfoWriterToolBase.h:75
PEBInfoWriterToolBase::m_decisionId
HLT::Identifier m_decisionId
The decision id of the tool instance.
Definition
PEBInfoWriterToolBase.h:81
PEBInfoWriterToolBase::decide
StatusCode decide(const EventContext &ctx, std::vector< Input > &inputs) const
Adds a pass-through decision with attached PEB information created by createPEBInfo for each input.
Definition
PEBInfoWriterToolBase.cxx:32
PEBInfoWriterToolBase::robListKey
static std::string robListKey()
Returns the key used to record/retrieve the ROB list.
Definition
PEBInfoWriterToolBase.h:63
PEBInfoWriterToolBase::subDetListKey
static std::string subDetListKey()
Returns the key used to record/retrieve the SubDet list.
Definition
PEBInfoWriterToolBase.h:65
PEBInfoWriterToolBase::id
HLT::Identifier id() const
Returns the decision id.
Definition
PEBInfoWriterToolBase.h:61
PEBInfoWriterToolBase::m_maxRoIs
Gaudi::Property< int > m_maxRoIs
MaxRoIs property.
Definition
PEBInfoWriterToolBase.h:71
PEBInfoWriterToolBase::PEBInfoWriterToolBase
PEBInfoWriterToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
PEBInfoWriterToolBase.cxx:22
r
int r
Definition
globals.cxx:22
TrigCompositeUtils
Definition
TrigComposite.h:19
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition
TrigComposite.h:20
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition
TrigComposite_v1.h:28
str
Definition
BTagTrackIpAccessor.cxx:11
type
PEBInfoWriterToolBase::Input
Input to the tool's decide method.
Definition
PEBInfoWriterToolBase.h:27
PEBInfoWriterToolBase::Input::Input
Input(TrigCompositeUtils::Decision *d, const EventContext &ctx, const ElementLink< TrigRoiDescriptorCollection > &r, const TrigCompositeUtils::Decision *pd, const uint8_t tt)
Definition
PEBInfoWriterToolBase.h:28
PEBInfoWriterToolBase::Input::tt
const uint8_t tt
Definition
PEBInfoWriterToolBase.h:43
PEBInfoWriterToolBase::Input::roiEL
const ElementLink< TrigRoiDescriptorCollection > roiEL
Definition
PEBInfoWriterToolBase.h:41
PEBInfoWriterToolBase::Input::eventContext
const EventContext & eventContext
Definition
PEBInfoWriterToolBase.h:40
PEBInfoWriterToolBase::Input::previousDecisionIDs
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs
Definition
PEBInfoWriterToolBase.h:42
PEBInfoWriterToolBase::Input::decision
TrigCompositeUtils::Decision * decision
Definition
PEBInfoWriterToolBase.h:39
PEBInfoWriterToolBase::PEBInfo
Structure holding the list of ROBs and SubDets.
Definition
PEBInfoWriterToolBase.h:46
PEBInfoWriterToolBase::PEBInfo::robs
std::set< uint32_t > robs
Definition
PEBInfoWriterToolBase.h:47
PEBInfoWriterToolBase::PEBInfo::subdets
std::set< uint32_t > subdets
Definition
PEBInfoWriterToolBase.h:48
Generated on
for ATLAS Offline Software by
1.17.0