18 m_prescaleSetCollection_mutex()
27 throw std::runtime_error(
"HLTPrescaleSetCollection::operator= is not implemented");
33 throw std::runtime_error(
"HLTPrescaleSetCollection::operator= is not implemented");
56 lock_guard<recursive_mutex> lock(m_prescaleSetCollection_mutex);
58 if(m_prescaleSets.empty())
62 unsigned int minLB = m_prescaleSets.begin()->lb;
64 throw runtime_error(
"HLTPrescaleSetCollecion access with LBN which is smaller than the first prescale set");
69 for(
const cont& psinfo : m_prescaleSets) {
87 lock_guard<recursive_mutex> lock(m_prescaleSetCollection_mutex);
89 m_prescaleSets.insert(m_prescaleSets.begin(),
cont(0, pss->
id(), pss));
103 for(; psinfo_it!=m_prescaleSets.end(); ++psinfo_it)
104 if( psinfo_it->lb >= add_psinfo.
lb )
break;
111 lock_guard<recursive_mutex> lock(m_prescaleSetCollection_mutex);
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;
118 m_prescaleSets.insert( psinfo_it, add_psinfo );
124 vector<pair<unsigned int, unsigned int> >
126 vector<pair<unsigned int, unsigned int> > lbpsk;
127 for(
const cont& psinfo : m_prescaleSets)
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));
137 set_prescale_keys_to_load(lbnpsk);
145 for(
auto & lbpsk : lbnpsk) {
146 if( !
contains(lbpsk.first, lbpsk.second)) {
147 addPrescaleSet(
cont(lbpsk.first, lbpsk.second, 0) );
154 lock_guard<recursive_mutex> lock(m_prescaleSetCollection_mutex);
155 for(
const cont& psinfo: m_prescaleSets)
156 if( psinfo.lb==
lumiblock && psinfo.psk==psk )
return true;
163 lock_guard<recursive_mutex> lock(m_prescaleSetCollection_mutex);
165 unsigned int count_loaded(0);
166 for(
const cont& psinfo : m_prescaleSets)
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;
172 for(
const cont& psinfo : m_prescaleSets)
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;
177 for(
const cont& psinfo : m_prescaleSets)
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;