19 GlobalOutput::setDecisionTriggerLines(
const vector<TrigConf::TriggerLine> &
triggers) {
22 vector<string> l1connNames = {};
24 auto it =
find(l1connNames.begin(), l1connNames.end(), trigger.connName());
25 if (
it == l1connNames.end()){
26 l1connNames.push_back(trigger.connName());
27 m_decision[trigger.connName()] = 0;
33 GlobalOutput::setMultiplicityTriggerLines(
const vector<TrigConf::TriggerLine> &
triggers) {
36 vector<string> l1connNames = {};
38 auto it =
find(l1connNames.begin(), l1connNames.end(), trigger.connName());
39 if (
it == l1connNames.end()){
40 l1connNames.push_back(trigger.connName());
41 m_count[trigger.connName()] = 0;
47 GlobalOutput::decision_field(
const std::string & l1connName)
const {
48 if (m_decision.find(l1connName) != m_decision.end()) {
49 return m_decision.find(l1connName)->second;
57 GlobalOutput::decision_field(
const std::string& l1connName,
unsigned int clock)
const {
58 if (m_decision.find(l1connName) != m_decision.end()) {
61 return static_cast<uint32_t>(m_decision.at(l1connName) & 0xffffffff);
64 uint64_t clock1 = m_decision.at(l1connName) & 0xffffffff00000000;
65 return static_cast<uint32_t>(clock1 >> 32);
74 GlobalOutput::count_field(
const std::string& l1connName)
const {
75 if (m_count.find(l1connName) != m_count.end()) {
76 return m_count.find(l1connName)->second;
84 GlobalOutput::overflow_field(
const std::string& l1connName)
const {
85 if (m_overflow.find(l1connName) != m_overflow.end()) {
86 return m_overflow.find(l1connName)->second;
94 GlobalOutput::overflow_field(
const std::string& l1connName,
unsigned int clock)
const {
95 if (m_overflow.find(l1connName) != m_overflow.end()) {
98 return static_cast<uint32_t>(m_overflow.find(l1connName)->second & 0xffffffff);
101 uint64_t clock1 = m_overflow.find(l1connName)->second & 0xffffffff00000000;
102 return static_cast<uint32_t>(clock1 >> 32);
111 GlobalOutput::ambiguity_field(
const std::string& l1connName)
const {
112 if (m_ambiguity.find(l1connName) != m_ambiguity.end()) {
113 return m_ambiguity.find(l1connName)->second;
121 GlobalOutput::ambiguity_field(
const std::string& l1connName,
unsigned int clock)
const {
122 if (m_ambiguity.find(l1connName) != m_ambiguity.end()) {
125 return static_cast<uint32_t>(m_ambiguity.find(l1connName)->second & 0xffffffff);
128 uint64_t clock1 = m_ambiguity.find(l1connName)->second & 0xffffffff00000000;
129 return static_cast<uint32_t>(clock1 >> 32);
137 GlobalOutput::GlobalOutput(
const std::string &
name) :
138 TrigConfMessaging(
name)
157 unsigned int pos = 0;
159 unsigned int position = trigger.flatindex();
167 l1connectorDec |= (
mask << position);
169 l1connectorOvf |= (
mask << position);
171 l1connectorAmb |= (
mask << position);
184 l1connectorCount |=
count.getCountBits();
212 o <<
"Note that the overall decision has not been calculated" << endl;
215 o <<
"Overall decision for connector " << itdec.first <<
": 0x" << right << hex << setfill(
'0') << setw(16) << dec.
decision_field(itdec.first) << std::dec << setfill(
' ') << endl;
219 unsigned int position = trigger.
flatindex();
220 o <<
" " << setw(30) << left << trigger.
name() <<
" " << (dec.
passed(trigger.
connName(), position) ?
"pass" :
"fail") << endl;}
223 o <<
" " << setw(30) << left << trigger.
name() <<
" unset" << endl;
232 TRG_MSG_INFO(
"Note that the overall decision has not been calculated");
235 TRG_MSG_INFO(
"Overall decision from connector " << dec.first <<
": 0x" << right << hex << setfill(
'0') << setw(16) <<
decision_field(dec.first) << std::dec << setfill(
' '));
239 unsigned int position = trigger.flatindex();
240 TRG_MSG_INFO(
" " << setw(30) << left << trigger.name() <<
" " << (
passed(trigger.connName(), position) ?
"pass" :
"fail") );}
243 TRG_MSG_INFO(
" " << setw(30) << left << trigger.name() <<
" unset" );