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

HLT chain configuration information. More...

#include <HLTChain.h>

Inheritance diagram for TrigConf::HLTChain:

Public Member Functions

 HLTChain ()=default
 default constructor
 HLTChain (const std::string &chain_name, int chain_counter, int chain_version, const std::string &level, const std::string &lower_chain_name, int lower_chain_counter, std::vector< HLTSignature * > &&signatureList)
 constructor with configuration data
 HLTChain (const HLTChain &ch)
 copy constructor
virtual ~HLTChain () override
 destructor
const std::string & chain_name () const
int chain_counter () const
int chain_version () const
const std::string & level () const
HLTLevel level_enum () const
bool has_l2 () const
const std::string & lower_chain_name () const
int lower_chain_counter () const
unsigned int chain_hash_id () const
unsigned int lower_chain_hash_id () const
int EB_after_step () const
const std::vector< size_t > & leg_multiplicities () const
bool hasMultipleLowerChains () const
const std::vector< int > & lower_chain_counters () const
std::vector< unsigned int > lower_chain_hash_ids () const
std::vector< HLTTriggerType * > & triggerTypeList ()
const std::vector< HLTTriggerType * > & triggerTypeList () const
HLTChain & set_chain_name (const std::string &chain_name)
HLTChain & set_chain_counter (int chain_counter)
HLTChain & set_chain_version (int chain_version)
HLTChain & set_level (std::string_view level)
HLTChain & set_has_l2 (const bool has_l2)
HLTChain & set_lower_chain_name (const std::string &lower_chain_name)
HLTChain & set_lower_chain_counter (int lower_chain_counter)
HLTChain & set_lower_chain_counters (const std::vector< int > &low_ccs)
HLTChain & set_signatureList (const std::vector< HLTSignature * > &sigList)
HLTChain & set_triggerTypeList (const std::vector< HLTTriggerType * > &trigList)
HLTChain & set_groupList (const std::set< std::string > &groups)
HLTChain & set_EB_after_step (int EB_after_step)
HLTChain & set_leg_multiplicities (const std::vector< size_t > &mult)
std::vector< HLTSignature * > & signatureList ()
const std::vector< HLTSignature * > & signatureList () const
unsigned int lastStep () const
void shiftStepCounter (int shift)
void addStream (HLTStreamTag *)
void clearStreams ()
const std::vector< HLTStreamTag * > & streams () const
const std::vector< HLTStreamTag * > & streams_orig () const
std::pair< bool, float > stream_prescale (const std::string &streamName) const
const std::set< std::string > & groups () const
void addGroup (const std::string &group)
void clearGroups ()
HLTChain & set_prescales (const HLTPrescale &prescales)
HLTChain & set_prescale (float prescale)
HLTChain & set_rerun_prescale (float rerun_prescale)
HLTChain & set_pass_through (float pass_through)
HLTPrescale & prescales ()
const HLTPrescale & prescales () const
float prescale () const
float pass_through () const
std::pair< bool, float > rerun_prescale (const std::string &targetName) const
bool operator< (const HLTChain &e) const
void createSignatureLabels ()
 label the signatures
void print (const std::string &indent="", unsigned int detail=1) const override
 print the chain
void writeXML (std::ofstream &xmlfile)
DiffStruct * compareTo (const HLTChain *o) const
std::string __str__ () const override
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

Public Attributes

struct { 
   unsigned int   l2 {0} 
   unsigned int   ef {0} 
} mergeCounter

Protected Member Functions

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

Private Attributes

unsigned int m_chain_hash_id {0}
 hash value from m_chain_name, this is used to identify the chain in the HLTResult
int m_chain_counter {0}
 chain counter
int m_chain_version {0}
 chain version
std::string m_level
 trigger level
std::string m_lower_chain_name
 name of the lower trigger chain (or the LVL1 trigger item)
int m_lower_chain_counter {0}
 counter of the lower trigger chain (or the ID of the LVL1 trigger item)
std::vector< int > m_lower_chain_counters
 counters of the lower trigger items if more than 1
unsigned int m_lower_chain_hash_id {0}
 hash value from m_lower_chain_name, this is used to match to a chain from the previous trigger level
int m_EB_after_step {-1}
 EB_after_step flag.
std::vector< size_t > m_leg_multiplicities
 Number of objects required per leg.
HLTPrescale m_prescales
std::vector< HLTSignature * > m_HLTSignatureList
std::vector< HLTTriggerType * > m_HLTTriggerTypeList
std::set< std::string > m_groups
std::vector< HLTStreamTag * > m_streams_orig
std::vector< HLTStreamTag * > m_streams
std::unordered_map< std::string, HLTStreamTag * > m_streams_map
bool m_has_l2 {false}
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 HLTChain &)

Detailed Description

HLT chain configuration information.

Definition at line 35 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

Constructor & Destructor Documentation

◆ HLTChain() [1/3]

TrigConf::HLTChain::HLTChain ( )
default

default constructor

◆ HLTChain() [2/3]

HLTChain::HLTChain ( const std::string & chain_name,
int chain_counter,
int chain_version,
const std::string & level,
const std::string & lower_chain_name,
int lower_chain_counter,
std::vector< HLTSignature * > && signatureList )

constructor with configuration data

Parameters
chain_namechain name
chain_counterchain counter
chain_versionchain version
leveltrigger level
lower_chain_namename of lower chain
lower_chain_countercounter of lower chain
prescaleprescale value of the chain
pass_throughpass_through flag of the chain
signatureListlist of signatures that the chain consists of

Definition at line 28 of file TrigConfHLTData/Root/HLTChain.cxx.

34 :
38 m_level ( level ),
41 m_EB_after_step (-1 ),
43{
46 // create signalture id's (labels)
50}
const std::string & lower_chain_name() const
std::vector< HLTSignature * > & signatureList()
unsigned int m_lower_chain_hash_id
hash value from m_lower_chain_name, this is used to match to a chain from the previous trigger level
std::string m_lower_chain_name
name of the lower trigger chain (or the LVL1 trigger item)
void createSignatureLabels()
label the signatures
unsigned int m_chain_hash_id
hash value from m_chain_name, this is used to identify the chain in the HLTResult
int m_lower_chain_counter
counter of the lower trigger chain (or the ID of the LVL1 trigger item)
std::vector< HLTSignature * > m_HLTSignatureList
static HLTHash string2hash(std::string_view, const std::string &category=s_defaultCategory)
hash function translating TE names into identifiers
void setName(const std::string &name)
TrigConfData(const std::string &name="")
void setVersion(unsigned int version)

◆ HLTChain() [3/3]

HLTChain::HLTChain ( const HLTChain & ch)

copy constructor

does a deep copy of everything underneath

Definition at line 53 of file TrigConfHLTData/Root/HLTChain.cxx.

53 :
54 TrigConfData(o),
55 m_chain_hash_id ( o.m_chain_hash_id ),
56 m_chain_counter ( o.m_chain_counter ),
57 m_chain_version ( o.m_chain_version ),
58 m_level ( o.m_level ),
59 m_lower_chain_name ( o.m_lower_chain_name ),
60 m_lower_chain_counter ( o.m_lower_chain_counter ),
61 m_lower_chain_counters( o.m_lower_chain_counters ),
62 m_EB_after_step ( o.m_EB_after_step ),
63 m_prescales ( o.m_prescales ),
64 m_groups ( o.m_groups ),
65 m_has_l2 ( o.m_has_l2 )
66{
67 // deep copy to ensure ownership
68 for(HLTSignature* sig : o.m_HLTSignatureList)
69 m_HLTSignatureList.push_back(new HLTSignature(*sig));
70
71 for(HLTTriggerType* tt : o.m_HLTTriggerTypeList)
72 m_HLTTriggerTypeList.push_back(new HLTTriggerType(*tt));
73
74 for(HLTStreamTag* tt : o.m_streams_orig)
75 m_streams_orig.push_back(new HLTStreamTag(*tt));
76
77 for(HLTStreamTag* tt : o.m_streams)
78 m_streams.push_back(new HLTStreamTag(*tt));
79
80 for(const auto& strstream : o.m_streams_map)
81 m_streams_map.emplace(strstream.first, new HLTStreamTag(*strstream.second) ) ;
82}
std::unordered_map< std::string, HLTStreamTag * > m_streams_map
std::vector< HLTStreamTag * > m_streams_orig
std::vector< int > m_lower_chain_counters
counters of the lower trigger items if more than 1
std::vector< HLTStreamTag * > m_streams
std::vector< HLTTriggerType * > m_HLTTriggerTypeList

◆ ~HLTChain()

TrigConf::HLTChain::~HLTChain ( )
overridevirtual

destructor

Definition at line 85 of file TrigConfHLTData/Root/HLTChain.cxx.

85 {
86 for(HLTSignature *sig : m_HLTSignatureList) delete sig;
87 for(HLTTriggerType *tt : m_HLTTriggerTypeList) delete tt;
89}

Member Function Documentation

◆ __str__()

string HLTChain::__str__ ( ) const
overridevirtual

Reimplemented from TrigConf::TrigConfData.

Definition at line 453 of file TrigConfHLTData/Root/HLTChain.cxx.

453 {
454 stringstream s;
455 s << *this;
456 return s.str();
457}

◆ addGroup()

void TrigConf::HLTChain::addGroup ( const std::string & group)
inline

Definition at line 125 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

125{ m_groups.insert(group); }

◆ addStream()

void TrigConf::HLTChain::addStream ( HLTStreamTag * stream)

Definition at line 227 of file TrigConfHLTData/Root/HLTChain.cxx.

227 {
228 if(m_streams_map.find(stream->name()) != m_streams_map.end())
229 throw runtime_error(string("Can not add stream '")+ stream->name() + "' to chain '" + name() + "', since it exists already.");
230
231 m_streams_orig.push_back(stream);
232 HLTStreamTag *cp = new HLTStreamTag(*stream);
233 m_streams.push_back(cp);
234 m_streams_map.insert(std::pair<std::string, HLTStreamTag*>(cp->name(),cp));
235
236 // copy the stream prescales from the prescales to the live prescales
237 std::pair<bool, float> sps = prescales().getStreamPrescale(cp->name());
238 if(sps.first)
239 cp->set_prescale(sps.second);
240}
std::pair< bool, float > getStreamPrescale(std::string_view streamName) const
const std::string & name() const

◆ chain_counter()

int TrigConf::HLTChain::chain_counter ( ) const
inline

Definition at line 74 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

74{ return m_chain_counter; }

◆ chain_hash_id()

unsigned int TrigConf::HLTChain::chain_hash_id ( ) const
inline

Definition at line 81 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

81{ return m_chain_hash_id; }

◆ chain_name()

const std::string & TrigConf::HLTChain::chain_name ( ) const
inline

Definition at line 73 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

73{ return name(); }

◆ chain_version()

int TrigConf::HLTChain::chain_version ( ) const
inline

Definition at line 75 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

75{ return m_chain_version; }

◆ clearGroups()

void TrigConf::HLTChain::clearGroups ( )
inline

Definition at line 126 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

126{ m_groups.clear(); }

◆ clearStreams()

void TrigConf::HLTChain::clearStreams ( )

Definition at line 243 of file TrigConfHLTData/Root/HLTChain.cxx.

243 {
244 // The memory management between the streams map and the stream vectors is completely confused
245 // It's going to be too invasive a change to fix that directly so instead just make sure that
246 // everything is correctly deleted at the end
247 std::unordered_set<HLTStreamTag *> deleted;
248 for(HLTStreamTag *s : m_streams_orig)
249 if (deleted.insert(s).second)
250 delete s;
251 for(HLTStreamTag *s : m_streams)
252 if (deleted.insert(s).second)
253 delete s;
254 for (auto &p : m_streams_map)
255 if (deleted.insert(p.second).second)
256 delete p.second;
257 m_streams_orig.clear();
258 m_streams.clear();
259 m_streams_map.clear();
260}

◆ 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::HLTChain::compareTo ( const HLTChain * o) const

Definition at line 286 of file TrigConfHLTData/Root/HLTChain.cxx.

286 {
287 DiffStruct * ds = new DiffStruct("CHAIN");
288 ds->check("chain_counter", chain_counter(), o->chain_counter());
289 ds->check("lower_chain_name", orderLowerChainNames(lower_chain_name()), orderLowerChainNames(o->lower_chain_name()) );
290 ds->check("level", level(), o->level());
291 ds->check("prescale", prescales().prescale(), o->prescales().prescale());
292 ds->check("pass_through", prescales().pass_through(), o->prescales().pass_through());
293// for(StreamTag* st : streamTagList()) {
294// o->streamTagList() st->name()
295
296// }
297
298
299 if(!ds->empty()) {
300 ds->name = name();
301 } else {
302 delete ds; ds=0;
303 }
304 return ds;
305
306}
float pass_through() const
Definition HLTPrescale.h:57
float prescale() const
Definition HLTPrescale.h:56

◆ createSignatureLabels()

void TrigConf::HLTChain::createSignatureLabels ( )

label the signatures

Definition at line 171 of file TrigConfHLTData/Root/HLTChain.cxx.

171 {
172 for (HLTSignature* signature : m_HLTSignatureList) {
173 std::stringstream os;
174 os << chain_name() << "_" << signature->signature_counter();
175 signature->set_label( os.str() );
176 }
177}

◆ EB_after_step()

int TrigConf::HLTChain::EB_after_step ( ) const
inline

Definition at line 83 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

83{ return m_EB_after_step; }

◆ groups()

const std::set< std::string > & TrigConf::HLTChain::groups ( ) const
inline

Definition at line 124 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

124{ return m_groups; }

◆ has_l2()

bool TrigConf::HLTChain::has_l2 ( ) const
inline

Definition at line 78 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

78{ return m_has_l2; }

◆ hasMultipleLowerChains()

bool TrigConf::HLTChain::hasMultipleLowerChains ( ) const

Definition at line 93 of file TrigConfHLTData/Root/HLTChain.cxx.

93 {
94 return m_lower_chain_name.find(',')!=std::string::npos;
95}

◆ 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}
size_t size() const
Number of registered mappings.
const double width

◆ lastStep()

unsigned int HLTChain::lastStep ( ) const

Definition at line 157 of file TrigConfHLTData/Root/HLTChain.cxx.

157 {
158 if(m_HLTSignatureList.empty())
159 return 0;
160 return m_HLTSignatureList[m_HLTSignatureList.size()-1]->step();
161}

◆ leg_multiplicities()

const std::vector< size_t > & TrigConf::HLTChain::leg_multiplicities ( ) const
inline

Definition at line 84 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

84{ return m_leg_multiplicities; }
std::vector< size_t > m_leg_multiplicities
Number of objects required per leg.

◆ level()

const std::string & TrigConf::HLTChain::level ( ) const
inline

Definition at line 76 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

76{ return m_level; }

◆ level_enum()

HLTLevel TrigConf::HLTChain::level_enum ( ) const
inline

Definition at line 77 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

77{ return m_level=="L2"?L2:(m_level=="EF"?EF:HLT); }

◆ lower_chain_counter()

int TrigConf::HLTChain::lower_chain_counter ( ) const
inline

Definition at line 80 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

80{ return m_lower_chain_counter; }

◆ lower_chain_counters()

const std::vector< int > & TrigConf::HLTChain::lower_chain_counters ( ) const

Definition at line 99 of file TrigConfHLTData/Root/HLTChain.cxx.

99 {
101}

◆ lower_chain_hash_id()

unsigned int TrigConf::HLTChain::lower_chain_hash_id ( ) const
inline

Definition at line 82 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

82{ return m_lower_chain_hash_id; }

◆ lower_chain_hash_ids()

vector< unsigned int > TrigConf::HLTChain::lower_chain_hash_ids ( ) const

Definition at line 113 of file TrigConfHLTData/Root/HLTChain.cxx.

113 {
114 vector<unsigned int> ids;
115 vector<std::string> names = parse(m_lower_chain_name);
116 for ( unsigned i = names.size(); i-- ; ) {
117 ids.push_back(HLTUtils::string2hash(names[i]));
118 }
119 return ids;
120}
std::vector< std::string > parse(std::string names)

◆ lower_chain_name()

const std::string & TrigConf::HLTChain::lower_chain_name ( ) const
inline

Definition at line 79 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

79{ return m_lower_chain_name; }

◆ name()

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

Definition at line 22 of file TrigConfData.h.

22{return m_name;}

◆ operator<()

bool TrigConf::HLTChain::operator< ( const HLTChain & e) const
inline

Definition at line 140 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

140 {
141 return m_level[0]>e.m_level[0] ||
142 (m_level[0]==e.m_level[0] && m_chain_counter<e.m_chain_counter);
143 }

◆ pass_through()

float TrigConf::HLTChain::pass_through ( ) const
inline

Definition at line 137 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

137{ return prescales().pass_through(); }

◆ prescale()

float TrigConf::HLTChain::prescale ( ) const
inline

Definition at line 136 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

136{ return prescales().prescale(); }

◆ prescales() [1/2]

HLTPrescale & TrigConf::HLTChain::prescales ( )
inline

Definition at line 134 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

134{ return m_prescales; }

◆ prescales() [2/2]

const HLTPrescale & TrigConf::HLTChain::prescales ( ) const
inline

Definition at line 135 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

135{ return m_prescales; }

◆ print()

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

print the chain

Implements TrigConf::TrigConfData.

Definition at line 356 of file TrigConfHLTData/Root/HLTChain.cxx.

356 {
357 if(detail>=2) {
358 int dp = cout.precision();
359 cout.unsetf(ios_base::floatfield);
360 cout.precision(3);
361 //cout.setf(std::ios::fixed, std::ios::floatfield);
362
363 cout << indent << "HLTChain chainid = " << chain_counter() << " ";
364 printNameIdV();
365 if(detail>=3) {
366 cout << " | counter: " << chain_counter();
367 if(level()!="HLT") {
368 cout << " | " << level()
369 << " | lower chain: " << lower_chain_name()
370 << " | lower chain counter: " << lower_chain_counter();
371 } else {
372 cout << " | CTP input: " << lower_chain_name()
373 << " | lower chain counter: " << lower_chain_counter();
374 }
375 cout << " | prescale: " << prescale()
376 << " | pass through: " << pass_through();
377
378 cout << " | rerun: " << prescales().getRerunPrescales().size() << " [ ";
379 for(HLTPrescale::value_type rrps : prescales().getRerunPrescales())
380 cout << rrps.first << ":" << rrps.second << " ";
381 cout << "]" << std::endl;
382
383 }
384 if(detail>=4) {
385 cout << indent << " Groups : " << groups().size() << " [ ";
386 for(const string& group : groups()) cout << "'" << group << "' ";
387 cout << "]" << std::endl;
388
389 cout << indent << " Trigger type bits : " << triggerTypeList().size() << " [ ";
390 for(HLTTriggerType* tt : triggerTypeList()) cout << tt->bit() << " ";
391 cout << "]" << std::endl;
392
393 cout << indent << " Streams : " << streams().size() << endl;
394 for(HLTStreamTag* streamTag : streams()) cout << indent << " " << *streamTag;
395
396 cout << indent << " Steps : " << signatureList().size() << endl;
397 for(HLTSignature* sig : signatureList()) sig->print(indent);
398 cout << indent << "---------------------------------------------------------- " << endl;
399 }
400
401 cout.precision(dp);
402 }
403}
const std::vector< HLTStreamTag * > & streams() const
const std::set< std::string > & groups() const
std::vector< HLTTriggerType * > & triggerTypeList()
PrescaleMap_t::value_type value_type
Definition HLTPrescale.h:47
const PrescaleMap_t & getRerunPrescales() const
Definition HLTPrescale.h:60
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const

◆ 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

◆ rerun_prescale()

std::pair< bool, float > TrigConf::HLTChain::rerun_prescale ( const std::string & targetName) const
inline

Definition at line 138 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

138{ return prescales().getRerunPrescale(targetName); }
std::pair< bool, float > getRerunPrescale(std::string_view targetName) const

◆ set_chain_counter()

HLTChain & TrigConf::HLTChain::set_chain_counter ( int chain_counter)
inline

Definition at line 94 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

94{ m_chain_counter = chain_counter; return *this; }

◆ set_chain_name()

TrigConf::HLTChain & TrigConf::HLTChain::set_chain_name ( const std::string & chain_name)

Definition at line 124 of file TrigConfHLTData/Root/HLTChain.cxx.

124 {
127 return *this;
128}

◆ set_chain_version()

HLTChain & TrigConf::HLTChain::set_chain_version ( int chain_version)
inline

Definition at line 95 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

95{ m_chain_version = chain_version; return *this; }

◆ set_EB_after_step()

HLTChain & TrigConf::HLTChain::set_EB_after_step ( int EB_after_step)
inline

◆ set_groupList()

HLTChain & TrigConf::HLTChain::set_groupList ( const std::set< std::string > & groups)
inline

Definition at line 103 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

103{ m_groups = groups; return *this; }

◆ set_has_l2()

HLTChain & TrigConf::HLTChain::set_has_l2 ( const bool has_l2)
inline

Definition at line 97 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

97{ m_has_l2 = has_l2; return *this; }

◆ set_leg_multiplicities()

HLTChain & TrigConf::HLTChain::set_leg_multiplicities ( const std::vector< size_t > & mult)
inline

Definition at line 105 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

105{ m_leg_multiplicities = mult; return *this; }

◆ set_level()

HLTChain & TrigConf::HLTChain::set_level ( std::string_view level)
inline

Definition at line 96 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

96{ m_level.assign(level); return *this; }

◆ set_lower_chain_counter()

HLTChain & TrigConf::HLTChain::set_lower_chain_counter ( int lower_chain_counter)
inline

Definition at line 99 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ set_lower_chain_counters()

HLTChain & TrigConf::HLTChain::set_lower_chain_counters ( const std::vector< int > & low_ccs)
inline

Definition at line 100 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

100{ m_lower_chain_counters = low_ccs; return *this; }

◆ set_lower_chain_name()

TrigConf::HLTChain & TrigConf::HLTChain::set_lower_chain_name ( const std::string & lower_chain_name)

◆ set_pass_through()

HLTChain & TrigConf::HLTChain::set_pass_through ( float pass_through)
inline

Definition at line 132 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

132{ m_prescales.setPassThrough(pass_through); return *this; }

◆ set_prescale()

HLTChain & TrigConf::HLTChain::set_prescale ( float prescale)
inline

Definition at line 130 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

130{ m_prescales.setPrescale(prescale); return *this; }

◆ set_prescales()

TrigConf::HLTChain & TrigConf::HLTChain::set_prescales ( const HLTPrescale & prescales)

Definition at line 196 of file TrigConfHLTData/Root/HLTChain.cxx.

196 {
197
198 // copy the original (menu) stream prescales to the live set
199 for(HLTStreamTag* stream : m_streams_orig) {
200 HLTStreamTag* target = m_streams_map[stream->name()];
201 target->set_prescale(stream->prescale());
202 }
203
204 // copy the stream prescales from the new HLTPprescale to the live set
205
206 for(HLTPrescale::value_type ps : prescales.getStreamPrescales()) {
207 const string & streamName = ps.first;
208
209 HLTStreamTag* streamTag = findStreamTag(m_streams, streamName);
210
211 if(streamTag) {
212 streamTag->set_prescale(ps.second);
213 } else {
214 //throw runtime_error(string("Can not set prescale for stream ")+ ps.first + "since chain '" + name() + "' does not write to that stream.");
215 cerr << "TrigConf::HLTChain WARNING Can not set prescale for stream '" + streamName + "' since chain '" + name() + "' does not write to that stream. Available are" << endl;
216 for(auto stream : m_streams) {
217 cout << " Available are " << stream->name() << endl;
218 }
219 }
220 }
222 return *this;
223}
void set_prescale(float val)

◆ set_rerun_prescale()

HLTChain & TrigConf::HLTChain::set_rerun_prescale ( float rerun_prescale)
inline

Definition at line 131 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

131{ m_prescales.setRerunPrescale("",rerun_prescale); return *this; }
std::pair< bool, float > rerun_prescale(const std::string &targetName) const

◆ set_signatureList()

TrigConf::HLTChain & TrigConf::HLTChain::set_signatureList ( const std::vector< HLTSignature * > & sigList)

Definition at line 150 of file TrigConfHLTData/Root/HLTChain.cxx.

150 {
151 m_HLTSignatureList = sigList;
153 return *this;
154}

◆ set_triggerTypeList()

TrigConf::HLTChain & TrigConf::HLTChain::set_triggerTypeList ( const std::vector< HLTTriggerType * > & trigList)

Definition at line 131 of file TrigConfHLTData/Root/HLTChain.cxx.

132{
133 for (HLTTriggerType *tt : m_HLTTriggerTypeList)
134 delete tt;
135 m_HLTTriggerTypeList = trigList;
136 return *this;
137}

◆ setComment()

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

Definition at line 32 of file TrigConfData.h.

◆ setId()

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

Definition at line 29 of file TrigConfData.h.

29{ m_id=id; }

◆ 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.

◆ shiftStepCounter()

void HLTChain::shiftStepCounter ( int shift)

Definition at line 164 of file TrigConfHLTData/Root/HLTChain.cxx.

164 {
165 for(HLTSignature* sig : m_HLTSignatureList)
166 sig->set_signature_counter( sig->signature_counter() + shift );
167}

◆ signatureList() [1/2]

std::vector< HLTSignature * > & TrigConf::HLTChain::signatureList ( )
inline

Definition at line 109 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

109{ return m_HLTSignatureList; }

◆ signatureList() [2/2]

const std::vector< HLTSignature * > & TrigConf::HLTChain::signatureList ( ) const
inline

Definition at line 110 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

110{ return m_HLTSignatureList; }

◆ smk()

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

Definition at line 20 of file TrigConfData.h.

20{return m_smk;}

◆ stream_prescale()

std::pair< bool, float > TrigConf::HLTChain::stream_prescale ( const std::string & streamName) const

Definition at line 263 of file TrigConfHLTData/Root/HLTChain.cxx.

263 {
264 std::unordered_map<std::string, HLTStreamTag*>::const_iterator i = m_streams_map.find(streamName);
265 bool found = (i!=m_streams_map.cend());
266 float ps = found ? i->second->prescale() : 0;
267 return std::make_pair(found,ps);
268}

◆ streams()

const std::vector< HLTStreamTag * > & TrigConf::HLTChain::streams ( ) const
inline

Definition at line 118 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

118{ return m_streams; }

◆ streams_orig()

const std::vector< HLTStreamTag * > & TrigConf::HLTChain::streams_orig ( ) const
inline

Definition at line 119 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

119{ return m_streams_orig; }

◆ superMasterTableId()

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

Definition at line 19 of file TrigConfData.h.

19{return (int)m_smk;}

◆ triggerTypeList() [1/2]

std::vector< HLTTriggerType * > & TrigConf::HLTChain::triggerTypeList ( )
inline

Definition at line 89 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

89{ return m_HLTTriggerTypeList; }

◆ triggerTypeList() [2/2]

const std::vector< HLTTriggerType * > & TrigConf::HLTChain::triggerTypeList ( ) const
inline

Definition at line 90 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

90{ return m_HLTTriggerTypeList; }

◆ version()

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

Definition at line 24 of file TrigConfData.h.

24{return m_version;}

◆ writeXML()

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

Definition at line 310 of file TrigConfHLTData/Root/HLTChain.cxx.

310 {
311 xmlfile << " <CHAIN chain_counter=\"" << chain_counter() << "\" "
312 << "chain_name=\"" << name() << "\" "
313 << "level=\"" << m_level << "\" "
314 << "lower_chain_name=\"" << m_lower_chain_name << "\" "
315 << "pass_through=\"" << prescales().pass_through() << "\" "
316 << "prescale=\"" << prescales().prescale() << "\">"
317 << endl;
318
319 xmlfile << " <PRESCALES"
320 << " chain_counter=\"" << chain_counter() << "\""
321 << " level=\"" << m_level << "\""
322 << " prescale=\"" << prescales().prescale() << "\""
323 << " pass_through=\"" << prescales().pass_through() << "\"";
324 if(prescales().getRerunPrescales().size()==0) {
325 xmlfile << "/>" << endl;
326 } else {
327 xmlfile << ">" << endl;
328 for(HLTPrescale::value_type rerun_ps : prescales().getRerunPrescales())
329 xmlfile << " <RERUN_PRESCALES target=\"" << rerun_ps.first << "\" prescale=\"" << rerun_ps.second << "\"/>" << endl;
330 xmlfile << " </PRESCALES>" << endl;
331 }
332
333 xmlfile << " <TRIGGERTYPE_LIST/>" << endl;
334
335 xmlfile << " <STREAMTAG_LIST>" << endl;
336 for (const TrigConf::HLTStreamTag* streamTag : m_streams)
337 streamTag->writeXML(xmlfile);
338 xmlfile << " </STREAMTAG_LIST>" << endl;
339
340 xmlfile << " <GROUP_LIST>" << endl;
341 for (const string& group : m_groups)
342 xmlfile << " <GROUP name=\"" << group << "\"/>" << endl;
343 xmlfile << " </GROUP_LIST>" << endl;
344
345 xmlfile << " <SIGNATURE_LIST>" << endl;
346 for(TrigConf::HLTSignature* signature : m_HLTSignatureList)
347 signature->writeXML(xmlfile);
348 xmlfile << " </SIGNATURE_LIST>" << endl;
349
350 xmlfile << " </CHAIN>" << endl;
351
352 return;
353}
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29

◆ operator<<

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

Member Data Documentation

◆ ef

unsigned int TrigConf::HLTChain::ef {0}

Definition at line 191 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

191{0};

◆ l2

unsigned int TrigConf::HLTChain::l2 {0}

Definition at line 190 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

190{0};

◆ m_chain_counter

int TrigConf::HLTChain::m_chain_counter {0}
private

chain counter

Definition at line 163 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

163{0};

◆ m_chain_hash_id

unsigned int TrigConf::HLTChain::m_chain_hash_id {0}
private

hash value from m_chain_name, this is used to identify the chain in the HLTResult

Definition at line 162 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

162{0};

◆ m_chain_version

int TrigConf::HLTChain::m_chain_version {0}
private

chain version

Definition at line 164 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

164{0};

◆ m_comment

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

Definition at line 48 of file TrigConfData.h.

◆ m_EB_after_step

int TrigConf::HLTChain::m_EB_after_step {-1}
private

EB_after_step flag.

Definition at line 170 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

170{-1};

◆ m_groups

std::set<std::string> TrigConf::HLTChain::m_groups
private

Definition at line 176 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_has_l2

bool TrigConf::HLTChain::m_has_l2 {false}
private

Definition at line 182 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

182{false};

◆ m_HLTSignatureList

std::vector<HLTSignature*> TrigConf::HLTChain::m_HLTSignatureList
private

Definition at line 174 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_HLTTriggerTypeList

std::vector<HLTTriggerType*> TrigConf::HLTChain::m_HLTTriggerTypeList
private

Definition at line 175 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_id

unsigned int TrigConf::TrigConfData::m_id
privateinherited

Definition at line 45 of file TrigConfData.h.

◆ m_leg_multiplicities

std::vector<size_t> TrigConf::HLTChain::m_leg_multiplicities
private

Number of objects required per leg.

NOTE: Run3 only quantity

Definition at line 171 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_level

std::string TrigConf::HLTChain::m_level
private

trigger level

Definition at line 165 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_lower_chain_counter

int TrigConf::HLTChain::m_lower_chain_counter {0}
private

counter of the lower trigger chain (or the ID of the LVL1 trigger item)

Definition at line 167 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

167{0};

◆ m_lower_chain_counters

std::vector<int> TrigConf::HLTChain::m_lower_chain_counters
private

counters of the lower trigger items if more than 1

Definition at line 168 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_lower_chain_hash_id

unsigned int TrigConf::HLTChain::m_lower_chain_hash_id {0}
private

hash value from m_lower_chain_name, this is used to match to a chain from the previous trigger level

Definition at line 169 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

169{0};

◆ m_lower_chain_name

std::string TrigConf::HLTChain::m_lower_chain_name
private

name of the lower trigger chain (or the LVL1 trigger item)

Definition at line 166 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_name

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

Definition at line 46 of file TrigConfData.h.

◆ m_prescales

HLTPrescale TrigConf::HLTChain::m_prescales
private

Definition at line 172 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_smk

unsigned int TrigConf::TrigConfData::m_smk
privateinherited

Definition at line 44 of file TrigConfData.h.

◆ m_streams

std::vector<HLTStreamTag*> TrigConf::HLTChain::m_streams
private

Definition at line 178 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_streams_map

std::unordered_map<std::string, HLTStreamTag*> TrigConf::HLTChain::m_streams_map
private

Definition at line 179 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_streams_orig

std::vector<HLTStreamTag*> TrigConf::HLTChain::m_streams_orig
private

Definition at line 177 of file TrigConfHLTData/TrigConfHLTData/HLTChain.h.

◆ m_version

unsigned int TrigConf::TrigConfData::m_version
privateinherited

Definition at line 47 of file TrigConfData.h.

◆ [struct]

struct { ... } TrigConf::HLTChain::mergeCounter

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