ATLAS Offline Software
Loading...
Searching...
No Matches
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
15namespace TrigConf {
16
17 class HLTSequence;
19 class DiffStruct;
20 std::ostream & operator<<(std::ostream &, const HLTSequence &);
21
28 class HLTSequence : public TrigConfData {
29 public:
30
33
40 HLTSequence( const std::vector<HLTTriggerElement*>& inputTEs,
42 const std::vector<std::string>& algorithms);
43
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 };
99 void set() { m_level &= 0x7; }
100
101 friend std::ostream & operator<<(std::ostream &, const HLTSequence &);
102
103 };
104
105}
106
107#endif
HLT sequence configuration information.
Definition HLTSequence.h:28
std::vector< HLTTriggerElement * > m_inputTEs
list of input trigger elements
Definition HLTSequence.h:91
void set_outputTE(HLTTriggerElement *outputTE)
unsigned int hashId() const
HLTSequence()
default constructor
DiffStruct * compareTo(const HLTSequence *o) const
std::vector< std::string > m_algorithms
list of algorithms
Definition HLTSequence.h:93
void set_inputTEs(std::vector< HLTTriggerElement * > &inputTEs)
setter of the list of input trigger elements
Definition HLTSequence.h:59
std::string concise() const
std::vector< HLTTriggerElement * > & inputTEs()
accessor to the list of input trigger elements
Definition HLTSequence.h:48
void setL2(bool on=true)
Definition HLTSequence.h:70
const std::vector< std::string > & algorithms() const
const accessor to the list of algorithms
Definition HLTSequence.h:55
const HLTTriggerElement * topoStartTE() const
const accessor to the topological start TE
Definition HLTSequence.h:56
bool operator<(const HLTSequence &s) const
Definition HLTSequence.h:80
const HLTTriggerElement * outputTE() const
const accessor to the list of output trigger elements (just 1)
Definition HLTSequence.h:54
void setHLT(bool on=true)
Definition HLTSequence.h:72
HLTTriggerElement * topoStartTE()
accessor to the topological start TE
Definition HLTSequence.h:51
HLTTriggerElement * m_outputTE
list of output trigger elements (just 1)
Definition HLTSequence.h:92
friend std::ostream & operator<<(std::ostream &, const HLTSequence &)
std::string __str__() const
HLTTriggerElement * m_topoStartTE
only for topolical algorithms: specify output TE from previous topological Algo, for combinations
Definition HLTSequence.h:94
void set_algorithms(std::vector< std::string > &algorithms)
setter of the list of algorithms
Definition HLTSequence.h:61
std::vector< std::string > & algorithms()
accessor to the list of algorithms
Definition HLTSequence.h:50
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
const std::vector< HLTTriggerElement * > & inputTEs() const
const accessor to the list of input trigger elements
Definition HLTSequence.h:53
void set_topoStartTE(HLTTriggerElement *te)
setter of the topological starting TE
Definition HLTSequence.h:62
void print(const std::string &indent="", unsigned int detail=1) const
print method
HLTTriggerElement * outputTE()
accessor to the list of output trigger elements (just 1)
Definition HLTSequence.h:49
void writeXML(std::ofstream &xmlfile)
void setEF(bool on=true)
Definition HLTSequence.h:71
HLT trigger element configuration information.
std::ostream & indent(std::ostream &o, int lvl, int size) const
const std::string & name() const
TrigConfData(const std::string &name="")
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)