67 string::size_type
index=0;
69 std::string::size_type pos=final_def.find(
'&',
index);
70 if(pos!= std::string::npos){
74 final_def.replace(pos, 1,
"&");
82 <<
"<TriggerItem ctpid=\"" <<
m_CtpId
84 <<
"\" name=\"" <<
name()
86 <<
"\" definition=\"" << final_def
90 s += (
monitor() & 0x04 ?
'1' :
'0');
91 s += (
monitor() & 0x02 ?
'1' :
'0');
92 s += (
monitor() & 0x01 ?
'1' :
'0');
94 s += (
monitor() & 0x20 ?
'1' :
'0');
95 s += (
monitor() & 0x10 ?
'1' :
'0');
96 s += (
monitor() & 0x08 ?
'1' :
'0');
97 xmlfile <<
" monitor=\"" << s <<
"\"";
104 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerItem>" << endl;
111 m_TopNode->buildLogic(conditionList, logic);
117 const vector<string>& conditions,
118 const vector<TriggerThreshold*>& thrs) {
129 catch(
const exception& e) {
130 cout <<
"WARNING: Could not set condition of triggeritem " <<
name() <<
" because: " << e.what() << endl;
141 cout <<
indent <<
"==================================" << endl;
142 cout <<
indent <<
"TriggerItem:";
152 else cout <<
indent <<
"TopNode is NULL pointer" << endl;
161 o <<
" Complex Deadtime: " << item.m_ComplexDeadtime << endl;
162 o <<
" Definition: " << item.m_Definition << endl;
163 o <<
" CTP_id: " << item.m_CtpId << endl;
164 o <<
" TriggerType(hex): " << hex << item.m_TriggerType << dec << endl;
165 if (item.topNode()) o << *item.topNode();
166 else o <<
" No TopNode" << endl;
std::ostream & indent(std::ostream &o, int lvl, int size) const
const std::string & name() const
void printNameIdV(const std::string &indent="") const
TrigConfData(const std::string &name="")
unsigned int complex_deadtime() const
virtual void print(const std::string &indent="", unsigned int detail=1) const override
void buildLogic(std::string &logic, std::vector< std::string > &conditionList) const
DiffStruct * compareTo(const TriggerItem *o) const
unsigned int m_ComplexDeadtime
uint16_t bunchgroupMask() const
std::string __str__() const override
void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
const std::string & definition() const
unsigned int m_TriggerType
void setCondition(const std::string &logic, const std::vector< std::string > &conditions, const std::vector< TrigConf::TriggerThreshold * > &thrs)
unsigned int partition() const
unsigned short monitor() const
virtual ~TriggerItem() override
unsigned int triggerType() const
TriggerItemNode * m_TopNode
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)
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
std::vector< std::string > parse(std::string names)