30 << std::setw(2) << std::setfill(
'0')
42 cout <<
dec <<
"SubSystemId=\"";
44 const unsigned char &
ss = getSubSystemId();
47 case ssT1:
cout <<
"T1";
break;
48 case ssT2:
cout <<
"T2";
break;
49 case ssRP:
cout <<
"RP";
break;
50 case ssTrigger:
cout <<
"Trigger";
break;
51 case ssTTC:
cout <<
"TTC";
break;
52 case ssFEC:
cout <<
"FEC";
break;
53 default:
cout <<
"None";
56 cout <<
"\" TOTFEDId=\"" << getTOTFEDId()
57 <<
"\" OptoRxId=\"" << getOptoRxId()
58 <<
"\" GOHId=\"" << getGOHId()
59 <<
"\" IdxInFiber=\"" << getIdxInFiber()
68 if (attribute ==
"DAQPosition")
70 size_t dd1 = value.find(
':', 0);
71 size_t dd2 = value.find(
':', dd1+1);
72 size_t dd3 = value.find(
':', dd2+1);
73 size_t dd4 = value.find(
':', dd3+1);
74 size_t dd5 = value.find(
':', dd4+1);
76 if (dd1 == string::npos || dd2 == string::npos || dd3 == string::npos || dd4 == string::npos ||
80 unsigned short ss = strtol(value.substr(0, dd1).c_str(),
NULL, 16);
81 unsigned short ti = strtol(value.substr(dd1+1, dd2-dd1).c_str(),
NULL, 16);
82 unsigned short oi = strtol(value.substr(dd2+1, dd3-dd2).c_str(),
NULL, 16);
83 unsigned short gi = strtol(value.substr(dd3+1, dd4-dd3).c_str(),
NULL, 16);
84 unsigned short fi = strtol(value.substr(dd4+1).c_str(),
NULL, 16);
86 setAllIDs(ss, ti, oi, gi, fi);
91 unsigned int v = atoi(value.c_str());
93 if (attribute ==
"SubSystemId")
95 if (value == tagSSNone) setSubSystemId(ssNone);
96 else if (value == tagSST1) setSubSystemId(ssT1);
97 else if (value == tagSST2) setSubSystemId(ssT2);
98 else if (value == tagSSRP) setSubSystemId(ssRP);
99 else if (value == tagSSTrigger) setSubSystemId(ssTrigger);
100 else if (value == tagSSTTC) setSubSystemId(ssTTC);
101 else if (value == tagSSFEC) setSubSystemId(ssFEC);
102 else setSubSystemId(v);
108 if (attribute ==
"TOTFEDId")
115 if (attribute ==
"OptoRxId")
122 if (attribute ==
"GOHId")
129 if (attribute ==
"IdxInFiber")
static const std::string tagSSTrigger
unsigned short getIdxInFiber() const
static const std::string tagSST2
unsigned short getTOTFEDId() const
ostream & operator<<(std::ostream &o, vector< std::string > const &iValue)
unsigned short getOptoRxId() const
void printXML()
prints XML formatted DAQ channel to stdout
static const std::string tagSST1
unsigned short getSubSystemId() const
static const std::string tagSSRP
unsigned short getGOHId() const
static const std::string tagSSFEC
static const std::string tagSSNone
XML sub-system tags.
static const std::string tagSSTTC
unsigned char setXMLAttribute(const std::string &attribute, const std::string &value, unsigned char &flag)