24 ScalingMap_t::iterator s = map.find(chain_counter);
26 s = map.insert(ScalingMap_t::value_type(chain_counter,
sc)).first;
37 return !map_for_level.empty() && map_for_level.count(
counter)>0;
44 ScalingMap_t::const_iterator s = map.find(chain_counter);
46 cerr <<
"HLTPrescaleSet::getPrescale: chain counter " << chain_counter <<
" in level " << level <<
" has no prescales" << endl;
47 throw std::runtime_error(
"HLTPrescaleSet::getPrescale: chain has no prescales defined");
55 ScalingMap_t::iterator s = map.find(chain_counter);
57 s = map.insert(ScalingMap_t::value_type(chain_counter,
HLTPrescale())).first;
90 unsigned long long iovtime =
run;
100 for(
unsigned int i = 0; i<3; ++i )
112 cout.unsetf(ios_base::floatfield);
113 for(
unsigned int i=
L2; i<=
HLT; i++) {
115 if(
size(level)==0)
continue;
117 cout <<
indent <<
" " << (level==
L2?
"L2":
"EF") <<
" prescales:" << endl;
121 for(
uint cc=0; cc<8192;cc++) {
122 auto s_iter = map.find(cc);
123 if(s_iter==map.end())
continue;
125 cout <<
indent <<
" Chain counter: " << setw(4) << cc
126 <<
", prescale: " << setw(4) << s.prescale()
127 <<
", pass-through: " << setw(4) << s.pass_through();
128 if( s.getRerunPrescales().size()>0 ) {
129 cout <<
", rerun prescales: ";
130 for( HLTPrescale::PrescaleMap_t::value_type ps: s.getRerunPrescales())
131 cout << ps.first <<
": " << ps.second <<
", ";
133 if( s.getStreamPrescales().size()>0 ) {
134 cout <<
", stream prescales: ";
135 for( HLTPrescale::PrescaleMap_t::value_type str_ps: s.getStreamPrescales())
136 cout << str_ps.first <<
": " << str_ps.second <<
", ";
149 o <<
"HLTPrescaleSet " << c.name();
150 if(c.id()>0 || c.version()>0) o <<
" (id=" << c.id() <<
"/v=" << c.version() <<
")";
152 if(c.comment()!=
"") o <<
"Comment : " << c.comment() << endl;
156 if(c.size(level)==0)
continue;
157 o << (level==
TrigConf::L2?
"L2":
"EF") <<
" prescales:" << endl;
158 for(
const TrigConf::HLTPrescaleSet::ScalingMap_t::value_type&
sc: c.getPrescales(level)) {
159 o <<
"Chain counter: " << setw(4) <<
sc.first
160 <<
", prescale: " << setw(4) <<
sc.second.prescale()
161 <<
", pass-through: " << setw(4) <<
sc.second.pass_through()
165 o <<
"---------------------------------------------------------- " << endl;
HLT chain configuration information.
void print(const std::string &indent="", unsigned int detail=1) const override
print the prescale set
size_t size(HLTLevel level=HLT) const
std::array< ScalingMap_t, 3 > m_scalers
void setIOV(uint32_t start_run, uint32_t start_lb, uint32_t end_run, uint32_t end_lb)
sets the IOV of the prescale set
HLTPrescaleSet()
default constructor
void getIOV(uint32_t &start_run, uint32_t &start_lb, uint32_t &end_run, uint32_t &end_lb) const
gets the IOV of the prescale set
bool isValid(uint32_t run, uint32_t lb) const
checks if run/lb are in the current IOV
std::string __str__() const override
bool hasPrescale(unsigned int counter, TrigConf::HLTLevel level=HLT) const
HLTPrescale & thePrescale(unsigned int chain_counter, HLTLevel level)
HLTPrescale & setPrescale(const HLTPrescale &sc, unsigned int chain_counter, HLTLevel level=HLT)
const HLTPrescale & getPrescale(unsigned int chain_counter, HLTLevel level=HLT) const
std::unordered_map< unsigned int, HLTPrescale > ScalingMap_t
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Forward iterator to traverse the main components of the trigger configuration.
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)