ATLAS Offline Software
HLTSequence.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigConf_HLTSequence
6 #define TrigConf_HLTSequence
7 
9 
10 #include <iosfwd>
11 #include <fstream>
12 #include <string>
13 #include <vector>
14 
15 namespace TrigConf {
16 
17  class HLTSequence;
18  class HLTTriggerElement;
19  class DiffStruct;
20  std::ostream & operator<<(std::ostream &, const HLTSequence &);
21 
28  class HLTSequence : public TrigConfData {
29  public:
30 
32  HLTSequence();
33 
40  HLTSequence( const std::vector<HLTTriggerElement*>& inputTEs,
42  const std::vector<std::string>& algorithms);
43 
45  ~HLTSequence();
46 
47  // accessors
48  std::vector<HLTTriggerElement*>& inputTEs() { return m_inputTEs; }
50  std::vector<std::string>& algorithms() { return m_algorithms; }
52 
53  const std::vector<HLTTriggerElement*>& inputTEs() const { return m_inputTEs; }
54  const HLTTriggerElement* outputTE() const { return m_outputTE; }
55  const std::vector<std::string>& algorithms() const { return m_algorithms; }
56  const HLTTriggerElement* topoStartTE() const { return m_topoStartTE; }
57  unsigned int hashId() const;
58 
59  void set_inputTEs ( std::vector<HLTTriggerElement*>& inputTEs ) { m_inputTEs = inputTEs; }
61  void set_algorithms ( std::vector<std::string>& algorithms ) { m_algorithms = algorithms; }
63 
65  void print(const std::string& indent="", unsigned int detail=1) const;
66  void writeXML(std::ofstream & xmlfile);
67 
68  std::string concise() const;
69 
70  void setL2(bool on=true) { set(); if(on) m_level |= 0x1; else m_level &= 0x6; }
71  void setEF(bool on=true) { set(); if(on) m_level |= 0x2; else m_level &= 0x5; }
72  void setHLT(bool on=true) { set(); if(on) m_level = 0x4; else m_level &= 0x3; }
73 
74  void reset() { m_level = 0x8; }
75  bool inL2() const { return (m_level&0x1) != 0; }
76  bool inEF() const { return (m_level&0x2) != 0; }
77  bool inHLT() const { return (m_level&0x4) != 0; }
78  bool isSet() const { return (m_level&0x8) == 0; }
79 
80  bool operator<(const HLTSequence& s) const {
81  return name() < s.name();
82  }
83 
84  DiffStruct* compareTo(const HLTSequence* o) const;
85 
86  // python
87  std::string __str__() const;
88 
89  private:
90 
91  std::vector<HLTTriggerElement*> m_inputTEs;
93  std::vector<std::string> m_algorithms;
95 
96  // bit 0 - L2 / bit 1 - EF / bit 2 - HLT / bit 3 - unset
97  unsigned int m_level { 0 };
98  void set() { m_level &= 0x7; }
100 
101  friend std::ostream & operator<<(std::ostream &, const HLTSequence &);
102 
103  };
104 
105 }
106 
107 #endif
TrigConf::HLTSequence::reset
void reset()
Definition: HLTSequence.h:74
TrigConf::HLTSequence::concise
std::string concise() const
Definition: HLTSequence.cxx:83
TrigConf::HLTSequence::setHLT
void setHLT(bool on=true)
Definition: HLTSequence.h:72
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TrigConf::HLTSequence::m_topoStartTE
HLTTriggerElement * m_topoStartTE
only for topolical algorithms: specify output TE from previous topological Algo, for combinations
Definition: HLTSequence.h:94
TrigConf::HLTSequence::inputTEs
std::vector< HLTTriggerElement * > & inputTEs()
accessor to the list of input trigger elements
Definition: HLTSequence.h:48
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
TrigConf::HLTSequence::hashId
unsigned int hashId() const
Definition: HLTSequence.cxx:47
TrigConf::TrigConfData::name
const std::string & name() const
Definition: TrigConfData.h:22
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigConf::HLTSequence::set_outputTE
void set_outputTE(HLTTriggerElement *outputTE)
Definition: HLTSequence.cxx:41
TrigConf::HLTSequence::m_outputTE
HLTTriggerElement * m_outputTE
list of output trigger elements (just 1)
Definition: HLTSequence.h:92
TrigConf::HLTSequence::setEF
void setEF(bool on=true)
Definition: HLTSequence.h:71
TrigConf::HLTSequence::m_algorithms
std::vector< std::string > m_algorithms
list of algorithms
Definition: HLTSequence.h:93
TrigConf::HLTSequence::algorithms
std::vector< std::string > & algorithms()
accessor to the list of algorithms
Definition: HLTSequence.h:50
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
TrigConf::DiffStruct
Definition: DiffStruct.h:14
TrigConf::HLTSequence::operator<<
friend std::ostream & operator<<(std::ostream &, const HLTSequence &)
detail
Definition: extract_histogram_tag.cxx:14
TrigConf::HLTSequence::m_inputTEs
std::vector< HLTTriggerElement * > m_inputTEs
list of input trigger elements
Definition: HLTSequence.h:91
TrigConf::HLTSequence::HLTSequence
HLTSequence()
default constructor
Definition: HLTSequence.cxx:16
TrigConf::HLTSequence::writeXML
void writeXML(std::ofstream &xmlfile)
Definition: HLTSequence.cxx:52
TrigConf::HLTSequence::isSet
bool isSet() const
Definition: HLTSequence.h:78
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigConf::HLTSequence::topoStartTE
HLTTriggerElement * topoStartTE()
accessor to the topological start TE
Definition: HLTSequence.h:51
TrigConf::HLTSequence::print
void print(const std::string &indent="", unsigned int detail=1) const
print method
Definition: HLTSequence.cxx:110
TrigConf::HLTSequence::inEF
bool inEF() const
Definition: HLTSequence.h:76
TrigConfData.h
TrigConf::TrigConfData
Definition: TrigConfData.h:13
TrigConf::HLTSequence::set
void set()
Definition: HLTSequence.h:99
TrigConf::HLTSequence::outputTE
HLTTriggerElement * outputTE()
accessor to the list of output trigger elements (just 1)
Definition: HLTSequence.h:49
TrigConf::HLTSequence::setL2
void setL2(bool on=true)
Definition: HLTSequence.h:70
TrigConf::HLTSequence::algorithms
const std::vector< std::string > & algorithms() const
const accessor to the list of algorithms
Definition: HLTSequence.h:55
TrigConf::HLTSequence::outputTE
const HLTTriggerElement * outputTE() const
const accessor to the list of output trigger elements (just 1)
Definition: HLTSequence.h:54
TrigConf::HLTSequence::inL2
bool inL2() const
Definition: HLTSequence.h:75
TrigConf::HLTSequence::set_algorithms
void set_algorithms(std::vector< std::string > &algorithms)
setter of the list of algorithms
Definition: HLTSequence.h:61
TrigConf::HLTSequence::~HLTSequence
~HLTSequence()
destructor
Definition: HLTSequence.cxx:32
TrigConf::HLTSequence::operator<
bool operator<(const HLTSequence &s) const
Definition: HLTSequence.h:80
TrigConf::HLTTriggerElement
HLT trigger element configuration information.
Definition: HLTTriggerElement.h:26
TrigConf::HLTSequence::set_inputTEs
void set_inputTEs(std::vector< HLTTriggerElement * > &inputTEs)
setter of the list of input trigger elements
Definition: HLTSequence.h:59
TrigConf::HLTSequence::m_level
unsigned int m_level
level where sequence is running for a given configuration (to be determined in light of the menu,...
Definition: HLTSequence.h:97
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::HLTSequence::__str__
std::string __str__() const
Definition: HLTSequence.cxx:175
TrigConf::HLTSequence::set_topoStartTE
void set_topoStartTE(HLTTriggerElement *te)
setter of the topological starting TE
Definition: HLTSequence.h:62
TrigConf::HLTSequence::inputTEs
const std::vector< HLTTriggerElement * > & inputTEs() const
const accessor to the list of input trigger elements
Definition: HLTSequence.h:53
TrigConf::HLTSequence::compareTo
DiffStruct * compareTo(const HLTSequence *o) const
Definition: HLTSequence.cxx:94
TrigConf::HLTSequence::topoStartTE
const HLTTriggerElement * topoStartTE() const
const accessor to the topological start TE
Definition: HLTSequence.h:56
TrigConf::HLTSequence::inHLT
bool inHLT() const
Definition: HLTSequence.h:77
TrigConf::HLTSequence
HLT sequence configuration information.
Definition: HLTSequence.h:28