CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
XmlConfigReader.cc
Go to the documentation of this file.
1 #include <iostream>
2 //#include <algorithm>
3 //#include <utility>
4 
7 
8 #include "xercesc/util/PlatformUtils.hpp"
9 
10 XERCES_CPP_NAMESPACE_USE
11 
12 using namespace l1t;
13 
14 inline std::string _toString(XMLCh const* toTranscode) {
16 return tmp;
17 }
18 
19 
20 inline XMLCh* _toDOMS(std::string temp) {
21  XMLCh* buff = XMLString::transcode(temp.c_str());
22  return buff;
23 }
24 
25 
27  kTagHw(nullptr),
28  kTagAlgo(nullptr),
29  kTagRunSettings(nullptr),
30  kTagDb(nullptr),
31  kTagKey(nullptr),
32  kTagLoad(nullptr),
33  kTagContext(nullptr),
34  kTagParam(nullptr),
35  kTagMask(nullptr),
36  kTagDisable(nullptr),
37  kTagExclBoards(nullptr),
38  kTagExclude(nullptr),
39  kTagColumns(nullptr),
40  kTagTypes(nullptr),
41  kTagRow(nullptr),
42  kTagProcessor( nullptr),
43  kTagRole(nullptr),
44  kTagCrate(nullptr),
45  kTagSlot(nullptr),
46  kTagDaqTtc(nullptr),
47  kAttrId(nullptr),
48  kAttrType(nullptr),
49  kAttrDelim(nullptr),
50  kAttrModule(nullptr),
51  kTypeTable("table")
52 {
53  XMLPlatformUtils::Initialize();
54 
55  kTagHw = XMLString::transcode("system");
57  kTagRunSettings = XMLString::transcode("run-settings");
61  kTagContext = XMLString::transcode("context");
64  kTagDisable = XMLString::transcode("disable");
65  kTagExclBoards = XMLString::transcode("excluded-boards");
66  kTagExclude = XMLString::transcode("exclude");
67  kTagColumns = XMLString::transcode("columns");
70  kTagProcessor = XMLString::transcode("processor");
74  kTagDaqTtc = XMLString::transcode("daqttc-mgr");
77  kAttrDelim = XMLString::transcode("delimiter");
79 
81  parser_ = new XercesDOMParser();
82  parser_->setValidationScheme(XercesDOMParser::Val_Auto);
83  parser_->setDoNamespaces(false);
84 
85  doc_ = nullptr;
86 }
87 
88 
89 XmlConfigReader::XmlConfigReader(DOMDocument* doc) :
90  kTagHw(nullptr),
91  kTagAlgo(nullptr),
92  kTagRunSettings(nullptr),
93  kTagDb(nullptr),
94  kTagKey(nullptr),
95  kTagLoad(nullptr),
96  kTagContext(nullptr),
97  kTagParam(nullptr),
98  kTagMask(nullptr),
99  kTagDisable(nullptr),
100  kTagExclBoards(nullptr),
101  kTagExclude(nullptr),
102  kTagColumns(nullptr),
103  kTagTypes(nullptr),
104  kTagRow(nullptr),
105  kTagProcessor(nullptr),
106  kTagRole(nullptr),
107  kTagCrate(nullptr),
108  kTagSlot(nullptr),
109  kTagDaqTtc(nullptr),
110  kAttrId(nullptr),
111  kAttrType(nullptr),
112  kAttrDelim(nullptr),
113  kAttrModule(nullptr),
114  kTypeTable("table")
115 {
116  XMLPlatformUtils::Initialize();
117 
118  kTagHw = XMLString::transcode("system");
119  kTagAlgo = XMLString::transcode("algo");
120  kTagRunSettings = XMLString::transcode("run-settings");
122  kTagKey = XMLString::transcode("key");
123  kTagLoad = XMLString::transcode("load");
124  kTagContext = XMLString::transcode("context");
125  kTagParam = XMLString::transcode("param");
126  kTagMask = XMLString::transcode("mask");
127  kTagDisable = XMLString::transcode("disable");
128  kTagExclBoards = XMLString::transcode("excluded-boards");
129  kTagExclude = XMLString::transcode("exclude");
130  kTagColumns = XMLString::transcode("columns");
131  kTagTypes = XMLString::transcode("types");
132  kTagRow = XMLString::transcode("row");
133  kTagProcessor = XMLString::transcode("processor");
134  kTagRole = XMLString::transcode("role");
135  kTagCrate = XMLString::transcode("crate");
136  kTagSlot = XMLString::transcode("slot");
137  kTagDaqTtc = XMLString::transcode("daqttc-mgr");
140  kAttrDelim = XMLString::transcode("delimiter");
141  kAttrModule = XMLString::transcode("module");
142 
143  parser_ = nullptr;
144  doc_ = doc;
145 }
146 
147 
149 {
150  delete parser_;
151  XMLPlatformUtils::Terminate();
152 }
153 
154 
155 void XmlConfigReader::readDOMFromString(const std::string& str, DOMDocument*& doc)
156 {
157  MemBufInputSource xmlstr_buf((const XMLByte*)(str.c_str()), str.size(), "xmlstrbuf");
158  parser_->parse(xmlstr_buf);
159  doc = parser_->getDocument();
160  assert(doc);
161 }
162 
163 
165 {
166  MemBufInputSource xmlstr_buf((const XMLByte*)(str.c_str()), str.size(), "xmlstrbuf");
167  parser_->parse(xmlstr_buf);
168  doc_ = parser_->getDocument();
169  assert(doc_);
170 }
171 
172 
173 void XmlConfigReader::readDOMFromFile(const std::string& fName, DOMDocument*& doc)
174 {
175  parser_->parse(fName.c_str());
176  doc = parser_->getDocument();
177 
178  if (! doc) {
179  edm::LogError("XmlConfigReader") << "Could not parse file " << fName << "\n";
180  }
181 
182  assert(doc);
183 }
184 
185 
187 {
188  parser_->parse(fName.c_str());
189  doc_ = parser_->getDocument();
190 
191  if (! doc_) {
192  edm::LogError("XmlConfigReader") << "Could not parse file " << fName << "\n";
193  }
194 
195  assert(doc_);
196 }
197 
198 
200 {
201  DOMElement* rootElement = doc_->getDocumentElement();
202  if (rootElement) {
203  if (rootElement->getNodeType() == DOMNode::ELEMENT_NODE) {
204  readElement(rootElement, aTrigSystem, sysId);
205  }
206  } else {
207  std::cout << "No xml root element found" << std::endl;
208  }
209 }
210 
211 
212 void XmlConfigReader::readElement(const DOMElement* element, TrigSystem& aTrigSystem, const std::string& sysId)
213 {
214  if (XMLString::equals(element->getTagName(), kTagHw)) {
215  // in case this is a HW description
216  readHwDescription(element, aTrigSystem, sysId);
217  } else if (XMLString::equals(element->getTagName(), kTagAlgo) || XMLString::equals(element->getTagName(), kTagRunSettings)) {
218  // in case this is a configuration snippet
219  readContext(element, sysId, aTrigSystem);
220  }
221 }
222 
223 
224 void XmlConfigReader::readHwDescription(const DOMElement* element, TrigSystem& aTrigSystem, const std::string& sysId)
225 {
226  // if sysId == "" set the systemId of the trigsystem from the xml sytem id
227  if (sysId != "" && sysId != _toString(element->getAttribute(kAttrId))) {
228  return;
229  }
230  aTrigSystem.setSystemId(_toString(element->getAttribute(kAttrId)));
231 
232  // handle processors
233  DOMNodeList* processors = element->getElementsByTagName(kTagProcessor);
234  XMLSize_t nodeCount = processors->getLength();
235  for (XMLSize_t xx = 0; xx < nodeCount; ++xx) {
236  DOMNode* currentNode = processors->item(xx);
237  if (currentNode->getNodeType() && currentNode->getNodeType() == DOMNode::ELEMENT_NODE) { //no null and is element
238  DOMElement* currentElement = static_cast<DOMElement*>( currentNode );
239  std::string procStr = _toString(currentElement->getAttribute(kAttrId));
240 
241  DOMNodeList* roles = currentElement->getElementsByTagName(kTagRole);
242  // roles of this processor (should be only one)
243  for (XMLSize_t i = 0; i < roles->getLength(); ++i) {
244  DOMNodeList* roleChilds = roles->item(i)->getChildNodes();
245  for (XMLSize_t j = 0; j < roleChilds->getLength(); ++j) {
246  if (roleChilds->item(j)->getNodeType() == DOMNode::TEXT_NODE) {
247  aTrigSystem.addProcRole(procStr, _toString(roleChilds->item(j)->getNodeValue()));
248  }
249  }
250  }
251 
252  DOMNodeList* crates = currentElement->getElementsByTagName(kTagCrate);
253  // crates of this processor (should be only one)
254  for (XMLSize_t i = 0; i < crates->getLength(); ++i) {
255  DOMNodeList* crateChilds = crates->item(i)->getChildNodes();
256  for (XMLSize_t j = 0; j < crateChilds->getLength(); ++j) {
257  if (crateChilds->item(j)->getNodeType() == DOMNode::TEXT_NODE) {
258  aTrigSystem.addProcCrate(procStr, _toString(crateChilds->item(j)->getNodeValue()));
259  }
260  }
261  }
262 
263  DOMNodeList* slots = currentElement->getElementsByTagName(kTagSlot);
264  // slots of this processor (should be only one)
265  for (XMLSize_t i = 0; i < slots->getLength(); ++i) {
266  DOMNodeList* slotChilds = slots->item(i)->getChildNodes();
267  for (XMLSize_t j = 0; j < slotChilds->getLength(); ++j) {
268  if (slotChilds->item(j)->getNodeType() == DOMNode::TEXT_NODE) {
269  aTrigSystem.addProcSlot(procStr, _toString(slotChilds->item(j)->getNodeValue()));
270  }
271  }
272  }
273 
274  }
275  }
276 
277  // handle DAQ TTC managers
278  DOMNodeList* daqttcs = element->getElementsByTagName(kTagDaqTtc);
279  nodeCount = daqttcs->getLength();
280  for (XMLSize_t xx = 0; xx < nodeCount; ++xx) {
281  DOMNode* currentNode = daqttcs->item(xx);
282  if (currentNode->getNodeType() && currentNode->getNodeType() == DOMNode::ELEMENT_NODE) { //no null and is element
283  DOMElement* currentElement = static_cast<DOMElement*>( currentNode );
284  std::string daqttcStr = _toString(currentElement->getAttribute(kAttrId));
285 
286  DOMNodeList* roles = currentElement->getElementsByTagName(kTagRole);
287  // roles of this DAQ TTC manager (should be only one)
288  for (XMLSize_t i = 0; i < roles->getLength(); ++i) {
289  DOMNodeList* roleChilds = roles->item(i)->getChildNodes();
290  for (XMLSize_t j = 0; j < roleChilds->getLength(); ++j) {
291  if (roleChilds->item(j)->getNodeType() == DOMNode::TEXT_NODE) {
292  aTrigSystem.addDaqRole(daqttcStr, _toString(roleChilds->item(j)->getNodeValue()));
293  }
294  }
295  }
296 
297  DOMNodeList* crates = currentElement->getElementsByTagName(kTagCrate);
298  // crates of this DAQ TTC manager (should be only one)
299  for (XMLSize_t i = 0; i < crates->getLength(); ++i) {
300  DOMNodeList* crateChilds = crates->item(i)->getChildNodes();
301  for (XMLSize_t j = 0; j < crateChilds->getLength(); ++j) {
302  if (crateChilds->item(j)->getNodeType() == DOMNode::TEXT_NODE) {
303  aTrigSystem.addDaqCrate(daqttcStr, _toString(crateChilds->item(j)->getNodeValue()));
304  }
305  }
306  }
307  }
308  }
309 
310  // handle excluded boards
311  DOMNodeList* exclBoards = element->getElementsByTagName(kTagExclBoards);
312  for (XMLSize_t xx = 0; xx < exclBoards->getLength(); ++xx) {
313  DOMElement* exclBoardElem = static_cast<DOMElement*>(exclBoards->item(xx));
314 
315  for (DOMElement* elem = static_cast<DOMElement*>(exclBoardElem->getFirstChild()); elem; elem = static_cast<DOMElement*>(elem->getNextSibling())) {
316  if (elem->getNodeType() == DOMNode::ELEMENT_NODE) {
317  if (XMLString::equals(elem->getTagName(), kTagExclude)) {
318  // found an excluded board
319  std::string id = _toString(elem->getAttribute(kAttrId));
320  aTrigSystem.disableDaqProc(id); // handle in the same way as disabled ids in the run-settings
321  }
322  }
323  }
324  }
325 }
326 
327 
328 void XmlConfigReader::readContext(const DOMElement* element, const std::string& sysId, TrigSystem& aTrigSystem)
329 {
330  std::string systemId = sysId;
331  if (systemId == "") {
332  systemId = aTrigSystem.systemId();
333  }
334  if (_toString(element->getAttribute(kAttrId)) == systemId) {
335  DOMNodeList* contextElements = element->getElementsByTagName(kTagContext);
336 
337  for (XMLSize_t i = 0; i < contextElements->getLength(); ++i) {
338  DOMElement* contextElement = static_cast<DOMElement*>(contextElements->item(i));
339  std::string contextId = _toString(contextElement->getAttribute(kAttrId));
340 
341  for (DOMElement* elem = static_cast<DOMElement*>(contextElement->getFirstChild()); elem; elem = static_cast<DOMElement*>(elem->getNextSibling())) {
342  if (elem->getNodeType() == DOMNode::ELEMENT_NODE) {
343  if (XMLString::equals(elem->getTagName(), kTagParam)) {
344  // found a parameter
345  char *id = xercesc::XMLString::transcode( elem->getAttribute(kAttrId) );
346  char *type = xercesc::XMLString::transcode( elem->getAttribute(kAttrType) );
347  char *delim = xercesc::XMLString::transcode( elem->getAttribute(kAttrDelim) );
348 
349  // the type table needs special treatment since it consists of child nodes
350  if (type == kTypeTable) {
351 
352  // get the columns string
353  std::string columnsStr = "";
354  DOMNodeList* colElements = elem->getElementsByTagName(kTagColumns);
355  for (XMLSize_t j = 0; j < colElements->getLength(); ++j) {
356  DOMNodeList* colChilds = colElements->item(j)->getChildNodes();
357  for (XMLSize_t k = 0; k < colChilds->getLength(); ++k) {
358  if (colChilds->item(k)->getNodeType() == DOMNode::TEXT_NODE) {
361  char *cStr = xercesc::XMLString::transcode( colChilds->item(k)->getNodeValue() );
362  columnsStr = pruneString( cStr );
364  }
365  }
366  }
367 
368  // get the column type string
369  std::string typesStr = "";
370  DOMNodeList* colTypesElements = elem->getElementsByTagName(kTagTypes);
371  for (XMLSize_t j = 0; j < colTypesElements->getLength(); ++j) {
372  DOMNodeList* colTypesChilds = colTypesElements->item(j)->getChildNodes();
373  for (XMLSize_t k = 0; k < colTypesChilds->getLength(); ++k) {
374  if (colTypesChilds->item(k)->getNodeType() == DOMNode::TEXT_NODE) {
377  char *tStr = xercesc::XMLString::transcode( colTypesChilds->item(k)->getNodeValue() );
378  typesStr = pruneString( tStr );
380  }
381  }
382  }
383 
384  // get the rows
385  std::vector<std::string> rowStrs;
386  DOMNodeList* rowElements = elem->getElementsByTagName(kTagRow);
387  for (XMLSize_t j = 0; j < rowElements->getLength(); ++j) {
388  DOMNodeList* rowChilds = rowElements->item(j)->getChildNodes();
389  for (XMLSize_t k = 0; k < rowChilds->getLength(); ++k) {
390  if (rowChilds->item(k)->getNodeType() == DOMNode::TEXT_NODE) {
394  char *rStr = xercesc::XMLString::transcode( rowChilds->item(k)->getNodeValue() );
395  rowStrs.push_back( pruneString(rStr) );
397  }
398  }
399  }
400 // std::cout << "param element node with id attribute " << id << " and type attribute " << typesStr << std::endl;
401  aTrigSystem.addSettingTable(std::string(id), columnsStr, typesStr, rowStrs, contextId, std::string(delim));
402 
403  } else { // all types other than table
404  std::string value = "";
405  DOMNodeList* valNodes = elem->getChildNodes();
406  for (XMLSize_t j = 0; j < valNodes->getLength(); ++j) {
407  if (valNodes->item(j)->getNodeType() == DOMNode::TEXT_NODE) {
408  value += _toString(valNodes->item(j)->getNodeValue());
409  }
410  }
411 
412  // strip leading and trailing line breaks and spaces
413  pruneString(value);
414 
415 // std::cout << "param element node with id attribute " << id << " and type attribute " << type << " with value: [" << value << "]" << std::endl;
416  aTrigSystem.addSetting(std::string(type), std::string(id), value, contextId, std::string(delim));
417  }
418 
422 
423  } else if (XMLString::equals(elem->getTagName(), kTagMask)) {
424  // found a Mask
425  std::string id = _toString(elem->getAttribute(kAttrId));
426  //std::cout << "Mask element node with id attribute " << id << std::endl;
427  aTrigSystem.addMask(id, contextId);
428 
429  } else if (XMLString::equals(elem->getTagName(), kTagDisable)) {
430  // found a disable
431  std::string id = _toString(elem->getAttribute(kAttrId));
432  aTrigSystem.disableDaqProc(id);
433  }
434  }
435  }
436  }
437  }
438 }
439 
440 
441 void XmlConfigReader::readContexts(const std::string& key, const std::string& sysId, TrigSystem& aTrigSystem)
442 {
443  DOMElement* keyElement = getKeyElement(key);
444  if (keyElement) {
445  for (DOMElement* elem = static_cast<DOMElement*>(keyElement->getFirstChild()); elem; elem = static_cast<DOMElement*>(elem->getNextSibling())) {
446  if (elem->getNodeType() == DOMNode::ELEMENT_NODE) {
447  if (XMLString::equals(elem->getTagName(), kTagAlgo) || XMLString::equals(elem->getTagName(), kTagRunSettings)) {
448  readContext(elem, sysId, aTrigSystem);
449  }
450  }
451  }
452  } else {
453  std::cout << "Key not found: " << key << std::endl;
454  }
455 }
456 
457 
459 {
460  DOMElement* rootElement = doc_->getDocumentElement();
461  if (XMLString::equals(rootElement->getTagName(), kTagDb)) {
462  DOMNodeList* keyElements = rootElement->getElementsByTagName(kTagKey);
463 
464  for (XMLSize_t i = 0; i < keyElements->getLength(); ++i) {
465  DOMElement* keyElement = static_cast<DOMElement*>(keyElements->item(i));
466  if (_toString(keyElement->getAttribute(kAttrId)) == key) { // we found the key we were looking for
467  return keyElement;
468  }
469  }
470  }
471  return nullptr;
472 }
473 
474 
476 {
477  DOMElement* keyElement = getKeyElement(key);
478  if (keyElement) {
479  DOMNodeList* loadElements = keyElement->getElementsByTagName(kTagLoad);
480  for (XMLSize_t i = 0; i < loadElements->getLength(); ++i) {
481  DOMElement* loadElement = static_cast<DOMElement*>(loadElements->item(i));
482  std::string fileName = _toString(loadElement->getAttribute(kAttrModule));
483  if (fileName.find("/") != 0) { // load element has a relative path
484  // build an absolute path with directory of top xml file
485  size_t pos;
486  std::string topDir = "";
487  pos = topPath.find_last_of("/");
488  if (pos != std::string::npos) {
489  topDir = topPath.substr(0, pos+1);
490  }
491  fileName = topDir + fileName;
492  }
493  //std::cout << "loading file " << fileName << std::endl;
494  DOMDocument* subDoc = nullptr;
495  readDOMFromFile(fileName, subDoc);
496  if (subDoc) {
497  appendNodesFromSubDoc(keyElement, subDoc);
498  }
499  }
500  }
501 }
502 
503 
504 void XmlConfigReader::appendNodesFromSubDoc(DOMNode* parentNode, DOMDocument* subDoc)
505 {
506  DOMElement* subDocRootElement = subDoc->getDocumentElement();
507  //std::cout << "root element tag: " << _toString(subDocRootElement->getTagName()) << std::endl;
508  if (XMLString::equals(subDocRootElement->getTagName(), kTagAlgo) || XMLString::equals(subDocRootElement->getTagName(), kTagRunSettings)) {
509  DOMNode* importedNode = doc_->importNode(subDocRootElement, true);
510  parentNode->appendChild(importedNode);
511  }
512 }
513 
514 // the small static look up table below indicates in O(1) time if the symbol is '\n', (ascii code 10) '\t' (code 9), or ' ' (code 32)
516 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, // '\n'
517 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // '\t'
518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
519 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, // ' '
520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
521 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
523 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
525 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
528 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
530 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
535 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
537 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
538 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
539 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
541 0, 0, 0, 0, 0, 0};
542 
544 {
545  size_t alphanumBegin = 0, alphanumEnd = strlen(str)-1;
546 
547  while( str[alphanumBegin] && XmlConfigReader_reject_symbols[ unsigned(str[alphanumBegin]) ] ) alphanumBegin++;
548  while( alphanumEnd >= alphanumBegin && XmlConfigReader_reject_symbols[ unsigned(str[alphanumEnd] ) ] ) alphanumEnd--;
549 
550  str[alphanumEnd+1] = '\0';
551  return str + alphanumBegin;
552 }
553 
555 {
556  std::size_t alphanumBegin = str.find_first_not_of("\n\t ");
557  std::size_t alphanumEnd = str.find_last_not_of("\n\t ");
558  if (alphanumBegin != std::string::npos) {
559  if (alphanumEnd != std::string::npos) {
560  str = str.substr(alphanumBegin, alphanumEnd - alphanumBegin + 1);
561  } else {
562  str = str.substr(alphanumBegin);
563  }
564  }
565 }
566 
void disableDaqProc(const std::string &daqProc)
Definition: TrigSystem.cc:340
type
Definition: HCALResponse.h:21
void readDOMFromFile(const std::string &fName, xercesc::DOMDocument *&doc)
int i
Definition: DBlmapReader.cc:9
const std::string kTypeTable
const XMLCh * kTagSlot
void readHwDescription(const xercesc::DOMElement *element, TrigSystem &aTrigSystem, const std::string &sysId="")
const XMLCh * kTagExclude
const XMLCh * kTagDaqTtc
assert(m_qm.get())
std::string _toString(const XMLCh *toTranscode)
void readRootElement(TrigSystem &aTrigSystem, const std::string &sysId="")
const XMLCh * kTagKey
const char XmlConfigReader_reject_symbols[256]
const XMLCh * kTagMask
#define nullptr
void addMask(const std::string &id, const std::string &procRole)
Definition: TrigSystem.cc:231
void addDaqRole(const std::string &daq, const std::string &role)
Definition: TrigSystem.cc:65
const XMLCh * kTagCrate
void addSetting(const std::string &type, const std::string &id, const std::string &value, const std::string &procRole, const std::string &delim="")
Definition: TrigSystem.cc:82
const XMLCh * kTagRow
const XMLCh * kAttrType
void addProcRole(const std::string &processor, const std::string &role)
Definition: TrigSystem.cc:39
const XMLCh * kTagExclBoards
const XMLCh * kTagTypes
const XMLCh * kTagLoad
const XMLCh * kTagContext
void buildGlobalDoc(const std::string &key, const std::string &topPath="")
void addProcCrate(const std::string &processor, const std::string &crate)
Definition: TrigSystem.cc:60
XMLCh * transcode(const T &fInput)
xercesc::XercesDOMParser * parser_
int j
Definition: DBlmapReader.cc:9
const XMLCh * kAttrDelim
void readElement(const xercesc::DOMElement *element, TrigSystem &aTrigSystem, const std::string &sysId="")
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void readContexts(const std::string &key, const std::string &sysId, TrigSystem &aTrigSystem)
const XMLCh * kTagDisable
void addDaqCrate(const std::string &daq, const std::string &crate)
Definition: TrigSystem.cc:77
const XMLCh * kTagHw
const XMLCh * kTagDb
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
std::string systemId()
Definition: TrigSystem.h:37
const XMLCh * kTagParam
xercesc::DOMDocument * doc_
const XMLCh * kTagRole
const XMLCh * kAttrModule
void addProcSlot(const std::string &processor, const std::string &slot)
Definition: TrigSystem.cc:55
const XMLCh * kTagRunSettings
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void pruneString(std::string &str)
XMLCh * _toDOMS(std::string temp)
const XMLCh * kTagProcessor
const XMLCh * kTagColumns
tuple cout
Definition: gather_cfg.py:145
void readDOMFromString(const std::string &str, xercesc::DOMDocument *&doc)
xercesc::DOMElement * getKeyElement(const std::string &key)
void appendNodesFromSubDoc(xercesc::DOMNode *parentNode, xercesc::DOMDocument *subDoc)
void setSystemId(const std::string id)
Definition: TrigSystem.h:38
const XMLCh * kTagAlgo
const XMLCh * kAttrId
void readContext(const xercesc::DOMElement *element, const std::string &sysId, TrigSystem &aTrigSystem)
void addSettingTable(const std::string &id, const std::string &columns, const std::string &types, const std::vector< std::string > &rows, const std::string &procRole, const std::string &delim)
Definition: TrigSystem.cc:131