ATLAS Offline Software
FeatureRequestDescriptor.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGGER_DECISION_TOOL_FEATUREREQUESTDESCRIPTOR_H
8 #define TRIGGER_DECISION_TOOL_FEATUREREQUESTDESCRIPTOR_H
9 
10 /**********************************************************************************
11  * @Project: TrigDecisionTool
12  * @Package: TrigDecisionTool
13  * @class : FeatureRequestDescriptor
14  *
15  * @brief Helper class to encapsulate all possible configuration options when making a
16  * request for trigger chain features using the TrigDecisionTool's run 3 interface.
17  *
18  ***********************************************************************************/
19 #include <string>
20 #include <sstream>
21 
22 #include "AsgMessaging/MsgStream.h"
25 
26 
27 namespace Trig {
28 
29  class FeatureRequestDescriptor {
30 
31  public:
32 
36  FeatureRequestDescriptor(const std::string& chainGroupName = "HLT_.*",
37  const unsigned int condition = TrigDefs::Physics,
38  const std::string& containerSGKey = "",
39  const unsigned int featureCollectionMode = TrigDefs::lastFeatureOfType,
40  const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
41  const int restrictToLegIndex = -1);
42 
46  FeatureRequestDescriptor(const std::string& chainGroupName);
47 
48 
52  ~FeatureRequestDescriptor() = default;
53 
58 
63 
67  void reset();
68 
72  void print(MsgStream& msg, const MSG::Level level = MSG::INFO);
73 
78  FeatureRequestDescriptor& setChainGroup(const std::string& chainGroupName);
79 
88  FeatureRequestDescriptor& setCondition(const unsigned int condition);
89 
96  FeatureRequestDescriptor& setRequireSGKey(const std::string& containerSGKey);
97 
109 
116  FeatureRequestDescriptor& setLinkName(const std::string& navElementLinkKey);
117 
123  FeatureRequestDescriptor& setRestrictRequestToLeg(const int restrictToLegIndex);
124 
128  const std::string& chainGroup() const;
129 
133  unsigned int condition() const;
134 
138  const std::string& SGKey() const;
139 
143  unsigned int featureCollectionMode() const;
144 
148  const std::string& linkName() const;
149 
153  int restrictRequestToLeg() const;
154 
155  private:
156 
157  std::string m_chainGroupName;
158  int m_condition;
159  std::string m_containerSGKey;
161  std::string m_navElementLinkKey;
163 
164  };
165 } // End of namespace
166 
167 #endif // TRIGGER_DECISION_TOOL_FEATUREREQUESTDESCRIPTOR_H
Trig::FeatureRequestDescriptor::setCondition
FeatureRequestDescriptor & setCondition(const unsigned int condition)
Set the Condition: TrigDefs::Physics - (default), only returns features from paths through the naviga...
Definition: FeatureRequestDescriptor.cxx:83
Trig::FeatureRequestDescriptor
Definition: FeatureRequestDescriptor.h:37
TrigCompositeUtils.h
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::FeatureRequestDescriptor::featureCollectionMode
unsigned int featureCollectionMode() const
Definition: FeatureRequestDescriptor.cxx:134
Trig::FeatureRequestDescriptor::m_chainGroupName
std::string m_chainGroupName
Definition: FeatureRequestDescriptor.h:173
Trig::FeatureRequestDescriptor::setChainGroup
FeatureRequestDescriptor & setChainGroup(const std::string &chainGroupName)
Set the desired Chain or Chain Group.
Definition: FeatureRequestDescriptor.cxx:77
Trig::FeatureRequestDescriptor::print
void print(MsgStream &msg, const MSG::Level level=MSG::INFO)
Print the configuration of the FeatureRequestDescriptor to the supplied message stream.
Definition: FeatureRequestDescriptor.cxx:41
Trig::FeatureRequestDescriptor::linkName
const std::string & linkName() const
Definition: FeatureRequestDescriptor.cxx:139
Trig::FeatureRequestDescriptor::FeatureRequestDescriptor
FeatureRequestDescriptor(const std::string &chainGroupName="HLT_.*", 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.
Definition: FeatureRequestDescriptor.cxx:10
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
Trig::FeatureRequestDescriptor::m_featureCollectionMode
int m_featureCollectionMode
Definition: FeatureRequestDescriptor.h:176
Trig::FeatureRequestDescriptor::condition
unsigned int condition() const
Definition: FeatureRequestDescriptor.cxx:124
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
Trig::FeatureRequestDescriptor::m_navElementLinkKey
std::string m_navElementLinkKey
Definition: FeatureRequestDescriptor.h:177
Trig::FeatureRequestDescriptor::reset
void reset()
Reset the FeatureRequestDescriptor to its default configuration.
Definition: FeatureRequestDescriptor.cxx:31
Trig::FeatureRequestDescriptor::chainGroup
const std::string & chainGroup() const
Definition: FeatureRequestDescriptor.cxx:119
Trig::FeatureRequestDescriptor::setRestrictRequestToLeg
FeatureRequestDescriptor & setRestrictRequestToLeg(const int restrictToLegIndex)
Set to -1 by default, indicating that all legs of multi-leg chains are searched.
Definition: FeatureRequestDescriptor.cxx:113
TrigCompositeUtils::featureString
const std::string & featureString()
Definition: TrigCompositeUtilsRoot.cxx:884
Trig::FeatureRequestDescriptor::m_containerSGKey
std::string m_containerSGKey
Definition: FeatureRequestDescriptor.h:175
Trig::FeatureRequestDescriptor::setRequireSGKey
FeatureRequestDescriptor & setRequireSGKey(const std::string &containerSGKey)
Set the StoreGate key filter.
Definition: FeatureRequestDescriptor.cxx:92
Trig::FeatureRequestDescriptor::setLinkName
FeatureRequestDescriptor & setLinkName(const std::string &navElementLinkKey)
Set the Link Name Key.
Definition: FeatureRequestDescriptor.cxx:107
Conditions.h
Trig::FeatureRequestDescriptor::SGKey
const std::string & SGKey() const
Definition: FeatureRequestDescriptor.cxx:129
Trig::FeatureRequestDescriptor::~FeatureRequestDescriptor
~FeatureRequestDescriptor()=default
Default destructor.
Trig::FeatureRequestDescriptor::m_condition
int m_condition
Definition: FeatureRequestDescriptor.h:174
Trig::FeatureRequestDescriptor::restrictRequestToLeg
int restrictRequestToLeg() const
Definition: FeatureRequestDescriptor.cxx:144
Trig::FeatureRequestDescriptor::m_restrictToLegIndex
int m_restrictToLegIndex
Definition: FeatureRequestDescriptor.h:178
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trig::FeatureRequestDescriptor::setFeatureCollectionMode
FeatureRequestDescriptor & setFeatureCollectionMode(const unsigned int featureCollectionMode)
Set the Feature Collection Mode: TrigDefs::lastFeatureOfType - (default) stop exploring up each path ...
Definition: FeatureRequestDescriptor.cxx:98
MsgStream.h