ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::HLTSequence Class Reference

HLT sequence configuration information. More...

#include <HLTSequence.h>

Inheritance diagram for TrigConf::HLTSequence:
Collaboration diagram for TrigConf::HLTSequence:

Public Member Functions

 HLTSequence ()
 default constructor
 HLTSequence (const std::vector< HLTTriggerElement * > &inputTEs, HLTTriggerElement *outputTE, const std::vector< std::string > &algorithms)
 constructor with configuration data
 ~HLTSequence ()
 destructor
std::vector< HLTTriggerElement * > & inputTEs ()
 accessor to the list of input trigger elements
HLTTriggerElementoutputTE ()
 accessor to the list of output trigger elements (just 1)
std::vector< std::string > & algorithms ()
 accessor to the list of algorithms
HLTTriggerElementtopoStartTE ()
 accessor to the topological start TE
const std::vector< HLTTriggerElement * > & inputTEs () const
 const accessor to the list of input trigger elements
const HLTTriggerElementoutputTE () const
 const accessor to the list of output trigger elements (just 1)
const std::vector< std::string > & algorithms () const
 const accessor to the list of algorithms
const HLTTriggerElementtopoStartTE () const
 const accessor to the topological start TE
unsigned int hashId () const
void set_inputTEs (std::vector< HLTTriggerElement * > &inputTEs)
 setter of the list of input trigger elements
void set_outputTE (HLTTriggerElement *outputTE)
void set_algorithms (std::vector< std::string > &algorithms)
 setter of the list of algorithms
void set_topoStartTE (HLTTriggerElement *te)
 setter of the topological starting TE
void print (const std::string &indent="", unsigned int detail=1) const
 print method
void writeXML (std::ofstream &xmlfile)
std::string concise () const
void setL2 (bool on=true)
void setEF (bool on=true)
void setHLT (bool on=true)
void reset ()
bool inL2 () const
bool inEF () const
bool inHLT () const
bool isSet () const
bool operator< (const HLTSequence &s) const
DiffStructcompareTo (const HLTSequence *o) const
std::string __str__ () const
int superMasterTableId () const
unsigned int smk () const
unsigned int id () const
const std::string & name () const
const std::string & comment () const
unsigned int version () const
void setSuperMasterTableId (int id)
void setSMK (int id)
void setId (unsigned int id)
void setName (const std::string &name)
void setVersion (unsigned int version)
void setComment (const std::string &c)
void printNameIdV (const std::string &indent="") const

Protected Member Functions

std::ostream & indent (std::ostream &o, int lvl, int size) const

Private Member Functions

void set ()

Private Attributes

std::vector< HLTTriggerElement * > m_inputTEs
 list of input trigger elements
HLTTriggerElementm_outputTE { nullptr }
 list of output trigger elements (just 1)
std::vector< std::string > m_algorithms
 list of algorithms
HLTTriggerElementm_topoStartTE { nullptr }
 only for topolical algorithms: specify output TE from previous topological Algo, for combinations
unsigned int m_level { 0 }
 level where sequence is running for a given configuration (to be determined in light of the menu, this
unsigned int m_smk
unsigned int m_id
std::string m_name
unsigned int m_version
std::string m_comment

Friends

std::ostream & operator<< (std::ostream &, const HLTSequence &)

Detailed Description

HLT sequence configuration information.

A sequence in the HLT defines how the algorithms are linked to the trigger elements. The trigger elements are logical trigger objects which indicate if certain trigger patterns were found.

Definition at line 28 of file HLTSequence.h.

Constructor & Destructor Documentation

◆ HLTSequence() [1/2]

TrigConf::HLTSequence::HLTSequence ( )

default constructor

Definition at line 16 of file HLTSequence.cxx.

16 :
17 m_outputTE ( 0 ),
18 m_topoStartTE ( 0 ),
19 m_level( 0 )
20{}
HLTTriggerElement * m_outputTE
list of output trigger elements (just 1)
Definition HLTSequence.h:92
HLTTriggerElement * m_topoStartTE
only for topolical algorithms: specify output TE from previous topological Algo, for combinations
Definition HLTSequence.h:94
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

◆ HLTSequence() [2/2]

TrigConf::HLTSequence::HLTSequence ( const std::vector< HLTTriggerElement * > & inputTEs,
HLTTriggerElement * outputTE,
const std::vector< std::string > & algorithms )

constructor with configuration data

Parameters
inputTEslist of input trigger elements for this sequence
outputTEsoutput trigger element for this sequence (list must have lenght 1)
algorithmslist of algorithms that run in this sequence

Definition at line 22 of file HLTSequence.cxx.

24 :
28{
29 setName(outputTE->name());
30}
std::vector< HLTTriggerElement * > m_inputTEs
list of input trigger elements
Definition HLTSequence.h:91
std::vector< std::string > m_algorithms
list of algorithms
Definition HLTSequence.h:93
std::vector< HLTTriggerElement * > & inputTEs()
accessor to the list of input trigger elements
Definition HLTSequence.h:48
std::vector< std::string > & algorithms()
accessor to the list of algorithms
Definition HLTSequence.h:50
HLTTriggerElement * outputTE()
accessor to the list of output trigger elements (just 1)
Definition HLTSequence.h:49
void setName(const std::string &name)

◆ ~HLTSequence()

TrigConf::HLTSequence::~HLTSequence ( )

destructor

Definition at line 32 of file HLTSequence.cxx.

33{
34 for(HLTTriggerElement* te : m_inputTEs)
35 delete te;
36 delete m_outputTE;
37 delete m_topoStartTE;
38}

Member Function Documentation

◆ __str__()

string HLTSequence::__str__ ( ) const
virtual

Reimplemented from TrigConf::TrigConfData.

Definition at line 175 of file HLTSequence.cxx.

175 {
176 stringstream s;
177 s << *this;
178 return s.str();
179}

◆ algorithms() [1/2]

std::vector< std::string > & TrigConf::HLTSequence::algorithms ( )
inline

accessor to the list of algorithms

Definition at line 50 of file HLTSequence.h.

◆ algorithms() [2/2]

const std::vector< std::string > & TrigConf::HLTSequence::algorithms ( ) const
inline

const accessor to the list of algorithms

Definition at line 55 of file HLTSequence.h.

◆ comment()

const std::string & TrigConf::TrigConfData::comment ( ) const
inlineinherited

Definition at line 23 of file TrigConfData.h.

23{return m_comment;}

◆ compareTo()

TrigConf::DiffStruct * TrigConf::HLTSequence::compareTo ( const HLTSequence * o) const

Definition at line 94 of file HLTSequence.cxx.

94 {
95 DiffStruct * ds = new DiffStruct("SEQUENCE", name());
96 ds->check("number_algs", (unsigned int)algorithms().size(), (unsigned int)o->algorithms().size() );
97 ds->check("number_inputs", (unsigned int)inputTEs().size(), (unsigned int)o->inputTEs().size() );
98 if(algorithms().size()==o->algorithms().size()) {
99 for(size_t i=0; i<algorithms().size(); ++i)
100 ds->check("alg_" + std::to_string(i), algorithms()[i], o->algorithms()[i] );
101 }
102 if(ds->empty()) {
103 delete ds; ds=0;
104 }
105 return ds;
106}
const std::string & name() const

◆ concise()

std::string TrigConf::HLTSequence::concise ( ) const

Definition at line 83 of file HLTSequence.cxx.

83 {
84 std::stringstream str;
85 str << "(";
86 for (TrigConf::HLTTriggerElement* inputTE : m_inputTEs) {
87 str << inputTE->name() << ",";
88 }
89 str << outputTE()->name() << ")";
90 return str.str();
91}

◆ hashId()

unsigned int TrigConf::HLTSequence::hashId ( ) const

Definition at line 47 of file HLTSequence.cxx.

47 {
48 return m_outputTE->hashId();
49}

◆ id()

unsigned int TrigConf::TrigConfData::id ( ) const
inlineinherited

Definition at line 21 of file TrigConfData.h.

21{return m_id;}

◆ indent()

std::ostream & TrigConfData::indent ( std::ostream & o,
int lvl,
int size ) const
protectedinherited

Definition at line 23 of file TrigConfData.cxx.

23 {
24 int width = lvl*size;
25 if(width==0) return o;
26 o << setw(lvl*size) << " ";
27 return o;
28}
const double width

◆ inEF()

bool TrigConf::HLTSequence::inEF ( ) const
inline

Definition at line 76 of file HLTSequence.h.

76{ return (m_level&0x2) != 0; }

◆ inHLT()

bool TrigConf::HLTSequence::inHLT ( ) const
inline

Definition at line 77 of file HLTSequence.h.

77{ return (m_level&0x4) != 0; }

◆ inL2()

bool TrigConf::HLTSequence::inL2 ( ) const
inline

Definition at line 75 of file HLTSequence.h.

75{ return (m_level&0x1) != 0; }

◆ inputTEs() [1/2]

std::vector< HLTTriggerElement * > & TrigConf::HLTSequence::inputTEs ( )
inline

accessor to the list of input trigger elements

Definition at line 48 of file HLTSequence.h.

◆ inputTEs() [2/2]

const std::vector< HLTTriggerElement * > & TrigConf::HLTSequence::inputTEs ( ) const
inline

const accessor to the list of input trigger elements

Definition at line 53 of file HLTSequence.h.

◆ isSet()

bool TrigConf::HLTSequence::isSet ( ) const
inline

Definition at line 78 of file HLTSequence.h.

78{ return (m_level&0x8) == 0; }

◆ name()

const std::string & TrigConf::TrigConfData::name ( ) const
inlineinherited

Definition at line 22 of file TrigConfData.h.

22{return m_name;}

◆ operator<()

bool TrigConf::HLTSequence::operator< ( const HLTSequence & s) const
inline

Definition at line 80 of file HLTSequence.h.

80 {
81 return name() < s.name();
82 }

◆ outputTE() [1/2]

HLTTriggerElement * TrigConf::HLTSequence::outputTE ( )
inline

accessor to the list of output trigger elements (just 1)

Definition at line 49 of file HLTSequence.h.

◆ outputTE() [2/2]

const HLTTriggerElement * TrigConf::HLTSequence::outputTE ( ) const
inline

const accessor to the list of output trigger elements (just 1)

Definition at line 54 of file HLTSequence.h.

◆ print()

void TrigConf::HLTSequence::print ( const std::string & indent = "",
unsigned int detail = 1 ) const
virtual

print method

Implements TrigConf::TrigConfData.

Definition at line 110 of file HLTSequence.cxx.

110 {
111 if(detail>=4) {
112 cout << indent << "HLTSequence "; printNameIdV();
113 }
114 if(detail>=5) {
115 cout << indent << " inputTEs : ";
116 bool first = true;
117 for(HLTTriggerElement* te: m_inputTEs) {
118 if(first) {first=false;} else {cout << ", ";}
119 cout << *te;
120 }
121 cout << endl;
122 if (m_topoStartTE) {
123 cout << indent << " topoStartTE " << *m_topoStartTE << endl;
124 }
125 cout << indent << " algorithms: ";
126 first = true;
127 uint width = 0;
128 for(const string& alg: m_algorithms) {
129 width += alg.size();
130 if(first) {first=false;} else {cout << ", "; width+=2; }
131 if(width>=140) {
132 cout << endl << indent << " ";
133 width=0;
134 }
135 cout << alg;
136 }
137 cout << endl;
138 cout << indent << " outputTE : " << outputTE()->name() << endl;
139 }
140}
unsigned int uint
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
bool first
Definition DeMoScan.py:534

◆ printNameIdV()

void TrigConfData::printNameIdV ( const std::string & indent = "") const
inherited

Definition at line 31 of file TrigConfData.cxx.

31 {
32 cout << indent << name();
33 if(id()>0 || version()>0)
34 cout << " (id=" << id() << "/v=" << version() << ")";
35 cout << endl;
36 if(comment()!="")
37 cout << indent << "Comment: " << comment() << endl;
38}
unsigned int id() const
const std::string & comment() const
unsigned int version() const

◆ reset()

void TrigConf::HLTSequence::reset ( )
inline

Definition at line 74 of file HLTSequence.h.

74{ m_level = 0x8; }

◆ set()

void TrigConf::HLTSequence::set ( )
inlineprivate

Definition at line 99 of file HLTSequence.h.

99{ m_level &= 0x7; }

◆ set_algorithms()

void TrigConf::HLTSequence::set_algorithms ( std::vector< std::string > & algorithms)
inline

setter of the list of algorithms

Definition at line 61 of file HLTSequence.h.

◆ set_inputTEs()

void TrigConf::HLTSequence::set_inputTEs ( std::vector< HLTTriggerElement * > & inputTEs)
inline

setter of the list of input trigger elements

Definition at line 59 of file HLTSequence.h.

◆ set_outputTE()

void TrigConf::HLTSequence::set_outputTE ( HLTTriggerElement * outputTE)

Definition at line 41 of file HLTSequence.cxx.

41 {
43 setName(outputTE->name());
44}

◆ set_topoStartTE()

void TrigConf::HLTSequence::set_topoStartTE ( HLTTriggerElement * te)
inline

setter of the topological starting TE

Definition at line 62 of file HLTSequence.h.

◆ setComment()

void TrigConf::TrigConfData::setComment ( const std::string & c)
inlineinherited

Definition at line 32 of file TrigConfData.h.

◆ setEF()

void TrigConf::HLTSequence::setEF ( bool on = true)
inline

Definition at line 71 of file HLTSequence.h.

71{ set(); if(on) m_level |= 0x2; else m_level &= 0x5; }

◆ setHLT()

void TrigConf::HLTSequence::setHLT ( bool on = true)
inline

Definition at line 72 of file HLTSequence.h.

72{ set(); if(on) m_level = 0x4; else m_level &= 0x3; }

◆ setId()

void TrigConf::TrigConfData::setId ( unsigned int id)
inlineinherited

Definition at line 29 of file TrigConfData.h.

29{ m_id=id; }

◆ setL2()

void TrigConf::HLTSequence::setL2 ( bool on = true)
inline

Definition at line 70 of file HLTSequence.h.

70{ set(); if(on) m_level |= 0x1; else m_level &= 0x6; }

◆ setName()

void TrigConf::TrigConfData::setName ( const std::string & name)
inlineinherited

Definition at line 30 of file TrigConfData.h.

30{ m_name = name;}

◆ setSMK()

void TrigConf::TrigConfData::setSMK ( int id)
inlineinherited

Definition at line 28 of file TrigConfData.h.

28{m_smk=id;}

◆ setSuperMasterTableId()

void TrigConf::TrigConfData::setSuperMasterTableId ( int id)
inlineinherited

Definition at line 27 of file TrigConfData.h.

27{m_smk=id;}

◆ setVersion()

void TrigConf::TrigConfData::setVersion ( unsigned int version)
inlineinherited

Definition at line 31 of file TrigConfData.h.

◆ smk()

unsigned int TrigConf::TrigConfData::smk ( ) const
inlineinherited

Definition at line 20 of file TrigConfData.h.

20{return m_smk;}

◆ superMasterTableId()

int TrigConf::TrigConfData::superMasterTableId ( ) const
inlineinherited

Definition at line 19 of file TrigConfData.h.

19{return (int)m_smk;}

◆ topoStartTE() [1/2]

HLTTriggerElement * TrigConf::HLTSequence::topoStartTE ( )
inline

accessor to the topological start TE

Definition at line 51 of file HLTSequence.h.

◆ topoStartTE() [2/2]

const HLTTriggerElement * TrigConf::HLTSequence::topoStartTE ( ) const
inline

const accessor to the topological start TE

Definition at line 56 of file HLTSequence.h.

◆ version()

unsigned int TrigConf::TrigConfData::version ( ) const
inlineinherited

Definition at line 24 of file TrigConfData.h.

24{return m_version;}

◆ writeXML()

void TrigConf::HLTSequence::writeXML ( std::ofstream & xmlfile)

Definition at line 52 of file HLTSequence.cxx.

52 {
53
54 xmlfile << " <SEQUENCE";
55
56 xmlfile << " output=\"" << m_outputTE->name() << "\"";
57
58 xmlfile << " input=\"";
59 bool first = true;
60 for(HLTTriggerElement* te: m_inputTEs) {
61 if(first) {first=false;} else {xmlfile << " ";}
62 xmlfile << te->name();
63 }
64 xmlfile << "\"";
65
66 xmlfile << " algorithm=\"";
67 first = true;
68 for(const string& alg: m_algorithms) {
69 if(first) {first=false;} else {xmlfile << " ";}
70 xmlfile << alg;
71 }
72 xmlfile << "\"";
73
74 if (m_topoStartTE) {
75 xmlfile << " topo_start_from=\"" << m_topoStartTE->name() << "\"";
76 }
77
78 xmlfile << "/> " << endl;
79 return;
80}
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29

◆ operator<<

std::ostream & operator<< ( std::ostream & ,
const HLTSequence &  )
friend

Member Data Documentation

◆ m_algorithms

std::vector<std::string> TrigConf::HLTSequence::m_algorithms
private

list of algorithms

Definition at line 93 of file HLTSequence.h.

◆ m_comment

std::string TrigConf::TrigConfData::m_comment
privateinherited

Definition at line 48 of file TrigConfData.h.

◆ m_id

unsigned int TrigConf::TrigConfData::m_id
privateinherited

Definition at line 45 of file TrigConfData.h.

◆ m_inputTEs

std::vector<HLTTriggerElement*> TrigConf::HLTSequence::m_inputTEs
private

list of input trigger elements

Definition at line 91 of file HLTSequence.h.

◆ m_level

unsigned int TrigConf::HLTSequence::m_level { 0 }
private

level where sequence is running for a given configuration (to be determined in light of the menu, this

is not a property of the chain per se.) In rare cases a sequence could be running explicitely in both levels

Definition at line 97 of file HLTSequence.h.

97{ 0 };

◆ m_name

std::string TrigConf::TrigConfData::m_name
privateinherited

Definition at line 46 of file TrigConfData.h.

◆ m_outputTE

HLTTriggerElement* TrigConf::HLTSequence::m_outputTE { nullptr }
private

list of output trigger elements (just 1)

Definition at line 92 of file HLTSequence.h.

92{ nullptr };

◆ m_smk

unsigned int TrigConf::TrigConfData::m_smk
privateinherited

Definition at line 44 of file TrigConfData.h.

◆ m_topoStartTE

HLTTriggerElement* TrigConf::HLTSequence::m_topoStartTE { nullptr }
private

only for topolical algorithms: specify output TE from previous topological Algo, for combinations

Definition at line 94 of file HLTSequence.h.

94{ nullptr };

◆ m_version

unsigned int TrigConf::TrigConfData::m_version
privateinherited

Definition at line 47 of file TrigConfData.h.


The documentation for this class was generated from the following files: