41 std::vector<uint16_t> bgmask(512);
43 bgmask[
item->ctpId()] =
item->bunchgroupMask();
54 cerr <<
"FATAL Menu: insertion of TriggerItem (" << ti->
name() <<
", ctp ID=" << ti->
ctpId() <<
") failed, uniqueness constraint violated." << endl;
55 throw runtime_error(
"Menu insertion of TriggerItem failed");
76 cerr <<
"WARNING Menu: insertion of LUT output (counter " << lutCounter <<
", name " << lutCounter <<
") failed, uniqueness constraint violated." << endl;
79 m_LUT[lutCounter] = lutCondition;
87 if(
item == byctpid.end())
return 0;
95 if(
item == byname.end())
return 0;
102 if( thrm->id()==
id )
return thrm;
109 if( pit->id()==
id )
return pit;
116 if( tip->id()==
id )
return tip;
122const std::vector<TrigConf::TriggerThreshold*>&
136 ds->check(
"name",
name(), o->
name());
140 ds->addSub(
item->compareTo(o_item) );
142 ds->addLeftOnlySub(
"TriggerItem",
item->name() );
148 ds->addRightOnlySub(
"TriggerItem", o_item->name() );
180 return x->id() <
y->id();
184 if(
x->thresholdName() !=
y->thresholdName() )
185 return x->thresholdName() <
y->thresholdName();
186 return x->multiplicity() <
y->multiplicity();
190 return x->internalCounter() <
y->internalCounter();
194 if(
x->tipNumber() !=
y->tipNumber())
195 return x->tipNumber() <
y->tipNumber();
196 return x->thresholdBit()<
y->thresholdBit();
200 if(
x->pitNumber() !=
y->pitNumber())
201 return x->pitNumber() <
y->pitNumber();
202 return x->thresholdBit()<
y->thresholdBit();
221 cout <<
indent <<
"==================================" << endl;
223 cout <<
indent <<
"==================================" << endl;
227 cout <<
indent <<
"==================================" << endl;
228 cout <<
indent <<
"Trigger Thresholds:" << endl;
229 cout <<
indent <<
"==================================" << endl;
234 cout <<
indent <<
"==================================" << endl;
235 cout <<
indent <<
" The ThresholdMonitorVector:" << endl;
236 cout <<
indent <<
"==================================" << endl;
238 sort(sortedMon.begin(),sortedMon.end(),compMonByID);
244 cout <<
indent <<
"==================================" << endl;
245 cout <<
indent <<
" PITs:" << endl;
246 cout <<
indent <<
"==================================" << endl;
248 sort(sortedPITs.begin(),sortedPITs.end(),compPIT);
249 for(
PIT* pit : sortedPITs)
254 cout <<
indent <<
"==================================" << endl;
255 cout <<
indent <<
" TIPs:" << endl;
256 cout <<
indent <<
"==================================" << endl;
258 sort(sortedTIPs.begin(),sortedTIPs.end(),compTIP);
259 for(
TIP* tip : sortedTIPs)
264 cout <<
indent <<
"==================================" << endl;
265 cout <<
indent <<
" TriggerType summary:" << endl;
266 cout <<
indent <<
"==================================" << endl;
267 for (
int i=0; i<8; ++i) {
268 cout <<
indent <<
"TriggerType bit " << i << endl;
270 if (
item->isTriggerTypeBitOn(i))
271 cout <<
indent <<
" " <<
item->name() << endl;
275 cout <<
indent <<
"==================================" << endl;
276 cout <<
indent <<
" BunchGroup mask summary:" << endl;
277 cout <<
indent <<
"==================================" << endl;
280 cout <<
indent <<
" ctpid=" << setw(3) << i++ <<
": bgmask=" <<
uint2bin(m, 16) << endl;
290 <<
"<TriggerMenu name=\"" <<
name()
291 <<
"\" phase=\"lumi\">" << endl;
293 item->writeXML(
xmlfile, indentLevel+1, indentWidth);
294 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerMenu>" << endl;
300 indent(
xmlfile, indentLevel, indentWidth) <<
"<TriggerThresholdList>" << endl;
303 sort(sortedThresholds.begin(),sortedThresholds.end(),compThr);
306 if(!thr->isInternal())
307 thr->writeXML(
xmlfile, indentLevel+1, indentWidth);
309 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerThresholdList>" << endl;
314 indent(
xmlfile, indentLevel, indentWidth) <<
"<TriggerCounterList>" << endl;
317 sort(sortedMonitors.begin(),sortedMonitors.end(),compMon);
320 mon->writeXML(
xmlfile, indentLevel+1, indentWidth);
321 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerCounterList>" << endl;
330 copy(
items().begin(),
items().end(), it.begin());
std::ostream & indent(std::ostream &o, int lvl, int size) const
const std::string & name() const
void printNameIdV(const std::string &indent="") const
static std::vector< std::string > xmlfile
Forward iterator to traverse the main components of the trigger configuration.
std::string uint2bin(uint32_t uinteger, uint16_t width)
ItemContainer::index< tag_name_hash >::type item_by_name_t
ItemContainer::index< tag_name_hash >::type::iterator item_by_name_iterator
ItemContainer::index< tag_ctpid >::type item_by_ctpid_t
item_by_ctpid_t::iterator item_by_ctpid_iterator
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.