65 string::size_type
index=0;
67 std::string::size_type pos=final_def.find(
'&',
index);
68 if(pos!= std::string::npos){
72 final_def.replace(pos, 1,
"&");
80 <<
"<TriggerItem ctpid=\"" <<
m_CtpId
82 <<
"\" name=\"" <<
name()
84 <<
"\" definition=\"" << final_def
88 s += (
monitor() & 0x04 ?
'1' :
'0');
89 s += (
monitor() & 0x02 ?
'1' :
'0');
90 s += (
monitor() & 0x01 ?
'1' :
'0');
92 s += (
monitor() & 0x20 ?
'1' :
'0');
93 s += (
monitor() & 0x10 ?
'1' :
'0');
94 s += (
monitor() & 0x08 ?
'1' :
'0');
95 xmlfile <<
" monitor=\"" << s <<
"\"";
102 indent(
xmlfile, indentLevel, indentWidth) <<
"</TriggerItem>" << endl;
109 m_TopNode->buildLogic(conditionList, logic);
115 const vector<string>& conditions,
116 const vector<TriggerThreshold*>& thrs) {
127 catch(
const exception& e) {
128 cout <<
"WARNING: Could not set condition of triggeritem " <<
name() <<
" because: " << e.what() << endl;
139 cout <<
indent <<
"==================================" << endl;
140 cout <<
indent <<
"TriggerItem:";
150 else cout <<
indent <<
"TopNode is NULL pointer" << endl;
159 o <<
" Complex Deadtime: " << item.m_ComplexDeadtime << endl;
160 o <<
" Definition: " << item.m_Definition << endl;
161 o <<
" CTP_id: " << item.m_CtpId << endl;
162 o <<
" TriggerType(hex): " << hex << item.m_TriggerType << dec << endl;
163 if (item.topNode()) o << *item.topNode();
164 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="")
std::unique_ptr< TriggerItemNode > m_TopNode
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
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)