|
int | addRBXSlot (datasetDBConfig *config, std::string brickFileName, std::string rbx_config_type="pedestals", std::string templateFileName="HCAL_RBX_PEDESTALS_TYPE01.dataset.template") |
|
| XMLRBXPedestalsLoader (loaderBaseConfig *config, std::string templateBase="HCAL_RBX_PEDESTALS_TYPE01.XMLloader.template") |
|
virtual | ~XMLRBXPedestalsLoader () |
|
XERCES_CPP_NAMESPACE::DOMElement * | add_element (XERCES_CPP_NAMESPACE::DOMElement *parent, XMLCh *tagname, XMLCh *value) |
|
XERCES_CPP_NAMESPACE::DOMDocument * | getDocument (void) |
|
XERCES_CPP_NAMESPACE::DOMDocument * | getDocumentConst (void) const |
|
XERCES_CPP_NAMESPACE::DOMDocument * | getNewDocument (std::string xmlFileName) |
|
std::string & | getString (void) |
|
std::string & | getString (XERCES_CPP_NAMESPACE::DOMNode *_node) |
|
const char * | getTagAttribute (const std::string &tagName, const std::string &attrName, int _item=0) |
|
const char * | getTagValue (const std::string &tagName, int _item=0, XERCES_CPP_NAMESPACE::DOMDocument *_document=NULL) |
|
const char * | getTagValue (const std::string &tagName, int _item, XERCES_CPP_NAMESPACE::DOMElement *_document) |
|
std::string | getTimestamp (time_t _time) |
|
XMLDOMBlock & | operator+= (const XMLDOMBlock &other) |
|
void | parse (XERCES_CPP_NAMESPACE::InputSource &_source) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagAttribute (const std::string &tagName, const std::string &attrName, const std::string &attrValue, int _item=0) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagAttribute (XERCES_CPP_NAMESPACE::DOMElement *_elem, const std::string &tagName, const std::string &attrName, const std::string &attrValue, int _item=0) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagAttribute (const std::string &tagName, const std::string &attrName, const int &attrValue, int _item=0) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagAttribute (XERCES_CPP_NAMESPACE::DOMElement *_elem, const std::string &tagName, const std::string &attrName, const int &attrValue, int _item=0) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagValue (const std::string &tagName, const std::string &tagValue, int _item=0, XERCES_CPP_NAMESPACE::DOMDocument *_document=NULL) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagValue (XERCES_CPP_NAMESPACE::DOMElement *_elem, const std::string &tagName, const std::string &tagValue, int _item=0) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagValue (const std::string &tagName, const int &tagValue, int _item=0, XERCES_CPP_NAMESPACE::DOMDocument *_document=NULL) |
|
XERCES_CPP_NAMESPACE::DOMNode * | setTagValue (XERCES_CPP_NAMESPACE::DOMElement *_elem, const std::string &tagName, const int &tagValue, int _item=0) |
|
int | write (std::string target="stdout") |
|
| XMLDOMBlock () |
|
| XMLDOMBlock (std::string xmlFileName) |
|
| XMLDOMBlock (XERCES_CPP_NAMESPACE::InputSource &_source) |
|
| XMLDOMBlock (std::string _root, int rootElementName) |
|
virtual | ~XMLDOMBlock () |
|
Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 29 of file XMLRBXPedestalsLoader.h.
int XMLRBXPedestalsLoader::addRBXSlot |
( |
datasetDBConfig * |
config, |
|
|
std::string |
brickFileName, |
|
|
std::string |
rbx_config_type = "pedestals" , |
|
|
std::string |
templateFileName = "HCAL_RBX_PEDESTALS_TYPE01.dataset.template" |
|
) |
| |
Definition at line 87 of file XMLRBXPedestalsLoader.cc.
References _data_gol, _data_led, _data_ped_delay, XMLProcessor::_toXMLCh(), gather_cfg::cout, data, XMLDOMBlock::document, cmsRelvalreport::exit, XMLDOMBlock::getDocument(), XMLDOMBlock::getTagAttribute(), XMLDOMBlock::getTagValue(), pyrootRender::root, XMLDOMBlock::setTagValue(), AlCaHLTBitMon_QueryRunRegistry::string, and relval_steps::version.
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;
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();
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" );
229 _name = rbxBrickDoc .
getTagAttribute(
"Parameter",
"name", parameter_iter );
231 }
while( _name !=
"RBX" );
240 if (_rbx.find(
"ZDC01")!=std::string::npos){
242 std::cout <<
" --> ZDC RBX!" << std::endl;
XERCES_CPP_NAMESPACE::MemBufInputSource * _data_ped_delay
XERCES_CPP_NAMESPACE::DOMDocument * document
XERCES_CPP_NAMESPACE::MemBufInputSource * _data_gol
XERCES_CPP_NAMESPACE::DOMDocument * getDocument(void)
XERCES_CPP_NAMESPACE::DOMNode * setTagValue(const std::string &tagName, const std::string &tagValue, int _item=0, XERCES_CPP_NAMESPACE::DOMDocument *_document=NULL)
static XMLCh * _toXMLCh(std::string temp)
XERCES_CPP_NAMESPACE::MemBufInputSource * _data_led
char data[epos_bytes_allocation]
const char * getTagValue(const std::string &tagName, int _item=0, XERCES_CPP_NAMESPACE::DOMDocument *_document=NULL)
const char * getTagAttribute(const std::string &tagName, const std::string &attrName, int _item=0)