18 TriggerLine::calcCounter() {
20 m_counter = 2 * (32 * m_module + 16 * m_fpga + m_bit) + m_clock;
22 TCS_EXCEPTION(
"Trigger line '" << *
this <<
"' has illegal counter " << m_counter);
29 m_outputListElements.push_back(
output);
34 L1TopoConfigOutputList::addTriggerLine(
const TriggerLine & trigger) {
36 auto insname = m_triggernames.insert(trigger.
name());
38 TCS_EXCEPTION(
"Trigger line '" << trigger.
name() <<
"' has been defined more than once");
40 auto inscount = m_triggercounters.insert(trigger.
counter());
41 if(!inscount.second) {
42 string triggerWithSameCounter(
"");
43 for(
auto &
tl : m_triggerlines)
45 triggerWithSameCounter =
tl.name();
46 TCS_EXCEPTION(
"Trigger line '" << trigger.
name() <<
"' is on the same output line (" << trigger.
counter() <<
") as trigger line '" << triggerWithSameCounter <<
"'");
49 m_triggerlines.push_back(trigger);
54 L1TopoConfigOutputList::hasTrigger(
const std::string & trigger)
const {
56 if(
t.name() == trigger)
return true;
62 L1TopoConfigOutputList::getTrigger(
const std::string & trigger)
const {
64 if(
t.name() == trigger)
return t;
73 L1TopoConfigOutputList::sort() {
74 std::sort( m_triggerlines.begin(), m_triggerlines.end(),
comp);
82 o <<
"Trigger lines (sorted by connectors):" << endl;
84 if(trigger.counter() % 32 == 0) {
86 o << endl <<
"Module=" << trigger.module() <<
", FPGA=" << trigger.fpga() << endl;
87 o <<
"----------------" << endl;
89 o <<
" " << setiosflags(ios::left) << setw(30) << trigger.name() <<
" (algorithm " << trigger.algoname() <<
" (id=" << trigger.algoid() <<
"))"
90 <<
" on line " << trigger.bit() <<
" and clock " << trigger.clock() << endl;
96 o << trigger.
counter() <<
" : " << trigger.
name() <<
" [" << trigger.
module() <<
"/" << trigger.
fpga() <<
"/" << trigger.
clock() <<
"/" << trigger.
bit() <<
"]";