94 strftime( timebuf, 50,
"%Y-%m-%d %H:%M:%S.0", gmtime( &(
config -> create_timestamp) ) );
95 setTagValue(
"CREATE_TIMESTAMP", timebuf , 0, dataSet );
106 DOMDocument * rbxBrick = rbxBrickDoc .
getDocument();
107 if ( rbx_config_type ==
"pedestals" || rbx_config_type ==
"delays" || rbx_config_type ==
"gols" ){
108 for (
unsigned int _item = 0; _item < rbxBrick -> getElementsByTagName(
XMLProcessor::_toXMLCh(
"Data" ) ) -> getLength(); _item++ ){
109 DOMElement * dataset_root = dataSet -> getDocumentElement();
116 MemBufInputSource * _data;
117 if ( rbx_config_type ==
"pedestals" || rbx_config_type ==
"delays" ){
123 else if ( rbx_config_type ==
"gols" ){
134 std::cout <<
"XMLRBXPedestalsLoader::addRBXSlot(): Unknown config type... exiting" << std::endl;
140 if ( rbx_config_type ==
"pedestals" || rbx_config_type ==
"delays" ){
145 else if ( rbx_config_type ==
"gols" ){
150 else if ( rbx_config_type ==
"gols" ){
155 else if ( rbx_config_type ==
"leds" ){
161 std::cout <<
"XMLRBXPedestalsLoader::addRBXSlot(): Unknown config type... exiting" << std::endl;
165 DOMNode * cloneData = dataSet -> importNode( data -> getDocumentElement(),
true );
166 dataset_root -> appendChild( cloneData );
169 else if ( rbx_config_type ==
"leds" ){
170 DOMElement * dataset_root = dataSet -> getDocumentElement();
174 MemBufInputSource * _data;
184 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
185 setTagValue(
"LED1_ON_IS_CHECKED", _value, 0, data );
186 setTagValue(
"SET_LEDS_IS_CHECKED", _value, 0, data );
189 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
190 setTagValue(
"LED2_ON_IS_CHECKED", _value, 0, data );
191 if (_value.find(
"0")==std::string::npos){
192 setTagValue(
"SET_LEDS_IS_CHECKED", _value, 0, data );
196 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
200 _value = rbxBrickDoc .
getTagValue(
"Data", _item );
203 DOMNode * cloneData = dataSet -> importNode( data -> getDocumentElement(),
true );
204 dataset_root -> appendChild( cloneData );
208 DOMNode * cloneDataSet =
document -> importNode( dataSet -> getDocumentElement(),
true );
209 root -> appendChild( cloneDataSet );
213 int parameter_iter = -1;
217 _name = rbxBrickDoc .
getTagAttribute(
"Parameter",
"name", parameter_iter );
219 }
while( _name !=
"CREATIONTAG" );
228 _name = rbxBrickDoc .
getTagAttribute(
"Parameter",
"name", parameter_iter );
230 }
while( _name !=
"RBX" );
239 if (_rbx.find(
"ZDC01")!=std::string::npos){
241 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)