27 throw std::runtime_error(
"HLTPrescaleSetCollection::operator= is not implemented");
33 throw std::runtime_error(
"HLTPrescaleSetCollection::operator= is not implemented");
64 throw runtime_error(
"HLTPrescaleSetCollecion access with LBN which is smaller than the first prescale set");
70 if( psinfo.lb > lumiblock )
break;
104 if( psinfo_it->lb >= add_psinfo.
lb )
break;
112 if( (psinfo_it !=
m_prescaleSets.end()) && (psinfo_it->lb == add_psinfo.
lb) ) {
113 delete psinfo_it->pss;
114 psinfo_it->pss = add_psinfo.
pss;
116 psinfo_it->psk = add_psinfo.
psk;
124vector<pair<unsigned int, unsigned int> >
126 vector<pair<unsigned int, unsigned int> > lbpsk;
128 lbpsk.push_back(std::make_pair(psinfo.lb,psinfo.psk));
135 vector<pair<unsigned int, unsigned int> > lbnpsk;
136 lbnpsk.push_back(make_pair(0,hltpsk));
145 for(
auto & lbpsk : lbnpsk) {
146 if( !
contains(lbpsk.first, lbpsk.second)) {
156 if( psinfo.lb==lumiblock && psinfo.psk==psk )
return true;
165 unsigned int count_loaded(0);
167 if(psinfo.pss!=0) count_loaded++;
169 cout << indent <<
"HLTPrescaleSetCollection has " <<
size() <<
" prescale set(s) defined, " << count_loaded <<
" loaded." << endl;
171 cout << indent <<
" LB PSK Loaded Name" << endl;
173 cout << indent << setw(9) << right << psinfo.lb << setw(9) << right << psinfo.psk <<
" " << (psinfo.pss!=0?
"yes":
" no")
174 <<
" " << (psinfo.pss!=0?psinfo.pss->name():
"") << endl;
178 psinfo.pss->print(indent+
" ",
detail);
186 lock_guard<recursive_mutex> lock(c.m_prescaleSetCollection_mutex);
187 o <<
"HLTPrescaleSetCollection has " << c.size() <<
" prescale sets" << endl;
189 o <<
" LB Prescale set key Loaded Prescale set" << endl;
191 o << setw(9) << psinfo.
lb << setw(19) << psinfo.
psk <<
" " << (psinfo.
pss!=0?
"yes":
" no")
192 <<
" " << (psinfo.
pss!=0?psinfo.
pss->
name():
"") << endl;
HLT chain configuration information.
void clear()
Deletes all prescale sets.
void print(const std::string &indent="", unsigned int detail=1) const
Print the prescale set.
std::recursive_mutex m_prescaleSetCollection_mutex
Mutex for m_prescaleSetCollection.
HLTPrescaleSetCollection()
default constructor
std::vector< std::pair< unsigned int, unsigned int > > prescale_keys() const
void addPrescaleSet(unsigned int lumiblock, HLTPrescaleSet *pss)
Add prescale set for this lumiblock number.
std::string __str__() const
HLTPrescaleSet * setPrescaleSet(HLTPrescaleSet *pss)
Add prescale set for this lumiblock number.
void set_prescale_key_to_load(unsigned int)
std::list< cont > m_prescaleSets
all prescale sets with start lb
HLTPrescaleSet * thePrescaleSet(unsigned int lumiblock) const
get prescale set for lumiblock and set the internal current lumiblock counter
~HLTPrescaleSetCollection()
destructor
void set_prescale_keys_to_load(const std::vector< std::pair< unsigned int, unsigned int > > &)
HLTPrescaleSetCollection & operator=(const HLTPrescaleSetCollection &)
bool contains(unsigned int lumiblock, unsigned int psk)
Check if prescale set with this lumiblock and prescale keys exists.
size_t size() const
number of prescale sets
const HLTPrescaleSet * prescaleSet(unsigned int lumiblock) const
HLT chain configuration information.
const std::string & name() const
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
Forward iterator to traverse the main components of the trigger configuration.
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)