19 vector<string> connNames = {};
21 auto it =
find(connNames.begin(), connNames.end(), trigger.connName());
22 if (it == connNames.end()){
23 connNames.push_back(trigger.connName());
34 return (uint32_t) (
m_decision.at(connName) & 0xffffffff);
37 uint64_t clock1 =
m_decision.at(connName) & 0xffffffff00000000;
38 return (uint32_t) (clock1 >> 32);
41 catch(std::exception &) {
51 return (uint32_t) (
m_overflow.find(connName)->second & 0xffffffff);
54 uint64_t clock1 =
m_overflow.find(connName)->second & 0xffffffff00000000;
55 return (uint32_t) (clock1 >> 32);
78 const Decision& dec = conn->decision();
82 unsigned int position = trigger.flatindex();
84 uint64_t & connectorDec =
m_decision[trigger.connName()];
85 uint64_t & connectorOvf =
m_overflow[trigger.connName()];
89 connectorDec |= (mask << position);
91 connectorOvf |= (mask << position);
118 o <<
"Note that the overall decision has not been calculated" << endl;
121 o <<
"Overall decision for connector " << itdec.first <<
": 0x" << right << hex << setfill(
'0') << setw(16) << dec.
decision_field(itdec.first) << std::dec << setfill(
' ') << endl;
125 unsigned int position = trigger.
flatindex();
126 o <<
" " << setw(30) << left << trigger.
name() <<
" " << (dec.
passed(trigger.
connName(), position) ?
"pass" :
"fail") << endl;}
129 o <<
" " << setw(30) << left << trigger.
name() <<
" unset" << endl;
138 TRG_MSG_INFO(
"Note that the overall decision has not been calculated");
141 TRG_MSG_INFO(
"Overall decision from connector " << dec.first <<
": 0x" << right << hex << setfill(
'0') << setw(16) <<
decision_field(dec.first) << std::dec << setfill(
' '));
145 unsigned int position = trigger.flatindex();
146 TRG_MSG_INFO(
" " << setw(30) << left << trigger.name() <<
" " << (
passed(trigger.connName(), position) ?
"pass" :
"fail") );}
149 TRG_MSG_INFO(
" " << setw(30) << left << trigger.name() <<
" unset" );
bool bit(unsigned int index) const
uint64_t overflow_field(const std::string &connName) const
void setTriggerLines(const std::vector< TrigConf::TriggerLine > &triggers)
StatusCode resetDecision()
std::map< std::string, uint64_t > m_decision
std::vector< TrigConf::TriggerLine > m_triggers
bool passed(const std::string &connName, unsigned int bit) const
uint64_t decision_field(const std::string &connName) const
std::map< std::string, uint64_t > m_overflow
StatusCode collectDecision(const std::set< DecisionConnector * > &outconn)
GlobalDecision(const std::string &name="L1TopoGlobalDecision")
TrigConfMessaging(const std::string &name)
Constructor with parameters.
a TriggerLine entry describes the location of a threshold multiplicity on a cable (connector)
unsigned int flatindex() const
const std::string & connName() const
const std::string & name() const
std::string find(const std::string &s)
return a remapped string
std::ostream & operator<<(std::ostream &os, const TCS::Bin &bin)