ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConfChain Class Reference

#include <TrigConfChain.h>

Collaboration diagram for TrigConfChain:

Public Member Functions

 TrigConfChain ()=default
 TrigConfChain (const std::string &chain_name, int chain_counter, unsigned int chain_id, const std::string &level, const std::string &lower_chain_name, int lower_chain_counter, unsigned int lower_chain_id, float prescale, float pass_through)
 TrigConfChain (const std::string &chain_name, int chain_counter, unsigned int chain_id, float prescale)
 ~TrigConfChain ()
void clearStrings ()
void addSignature (const TrigConfSig &obj)
void addGroup (const std::string &name)
void addStream (const std::string &name, float prescale)
void addEBHypo (const std::string &name)
void clearGroup ()
void clearStream ()
void clearEBHypo ()
void addLowerChainId (uint32_t lower_id)
void setPrescale (float val)
void setPassThrough (float val)
const std::string & getName () const
const std::string & getChainName () const
const std::string & getLowerName () const
uint32_t getId () const
uint16_t getCounter () const
uint16_t getEncodedId () const
uint16_t getLowerCounter () const
uint32_t getLowerId () const
uint16_t getLowerEncodedId () const
unsigned int getLevelId () const
const std::string getLevel () const
float getPrescale () const
float getPS () const
float getPassThrough () const
float getPT () const
const std::vector< float > & getStreamPS () const
const std::vector< TrigConfSig > & getSignature () const
const std::vector< std::string > & getStream () const
const std::vector< std::string > & getGroup () const
const std::vector< std::string > & getEBHypo () const
std::vector< float > & getStreamPS ()
std::vector< std::string > & getStream ()
std::vector< std::string > & getGroup ()
std::vector< std::string > & getEBHypo ()
const std::vector< uint32_t > & getLowerIds () const
float getSignaturePrescale (const std::string &name) const
bool matchOutputTE (uint32_t te_id) const
void print (std::ostream &os) const
void print () const

Private Attributes

std::string m_chain_name {}
std::string m_lower_name {}
uint32_t m_chain_id {}
uint32_t m_lower_id {}
uint16_t m_chain_counter {}
uint16_t m_lower_counter {}
uint8_t m_level {}
float m_prescale {}
float m_pass_through {}
std::vector< uint32_t > m_lower_ids
std::vector< float > m_stream_prescale
std::vector< TrigConfSigm_signature
std::vector< std::string > m_stream_name
std::vector< std::string > m_group
std::vector< std::string > m_ebhypo_names

Detailed Description

Definition at line 32 of file TrigConfChain.h.

Constructor & Destructor Documentation

◆ TrigConfChain() [1/3]

TrigConfChain::TrigConfChain ( )
default

◆ TrigConfChain() [2/3]

TrigConfChain::TrigConfChain ( const std::string & chain_name,
int chain_counter,
unsigned int chain_id,
const std::string & level,
const std::string & lower_chain_name,
int lower_chain_counter,
unsigned int lower_chain_id,
float prescale,
float pass_through )

Definition at line 46 of file TrigConfChain.cxx.

55 :m_chain_name(chain_name),
56 m_lower_name(lower_chain_name),
57 m_chain_id(chain_id),
58 m_lower_id(lower_chain_id),
61 m_level(0),
62 m_prescale(prescale),
63 m_pass_through(pass_through)
64{
65 // Set counters
66 if(0 <= chain_counter && chain_counter < 16384) {
67 m_chain_counter = static_cast<unsigned int>(chain_counter);
68 }
69 else {
70 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain") << "Bad chain counter";
71 }
72
73 if(0 <= lower_chain_counter && lower_chain_counter < 16384) {
74 m_lower_counter = static_cast<unsigned int>(lower_chain_counter);
75 }
76
77 // Set trigger level as integer
78 if (level == "L1") m_level = 1;
79 else if(level == "HLT") m_level = 2;
80 else {
81 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain")
82 << "TrigConfChain ctor error! " << chain_name << ": bad level " << level;
83 }
84}
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
uint16_t m_chain_counter
std::string m_lower_name
uint32_t m_chain_id
uint16_t m_lower_counter
std::string m_chain_name
uint32_t m_lower_id

◆ TrigConfChain() [3/3]

TrigConfChain::TrigConfChain ( const std::string & chain_name,
int chain_counter,
unsigned int chain_id,
float prescale )

Definition at line 87 of file TrigConfChain.cxx.

91 :m_chain_name(chain_name),
92 m_lower_name(""),
93 m_chain_id(chain_id),
94 m_lower_id(0),
97 m_level(1),
98 m_prescale(prescale),
100{
101 // Set counters
102 if(0 <= chain_counter && chain_counter < 16384) {
103 m_chain_counter = static_cast<unsigned int>(chain_counter);
104 }
105 else {
106 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain") << "Bad chain counter";
107 }
108}

◆ ~TrigConfChain()

TrigConfChain::~TrigConfChain ( )
inline

Definition at line 55 of file TrigConfChain.h.

55{}

Member Function Documentation

◆ addEBHypo()

void TrigConfChain::addEBHypo ( const std::string & name)
inline

Definition at line 62 of file TrigConfChain.h.

62{ m_ebhypo_names.push_back(name); }
std::vector< std::string > m_ebhypo_names

◆ addGroup()

void TrigConfChain::addGroup ( const std::string & name)
inline

Definition at line 60 of file TrigConfChain.h.

60{ m_group.push_back(name); }
std::vector< std::string > m_group

◆ addLowerChainId()

void TrigConfChain::addLowerChainId ( uint32_t lower_id)
inline

Definition at line 68 of file TrigConfChain.h.

68{ m_lower_ids.push_back(lower_id); }
std::vector< uint32_t > m_lower_ids

◆ addSignature()

void TrigConfChain::addSignature ( const TrigConfSig & obj)
inline

Definition at line 59 of file TrigConfChain.h.

59{ m_signature.push_back(obj); }
std::vector< TrigConfSig > m_signature

◆ addStream()

void TrigConfChain::addStream ( const std::string & name,
float prescale )

Definition at line 111 of file TrigConfChain.cxx.

112{
113 //
114 // Save stream name and prescale
115 //
116 m_stream_name.push_back(name);
117 m_stream_prescale.push_back(prescale);
118}
std::vector< std::string > m_stream_name
std::vector< float > m_stream_prescale

◆ clearEBHypo()

void TrigConfChain::clearEBHypo ( )
inline

Definition at line 66 of file TrigConfChain.h.

66{ m_ebhypo_names.clear(); }

◆ clearGroup()

void TrigConfChain::clearGroup ( )
inline

Definition at line 64 of file TrigConfChain.h.

64{ m_group.clear(); }

◆ clearStream()

void TrigConfChain::clearStream ( )
inline

Definition at line 65 of file TrigConfChain.h.

65{ m_stream_name.clear(); m_stream_prescale.clear(); }

◆ clearStrings()

void TrigConfChain::clearStrings ( )

Definition at line 121 of file TrigConfChain.cxx.

122{
123 //
124 // Clear strings in this class and all vector classes
125 //
126 m_chain_name.clear();
127 m_lower_name.clear();
128 m_stream_name.clear();
129 m_stream_prescale.clear(); // prescale vector is meaningless without stream names
130 m_group.clear();
131 m_ebhypo_names.clear();
132
133 for(unsigned int i = 0; i < m_signature.size(); ++i) m_signature[i].clearStrings();
134}

◆ getChainName()

const std::string & TrigConfChain::getChainName ( ) const
inline

Definition at line 74 of file TrigConfChain.h.

74{ return getName(); }
const std::string & getName() const

◆ getCounter()

uint16_t TrigConfChain::getCounter ( ) const
inline

Definition at line 78 of file TrigConfChain.h.

78{ return m_chain_counter; }

◆ getEBHypo() [1/2]

std::vector< std::string > & TrigConfChain::getEBHypo ( )
inline

Definition at line 103 of file TrigConfChain.h.

103{ return m_ebhypo_names; }

◆ getEBHypo() [2/2]

const std::vector< std::string > & TrigConfChain::getEBHypo ( ) const
inline

Definition at line 97 of file TrigConfChain.h.

97{ return m_ebhypo_names; }

◆ getEncodedId()

uint16_t TrigConfChain::getEncodedId ( ) const

Definition at line 137 of file TrigConfChain.cxx.

138{
139 //
140 // Return level id
141 //
143 return 0;
144 }
145
147}
unsigned int getLevelId() const
uint16_t getCounter() const
uint16_t getEncodedId(int level, int counter)

◆ getGroup() [1/2]

std::vector< std::string > & TrigConfChain::getGroup ( )
inline

Definition at line 102 of file TrigConfChain.h.

102{ return m_group; }

◆ getGroup() [2/2]

const std::vector< std::string > & TrigConfChain::getGroup ( ) const
inline

Definition at line 96 of file TrigConfChain.h.

96{ return m_group; }

◆ getId()

uint32_t TrigConfChain::getId ( ) const
inline

Definition at line 77 of file TrigConfChain.h.

77{ return m_chain_id; }

◆ getLevel()

const std::string TrigConfChain::getLevel ( ) const

Definition at line 163 of file TrigConfChain.cxx.

164{
165 //
166 // Get trigger level as integer
167 //
168 if (m_level == 1) return "L1";
169 else if(m_level == 2) return "HLT";
170
171 return "L0";
172}

◆ getLevelId()

unsigned int TrigConfChain::getLevelId ( ) const
inline

Definition at line 85 of file TrigConfChain.h.

85{ return m_level; }

◆ getLowerCounter()

uint16_t TrigConfChain::getLowerCounter ( ) const
inline

Definition at line 81 of file TrigConfChain.h.

81{ return m_lower_counter; }

◆ getLowerEncodedId()

uint16_t TrigConfChain::getLowerEncodedId ( ) const

Definition at line 150 of file TrigConfChain.cxx.

151{
152 //
153 // Get lower chain encoded id
154 //
155 if(m_level == 2) {
157 }
158
159 return 0;
160}
uint16_t getLowerCounter() const

◆ getLowerId()

uint32_t TrigConfChain::getLowerId ( ) const
inline

Definition at line 82 of file TrigConfChain.h.

82{ return m_lower_id; }

◆ getLowerIds()

const std::vector< uint32_t > & TrigConfChain::getLowerIds ( ) const
inline

Definition at line 105 of file TrigConfChain.h.

105{ return m_lower_ids; }

◆ getLowerName()

const std::string & TrigConfChain::getLowerName ( ) const
inline

Definition at line 75 of file TrigConfChain.h.

75{ return m_lower_name; }

◆ getName()

const std::string & TrigConfChain::getName ( ) const
inline

Definition at line 73 of file TrigConfChain.h.

73{ return m_chain_name; }

◆ getPassThrough()

float TrigConfChain::getPassThrough ( ) const
inline

Definition at line 90 of file TrigConfChain.h.

90{ return m_pass_through; }

◆ getPrescale()

float TrigConfChain::getPrescale ( ) const
inline

Definition at line 88 of file TrigConfChain.h.

88{ return m_prescale; }

◆ getPS()

float TrigConfChain::getPS ( ) const
inline

Definition at line 89 of file TrigConfChain.h.

89{ return getPrescale(); }
float getPrescale() const

◆ getPT()

float TrigConfChain::getPT ( ) const
inline

Definition at line 91 of file TrigConfChain.h.

91{ return getPassThrough(); }
float getPassThrough() const

◆ getSignature()

const std::vector< TrigConfSig > & TrigConfChain::getSignature ( ) const
inline

Definition at line 94 of file TrigConfChain.h.

94{ return m_signature; }

◆ getSignaturePrescale()

float TrigConfChain::getSignaturePrescale ( const std::string & name) const

Definition at line 175 of file TrigConfChain.cxx.

176{
177 //
178 // Find stream prescale
179 //
180 if(m_stream_prescale.size() != m_stream_name.size()) {
181 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain") << "getSignaturePrescale - logic error!";
182 return 0.0;
183 }
184
185 for(unsigned int i = 0; m_stream_name.size(); ++i) {
186 if(m_stream_name[i] == name) return m_stream_prescale[i];
187 }
188
189 return 0.0;
190}

◆ getStream() [1/2]

std::vector< std::string > & TrigConfChain::getStream ( )
inline

Definition at line 101 of file TrigConfChain.h.

101{ return m_stream_name; }

◆ getStream() [2/2]

const std::vector< std::string > & TrigConfChain::getStream ( ) const
inline

Definition at line 95 of file TrigConfChain.h.

95{ return m_stream_name; }

◆ getStreamPS() [1/2]

std::vector< float > & TrigConfChain::getStreamPS ( )
inline

Definition at line 100 of file TrigConfChain.h.

100{ return m_stream_prescale; }

◆ getStreamPS() [2/2]

const std::vector< float > & TrigConfChain::getStreamPS ( ) const
inline

Definition at line 93 of file TrigConfChain.h.

93{ return m_stream_prescale; }

◆ matchOutputTE()

bool TrigConfChain::matchOutputTE ( uint32_t te_id) const

Definition at line 193 of file TrigConfChain.cxx.

194{
195 //
196 // Match sequence to chain using signatures
197 //
198 for(std::vector<TrigConfSig>::const_iterator it = m_signature.begin();
199 it != m_signature.end(); ++it) {
200 if(it -> matchOutputTE(te_id)) {
201 return true;
202 }
203 }
204
205 return false;
206}
bool matchOutputTE(uint32_t te_id) const

◆ print() [1/2]

void TrigConfChain::print ( ) const

Definition at line 214 of file TrigConfChain.cxx.

215{
216 std::cout << str(*this) << std::endl;
217}

◆ print() [2/2]

void TrigConfChain::print ( std::ostream & os) const

Definition at line 209 of file TrigConfChain.cxx.

210{
211 os << str(*this) << std::endl;
212}

◆ setPassThrough()

void TrigConfChain::setPassThrough ( float val)
inline

◆ setPrescale()

void TrigConfChain::setPrescale ( float val)
inline

Definition at line 70 of file TrigConfChain.h.

70{ m_prescale = val; }

Member Data Documentation

◆ m_chain_counter

uint16_t TrigConfChain::m_chain_counter {}
private

Definition at line 120 of file TrigConfChain.h.

120{}; // Chain counter

◆ m_chain_id

uint32_t TrigConfChain::m_chain_id {}
private

Definition at line 118 of file TrigConfChain.h.

118{}; // Hash value from chain_name

◆ m_chain_name

std::string TrigConfChain::m_chain_name {}
private

Definition at line 116 of file TrigConfChain.h.

116{}; // Chain name

◆ m_ebhypo_names

std::vector<std::string> TrigConfChain::m_ebhypo_names
private

Definition at line 131 of file TrigConfChain.h.

◆ m_group

std::vector<std::string> TrigConfChain::m_group
private

Definition at line 130 of file TrigConfChain.h.

◆ m_level

uint8_t TrigConfChain::m_level {}
private

Definition at line 122 of file TrigConfChain.h.

122{}; // Trigger level

◆ m_lower_counter

uint16_t TrigConfChain::m_lower_counter {}
private

Definition at line 121 of file TrigConfChain.h.

121{}; // Lower chain counter

◆ m_lower_id

uint32_t TrigConfChain::m_lower_id {}
private

Definition at line 119 of file TrigConfChain.h.

119{}; // Lower chain hash value from chain_name

◆ m_lower_ids

std::vector<uint32_t> TrigConfChain::m_lower_ids
private

Definition at line 126 of file TrigConfChain.h.

◆ m_lower_name

std::string TrigConfChain::m_lower_name {}
private

Definition at line 117 of file TrigConfChain.h.

117{}; // Lower chain name

◆ m_pass_through

float TrigConfChain::m_pass_through {}
private

Definition at line 124 of file TrigConfChain.h.

124{}; // Pass_through flag

◆ m_prescale

float TrigConfChain::m_prescale {}
private

Definition at line 123 of file TrigConfChain.h.

123{}; // Prescale value

◆ m_signature

std::vector<TrigConfSig> TrigConfChain::m_signature
private

Definition at line 128 of file TrigConfChain.h.

◆ m_stream_name

std::vector<std::string> TrigConfChain::m_stream_name
private

Definition at line 129 of file TrigConfChain.h.

◆ m_stream_prescale

std::vector<float> TrigConfChain::m_stream_prescale
private

Definition at line 127 of file TrigConfChain.h.


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