ATLAS Offline Software
Loading...
Searching...
No Matches
TrigAnalysisHelpers/TrigAnalysisHelpers/FeatureRequestDescriptor.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 TRIGANALYSISHELPERS_FEATUREREQUESTDESCRIPTOR_H
6#define TRIGANALYSISHELPERS_FEATUREREQUESTDESCRIPTOR_H
7
8/**********************************************************************************
9 * @Package: TrigAnalysisHelpers
10 * @class : FeatureRequestDescriptor
11 *
12 * @brief Helper class to encapsulate all possible configuration options when making a
13 * request for trigger chain features using the TrigDecisionTool's run 3 interface.
14 *
15 ***********************************************************************************/
16
17
21#include <string>
22#include <string_view>
23#include <sstream>
24#include <regex>
25
26namespace Trig {
27
29
30 public:
31
37 FeatureRequestDescriptor(std::string_view chainGroupName = "",
38 const unsigned int condition = TrigDefs::Physics,
39 std::string_view containerSGKey = "",
41 const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
42 const int restrictToLegIndex = -1);
43
48
53
58
62 void reset();
63
67 void print(MsgStream& msg, const MSG::Level level = MSG::INFO);
68
74 FeatureRequestDescriptor& setChainGroup(std::string_view chainGroupName);
75
85
92 FeatureRequestDescriptor& setRequireSGKey(std::string_view containerSGKey);
93
105
112 FeatureRequestDescriptor& setLinkName(const std::string& navElementLinkKey);
113
119 FeatureRequestDescriptor& setRestrictRequestToLeg(const int restrictToLegIndex);
120
124 const std::string& chainGroup() const;
125
129 unsigned int condition() const;
130
134 const std::string& SGKey() const;
135
139 const std::regex& SGKeyExpression() const;
140
144 unsigned int featureCollectionMode() const;
145
149 const std::string& linkName() const;
150
154 int restrictRequestToLeg() const;
155
156 private:
157
158 std::string m_chainGroupName;
160 std::string m_containerSGKey;
165
166 };
167} // End of namespace
168
169#endif // TRIGANALYSISHELPERS_FEATUREREQUESTDESCRIPTOR_H
FeatureRequestDescriptor(std::string_view chainGroupName="", const unsigned int condition=TrigDefs::Physics, std::string_view containerSGKey="", const unsigned int featureCollectionMode=TrigDefs::lastFeatureOfType, const std::string &navElementLinkKey=TrigCompositeUtils::featureString(), const int restrictToLegIndex=-1)
Default Constructor supplying all properties except for the chain group.
FeatureRequestDescriptor & setCondition(const unsigned int condition)
Set the Condition: TrigDefs::Physics - (default), only returns features from paths through the naviga...
void reset()
Reset the FeatureRequestDescriptor to its default configuration.
FeatureRequestDescriptor & setLinkName(const std::string &navElementLinkKey)
Set the Link Name Key.
FeatureRequestDescriptor & setFeatureCollectionMode(const unsigned int featureCollectionMode)
Set the Feature Collection Mode: TrigDefs::lastFeatureOfType - (default) stop exploring up each path ...
FeatureRequestDescriptor & setRequireSGKey(std::string_view containerSGKey)
Set the StoreGate key filter.
~FeatureRequestDescriptor()=default
Default destructor.
const std::regex & SGKeyExpression() const
FeatureRequestDescriptor(const FeatureRequestDescriptor &)=default
Default copy constructor.
FeatureRequestDescriptor & setChainGroup(std::string_view chainGroupName)
Set the desired Chain or Chain Group.
FeatureRequestDescriptor & setRestrictRequestToLeg(const int restrictToLegIndex)
Set to -1 by default, indicating that all legs of multi-leg chains are searched.
FeatureRequestDescriptor(FeatureRequestDescriptor &&)=default
Default move constructor.
void print(MsgStream &msg, const MSG::Level level=MSG::INFO)
Print the configuration of the FeatureRequestDescriptor to the supplied message stream.
const std::string & featureString()
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
The common trigger namespace for trigger analysis tools.
MsgStream & msg
Definition testRead.cxx:32