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

#include <TrigConfChain.h>

Collaboration diagram for TrigConfChain:

Public Member Functions

 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)
 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=std::cout) 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 31 of file TrigConfChain.h.

Constructor & Destructor Documentation

◆ TrigConfChain() [1/3]

TrigConfChain::TrigConfChain ( )

Definition at line 46 of file TrigConfChain.cxx.

47 :m_chain_name(""),
48 m_lower_name(""),
49 m_chain_id(0),
50 m_lower_id(0),
53 m_level(0),
54 m_prescale(0.0),
56{
57}
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() [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 60 of file TrigConfChain.cxx.

69 :m_chain_name(chain_name),
70 m_lower_name(lower_chain_name),
71 m_chain_id(chain_id),
72 m_lower_id(lower_chain_id),
75 m_level(0),
76 m_prescale(prescale),
77 m_pass_through(pass_through)
78{
79 // Set counters
80 if(0 <= chain_counter && chain_counter < 16384) {
81 m_chain_counter = static_cast<unsigned int>(chain_counter);
82 }
83 else {
84 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain") << "Bad chain counter";
85 }
86
87 if(0 <= lower_chain_counter && lower_chain_counter < 16384) {
88 m_lower_counter = static_cast<unsigned int>(lower_chain_counter);
89 }
90
91 // Set trigger level as integer
92 if (level == "L1") m_level = 1;
93 else if(level == "HLT") m_level = 2;
94 else {
95 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain")
96 << "TrigConfChain ctor error! " << chain_name << ": bad level " << level;
97 }
98}
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.

◆ TrigConfChain() [3/3]

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

Definition at line 101 of file TrigConfChain.cxx.

105 :m_chain_name(chain_name),
106 m_lower_name(""),
107 m_chain_id(chain_id),
108 m_lower_id(0),
111 m_level(1),
112 m_prescale(prescale),
113 m_pass_through(0.0)
114{
115 // Set counters
116 if(0 <= chain_counter && chain_counter < 16384) {
117 m_chain_counter = static_cast<unsigned int>(chain_counter);
118 }
119 else {
120 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain") << "Bad chain counter";
121 }
122}

◆ ~TrigConfChain()

TrigConfChain::~TrigConfChain ( )
inline

Definition at line 54 of file TrigConfChain.h.

54{}

Member Function Documentation

◆ addEBHypo()

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

Definition at line 61 of file TrigConfChain.h.

61{ 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 59 of file TrigConfChain.h.

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

◆ addLowerChainId()

void TrigConfChain::addLowerChainId ( uint32_t lower_id)
inline

Definition at line 67 of file TrigConfChain.h.

67{ 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 58 of file TrigConfChain.h.

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

◆ addStream()

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

Definition at line 125 of file TrigConfChain.cxx.

126{
127 //
128 // Save stream name and prescale
129 //
130 m_stream_name.push_back(name);
131 m_stream_prescale.push_back(prescale);
132}
std::vector< std::string > m_stream_name
std::vector< float > m_stream_prescale

◆ clearEBHypo()

void TrigConfChain::clearEBHypo ( )
inline

Definition at line 65 of file TrigConfChain.h.

65{ m_ebhypo_names.clear(); }

◆ clearGroup()

void TrigConfChain::clearGroup ( )
inline

Definition at line 63 of file TrigConfChain.h.

63{ m_group.clear(); }

◆ clearStream()

void TrigConfChain::clearStream ( )
inline

Definition at line 64 of file TrigConfChain.h.

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

◆ clearStrings()

void TrigConfChain::clearStrings ( )

Definition at line 135 of file TrigConfChain.cxx.

136{
137 //
138 // Clear strings in this class and all vector classes
139 //
140 m_chain_name.clear();
141 m_lower_name.clear();
142 m_stream_name.clear();
143 m_stream_prescale.clear(); // prescale vector is meaningless without stream names
144 m_group.clear();
145 m_ebhypo_names.clear();
146
147 for(unsigned int i = 0; i < m_signature.size(); ++i) m_signature[i].clearStrings();
148}

◆ getChainName()

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

Definition at line 73 of file TrigConfChain.h.

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

◆ getCounter()

uint16_t TrigConfChain::getCounter ( ) const
inline

Definition at line 77 of file TrigConfChain.h.

77{ return m_chain_counter; }

◆ getEBHypo() [1/2]

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

Definition at line 102 of file TrigConfChain.h.

102{ return m_ebhypo_names; }

◆ getEBHypo() [2/2]

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

Definition at line 96 of file TrigConfChain.h.

96{ return m_ebhypo_names; }

◆ getEncodedId()

uint16_t TrigConfChain::getEncodedId ( ) const

Definition at line 151 of file TrigConfChain.cxx.

152{
153 //
154 // Return level id
155 //
157 return 0;
158 }
159
161}
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 101 of file TrigConfChain.h.

101{ return m_group; }

◆ getGroup() [2/2]

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

Definition at line 95 of file TrigConfChain.h.

95{ return m_group; }

◆ getId()

uint32_t TrigConfChain::getId ( ) const
inline

Definition at line 76 of file TrigConfChain.h.

76{ return m_chain_id; }

◆ getLevel()

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

Definition at line 177 of file TrigConfChain.cxx.

178{
179 //
180 // Get trigger level as integer
181 //
182 if (m_level == 1) return "L1";
183 else if(m_level == 2) return "HLT";
184
185 return "L0";
186}

◆ getLevelId()

unsigned int TrigConfChain::getLevelId ( ) const
inline

Definition at line 84 of file TrigConfChain.h.

84{ return m_level; }

◆ getLowerCounter()

uint16_t TrigConfChain::getLowerCounter ( ) const
inline

Definition at line 80 of file TrigConfChain.h.

80{ return m_lower_counter; }

◆ getLowerEncodedId()

uint16_t TrigConfChain::getLowerEncodedId ( ) const

Definition at line 164 of file TrigConfChain.cxx.

165{
166 //
167 // Get lower chain encoded id
168 //
169 if(m_level == 2) {
171 }
172
173 return 0;
174}
uint16_t getLowerCounter() const

◆ getLowerId()

uint32_t TrigConfChain::getLowerId ( ) const
inline

Definition at line 81 of file TrigConfChain.h.

81{ return m_lower_id; }

◆ getLowerIds()

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

Definition at line 104 of file TrigConfChain.h.

104{ return m_lower_ids; }

◆ getLowerName()

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

Definition at line 74 of file TrigConfChain.h.

74{ return m_lower_name; }

◆ getName()

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

Definition at line 72 of file TrigConfChain.h.

72{ return m_chain_name; }

◆ getPassThrough()

float TrigConfChain::getPassThrough ( ) const
inline

Definition at line 89 of file TrigConfChain.h.

89{ return m_pass_through; }

◆ getPrescale()

float TrigConfChain::getPrescale ( ) const
inline

Definition at line 87 of file TrigConfChain.h.

87{ return m_prescale; }

◆ getPS()

float TrigConfChain::getPS ( ) const
inline

Definition at line 88 of file TrigConfChain.h.

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

◆ getPT()

float TrigConfChain::getPT ( ) const
inline

Definition at line 90 of file TrigConfChain.h.

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

◆ getSignature()

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

Definition at line 93 of file TrigConfChain.h.

93{ return m_signature; }

◆ getSignaturePrescale()

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

Definition at line 189 of file TrigConfChain.cxx.

190{
191 //
192 // Find stream prescale
193 //
194 if(m_stream_prescale.size() != m_stream_name.size()) {
195 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfChain") << "getSignaturePrescale - logic error!";
196 return 0.0;
197 }
198
199 for(unsigned int i = 0; m_stream_name.size(); ++i) {
200 if(m_stream_name[i] == name) return m_stream_prescale[i];
201 }
202
203 return 0.0;
204}

◆ getStream() [1/2]

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

Definition at line 100 of file TrigConfChain.h.

100{ return m_stream_name; }

◆ getStream() [2/2]

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

Definition at line 94 of file TrigConfChain.h.

94{ return m_stream_name; }

◆ getStreamPS() [1/2]

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

Definition at line 99 of file TrigConfChain.h.

99{ return m_stream_prescale; }

◆ getStreamPS() [2/2]

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

Definition at line 92 of file TrigConfChain.h.

92{ return m_stream_prescale; }

◆ matchOutputTE()

bool TrigConfChain::matchOutputTE ( uint32_t te_id) const

Definition at line 207 of file TrigConfChain.cxx.

208{
209 //
210 // Match sequence to chain using signatures
211 //
212 for(std::vector<TrigConfSig>::const_iterator it = m_signature.begin();
213 it != m_signature.end(); ++it) {
214 if(it -> matchOutputTE(te_id)) {
215 return true;
216 }
217 }
218
219 return false;
220}
bool matchOutputTE(uint32_t te_id) const

◆ print()

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

Definition at line 223 of file TrigConfChain.cxx.

◆ setPassThrough()

void TrigConfChain::setPassThrough ( float val)
inline

◆ setPrescale()

void TrigConfChain::setPrescale ( float val)
inline

Definition at line 69 of file TrigConfChain.h.

69{ m_prescale = val; }

Member Data Documentation

◆ m_chain_counter

uint16_t TrigConfChain::m_chain_counter
private

Definition at line 118 of file TrigConfChain.h.

◆ m_chain_id

uint32_t TrigConfChain::m_chain_id
private

Definition at line 116 of file TrigConfChain.h.

◆ m_chain_name

std::string TrigConfChain::m_chain_name
private

Definition at line 114 of file TrigConfChain.h.

◆ m_ebhypo_names

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

Definition at line 129 of file TrigConfChain.h.

◆ m_group

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

Definition at line 128 of file TrigConfChain.h.

◆ m_level

uint8_t TrigConfChain::m_level
private

Definition at line 120 of file TrigConfChain.h.

◆ m_lower_counter

uint16_t TrigConfChain::m_lower_counter
private

Definition at line 119 of file TrigConfChain.h.

◆ m_lower_id

uint32_t TrigConfChain::m_lower_id
private

Definition at line 117 of file TrigConfChain.h.

◆ m_lower_ids

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

Definition at line 124 of file TrigConfChain.h.

◆ m_lower_name

std::string TrigConfChain::m_lower_name
private

Definition at line 115 of file TrigConfChain.h.

◆ m_pass_through

float TrigConfChain::m_pass_through
private

Definition at line 122 of file TrigConfChain.h.

◆ m_prescale

float TrigConfChain::m_prescale
private

Definition at line 121 of file TrigConfChain.h.

◆ m_signature

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

Definition at line 126 of file TrigConfChain.h.

◆ m_stream_name

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

Definition at line 127 of file TrigConfChain.h.

◆ m_stream_prescale

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

Definition at line 125 of file TrigConfChain.h.


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