ATLAS Offline Software
Loading...
Searching...
No Matches
TrigAnalysisHelpers/TrigAnalysisHelpers/FeatureRequestDescriptor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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#include <string>
17#include <sstream>
18#include <regex>
19
23
24namespace Trig {
25
27
28 public:
29
35 FeatureRequestDescriptor(const std::string& chainGroupName = "",
36 const unsigned int condition = TrigDefs::Physics,
37 const std::string& containerSGKey = "",
39 const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
40 const int restrictToLegIndex = -1);
41
46
51
56
60 void reset();
61
65 void print(MsgStream& msg, const MSG::Level level = MSG::INFO);
66
72 FeatureRequestDescriptor& setChainGroup(const std::string& chainGroupName);
73
83
90 FeatureRequestDescriptor& setRequireSGKey(const std::string& containerSGKey);
91
103
110 FeatureRequestDescriptor& setLinkName(const std::string& navElementLinkKey);
111
117 FeatureRequestDescriptor& setRestrictRequestToLeg(const int restrictToLegIndex);
118
122 const std::string& chainGroup() const;
123
127 unsigned int condition() const;
128
132 const std::string& SGKey() const;
133
137 const std::regex& SGKeyExpression() const;
138
142 unsigned int featureCollectionMode() const;
143
147 const std::string& linkName() const;
148
152 int restrictRequestToLeg() const;
153
154 private:
155
156 std::string m_chainGroupName;
158 std::string m_containerSGKey;
163
164 };
165} // End of namespace
166
167#endif // TRIGANALYSISHELPERS_FEATUREREQUESTDESCRIPTOR_H
FeatureRequestDescriptor(const std::string &chainGroupName="", const unsigned int condition=TrigDefs::Physics, const std::string &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 & setChainGroup(const std::string &chainGroupName)
Set the desired Chain or Chain Group.
~FeatureRequestDescriptor()=default
Default destructor.
const std::regex & SGKeyExpression() const
FeatureRequestDescriptor(const FeatureRequestDescriptor &)=default
Default copy constructor.
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.
FeatureRequestDescriptor & setRequireSGKey(const std::string &containerSGKey)
Set the StoreGate key filter.
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