95 strftime( timebuf, 50,
"%Y-%m-%d %H:%M:%S.0", gmtime( &(
config -> create_timestamp) ) );
96 setTagValue(
"CREATE_TIMESTAMP", timebuf , 0, dataSet );
107 DOMDocument * rbxBrick = rbxBrickDoc .
getDocument();
108 if ( rbx_config_type ==
"pedestals" || rbx_config_type ==
"delays" || rbx_config_type ==
"gols" ){
109 for (
unsigned int _item = 0; _item < rbxBrick -> getElementsByTagName(
XMLProcessor::_toXMLCh(
"Data" ) ) -> getLength(); _item++ ){
110 DOMElement * dataset_root = dataSet -> getDocumentElement();
117 MemBufInputSource * _data;
118 if ( rbx_config_type ==
"pedestals" || rbx_config_type ==
"delays" ){
124 else if ( rbx_config_type ==
"gols" ){
135 std::cout <<
"XMLRBXPedestalsLoader::addRBXSlot(): Unknown config type... exiting" << std::endl;
140 std::string _value = rbxBrickDoc .
getTagValue(
"Data", _item );
141 if ( rbx_config_type ==
"pedestals" || rbx_config_type ==
"delays" ){
146 else if ( rbx_config_type ==
"gols" ){
151 else if ( rbx_config_type ==
"gols" ){
156 else if ( rbx_config_type ==
"leds" ){
162 std::cout <<
"XMLRBXPedestalsLoader::addRBXSlot(): Unknown config type... exiting" << std::endl;
166 DOMNode * cloneData = dataSet -> importNode( data -> getDocumentElement(),
true );
167 dataset_root -> appendChild( cloneData );
170 else if ( rbx_config_type ==
"leds" ){
171 DOMElement * dataset_root = dataSet -> getDocumentElement();
173 std::string _led_item;
175 MemBufInputSource * _data;
185 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
186 setTagValue(
"LED1_ON_IS_CHECKED", _value, 0, data );
187 setTagValue(
"SET_LEDS_IS_CHECKED", _value, 0, data );
190 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
191 setTagValue(
"LED2_ON_IS_CHECKED", _value, 0, data );
192 if (_value.find(
"0")==std::string::npos){
193 setTagValue(
"SET_LEDS_IS_CHECKED", _value, 0, data );
197 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
201 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
204 DOMNode * cloneData = dataSet -> importNode( data -> getDocumentElement(),
true );
205 dataset_root -> appendChild( cloneData );
209 DOMNode * cloneDataSet =
document -> importNode( dataSet -> getDocumentElement(),
true );
210 root -> appendChild( cloneDataSet );
214 int parameter_iter = -1;
218 _name = rbxBrickDoc .
getTagAttribute(
"Parameter",
"name", parameter_iter );
220 }
while( _name !=
"CREATIONTAG" );
221 std::string _creationtag = rbxBrickDoc .
getTagValue(
"Parameter", parameter_iter );
229 _name = rbxBrickDoc .
getTagAttribute(
"Parameter",
"name", parameter_iter );
231 }
while( _name !=
"RBX" );
232 std::string _rbx = rbxBrickDoc .
getTagValue(
"Parameter", parameter_iter );
240 if (_rbx.find(
"ZDC01")!=std::string::npos){
242 std::cout <<
" --> ZDC RBX!" << std::endl;
MemBufInputSource * _data_led
DOMDocument * getDocument(void)
static XMLCh * _toXMLCh(std::string temp)
char data[epos_bytes_allocation]
MemBufInputSource * _data_ped_delay
const char * getTagValue(const std::string &tagName, int _item=0, DOMDocument *_document=NULL)
MemBufInputSource * _data_gol
DOMNode * setTagValue(const std::string &tagName, const std::string &tagValue, int _item=0, DOMDocument *_document=NULL)
string root
initialization
const char * getTagAttribute(const std::string &tagName, const std::string &attrName, int _item=0)