CMS 3D CMS Logo

List of all members | Public Member Functions
SiPixelConfigParser Class Reference

#include <SiPixelConfigParser.h>

Inheritance diagram for SiPixelConfigParser:
DQMParserBase

Public Member Functions

bool getCalibType (int &u_freq)
 
bool getFrequencyForBarrelSummary (int &u_freq)
 
bool getFrequencyForEndcapSummary (int &u_freq)
 
bool getFrequencyForGrandBarrelSummary (int &u_freq)
 
bool getFrequencyForGrandEndcapSummary (int &u_freq)
 
bool getFrequencyForTrackerMap (int &u_freq)
 
bool getMENamesForBarrelSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForEndcapSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForFEDErrorSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForGrandBarrelSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForGrandEndcapSummary (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMENamesForTrackerMap (std::string &tkmap_name, std::vector< std::string > &me_names)
 
bool getMENamesForTree (std::string &structure_name, std::vector< std::string > &me_names)
 
bool getMessageLimitForQTests (int &u_freq)
 
bool getSourceType (int &u_freq)
 
 SiPixelConfigParser ()
 
 ~SiPixelConfigParser () override
 
- Public Member Functions inherited from DQMParserBase
int countNodes (std::string tagName)
 Returns the number of nodes with given name. More...
 
xercesc::DOMDocument * doc ()
 DOM Document. More...
 
 DQMParserBase ()
 Creator. More...
 
void getDocument (std::string configFile, bool UseDB=false)
 Methor that parses the xml file configFile. More...
 
void getNewDocument (std::string configFile, bool UseDB=false)
 Parses a new Document. More...
 
virtual ~DQMParserBase ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from DQMParserBase
xercesc::XercesDOMParser * parser
 

Detailed Description

Definition at line 17 of file SiPixelConfigParser.h.

Constructor & Destructor Documentation

SiPixelConfigParser::SiPixelConfigParser ( )

Definition at line 13 of file SiPixelConfigParser.cc.

13  : DQMParserBase() {
14  edm::LogInfo("SiPixelConfigParser") << " Creating SiPixelConfigParser "
15  << "\n";
16 }
DQMParserBase()
Creator.
SiPixelConfigParser::~SiPixelConfigParser ( )
override

Definition at line 20 of file SiPixelConfigParser.cc.

20  {
21  edm::LogInfo("SiPixelActionExecutor") << " Deleting SiPixelConfigParser "
22  << "\n";
23 }

Member Function Documentation

bool SiPixelConfigParser::getCalibType ( int &  u_freq)

Get Node

Definition at line 493 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

493  {
494  if (!doc()) {
495  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
496  return false;
497  }
498  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("CalibType"))->getLength();
499  if (structureNodes == 0)
500  return false;
502  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("CalibType"))->item(0);
503  // Get Node name
504  if (!structureNode)
505  return false;
506  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
507  if (!structureElement)
508  return false;
509 
510  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("value"))).c_str());
511  return true;
512 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getFrequencyForBarrelSummary ( int &  u_freq)

Get Node

Definition at line 275 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

275  {
276  if (!doc()) {
277  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
278  return false;
279  }
280 
281  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->getLength();
282  if (structureNodes == 0)
283  return false;
285  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->item(0);
286  // Get Node name
287  if (!structureNode)
288  return false;
289  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
290  if (!structureElement)
291  return false;
292 
293  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
294  return true;
295 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getFrequencyForEndcapSummary ( int &  u_freq)

Get Node

Definition at line 297 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

297  {
298  if (!doc()) {
299  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
300  return false;
301  }
302 
303  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->getLength();
304  if (structureNodes == 0)
305  return false;
307  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->item(0);
308  // Get Node name
309  if (!structureNode)
310  return false;
311  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
312  if (!structureElement)
313  return false;
314 
315  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
316  return true;
317 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getFrequencyForGrandBarrelSummary ( int &  u_freq)

Get Node

Definition at line 405 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

405  {
406  if (!doc()) {
407  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
408  return false;
409  }
410 
411  unsigned int structureNodes =
412  doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->getLength();
413  if (structureNodes == 0)
414  return false;
416  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->item(0);
417  // Get Node name
418  if (!structureNode)
419  return false;
420  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
421  if (!structureElement)
422  return false;
423 
424  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
425  return true;
426 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getFrequencyForGrandEndcapSummary ( int &  u_freq)

Get Node

Definition at line 428 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

428  {
429  if (!doc()) {
430  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
431  return false;
432  }
433 
434  unsigned int structureNodes =
435  doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->getLength();
436  if (structureNodes == 0)
437  return false;
439  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->item(0);
440  // Get Node name
441  if (!structureNode)
442  return false;
443  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
444  if (!structureElement)
445  return false;
446 
447  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
448  return true;
449 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getFrequencyForTrackerMap ( int &  u_freq)

Get Node

Definition at line 88 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

88  {
89  if (!doc()) {
90  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
91  return false;
92  }
93 
94  unsigned int tkMapNodes = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->getLength();
95  if (tkMapNodes != 1)
96  return false;
98  DOMNode *tkMapNode = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->item(0);
99  // Get Node name
100  if (!tkMapNode)
101  return false;
102  DOMElement *tkMapElement = static_cast<DOMElement *>(tkMapNode);
103  if (!tkMapElement)
104  return false;
105 
106  u_freq = atoi(qtxml::_toString(tkMapElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
107  return true;
108 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMENamesForBarrelSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 154 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), and gen::k.

Referenced by SiPixelActionExecutor::createSummary().

154  {
155  // cout<<"Entering SiPixelConfigParser::getMENamesForBarrelSummary..."<<endl;
156  if (!doc()) {
157  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
158  return false;
159  }
160  me_names.clear();
161  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->getLength();
162  if (structureNodes == 0)
163  return false;
165  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->item(0);
166  // Get QTEST name
167  if (!structureNode)
168  return false;
169  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
170  if (!structureElement)
171  return false;
172  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
173 
174  DOMNodeList *meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
175  for (unsigned int k = 0; k < meList->getLength(); k++) {
176  DOMNode *meNode = meList->item(k);
177  if (!meNode)
178  return false;
179  DOMElement *meElement = static_cast<DOMElement *>(meNode);
180  if (!meElement)
181  return false;
182  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
183  me_names.push_back(me_name);
184  }
185  // cout<<"...leaving SiPixelConfigParser::getMENamesForBarrelSummary!"<<endl;
186  if (me_names.empty())
187  return false;
188  else
189  return true;
190 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMENamesForEndcapSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 191 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), and gen::k.

Referenced by SiPixelActionExecutor::createSummary().

191  {
192  // cout<<"Entering SiPixelConfigParser::getMENamesForEndcapSummary..."<<endl;
193  if (!doc()) {
194  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
195  return false;
196  }
197 
198  me_names.clear();
199  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->getLength();
200  if (structureNodes == 0)
201  return false;
203  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->item(0);
204  // Get QTEST name
205  if (!structureNode)
206  return false;
207  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
208  if (!structureElement)
209  return false;
210 
211  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
212 
213  DOMNodeList *meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
214  for (unsigned int k = 0; k < meList->getLength(); k++) {
215  DOMNode *meNode = meList->item(k);
216  if (!meNode)
217  return false;
218  DOMElement *meElement = static_cast<DOMElement *>(meNode);
219  if (!meElement)
220  return false;
221  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
222  me_names.push_back(me_name);
223  }
224  if (me_names.empty())
225  return false;
226  else
227  return true;
228  // cout<<"...leaving SiPixelConfigParser::getMENamesForEndcapSummary!"<<endl;
229 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMENamesForFEDErrorSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 231 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), and gen::k.

Referenced by SiPixelActionExecutor::createSummary().

231  {
232  // cout<<"Entering
233  // SiPixelConfigParser::getMENamesForFEDErrorSummary..."<<endl;
234  if (!doc()) {
235  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
236  return false;
237  }
238 
239  me_names.clear();
240  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureNonDetId"))->getLength();
241  if (structureNodes == 0)
242  return false;
244  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureNonDetId"))->item(0);
245  // Get QTEST name
246  if (!structureNode)
247  return false;
248  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
249  if (!structureElement)
250  return false;
251 
252  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
253 
254  DOMNodeList *meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
255  for (unsigned int k = 0; k < meList->getLength(); k++) {
256  DOMNode *meNode = meList->item(k);
257  if (!meNode)
258  return false;
259  DOMElement *meElement = static_cast<DOMElement *>(meNode);
260  if (!meElement)
261  return false;
262  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
263  me_names.push_back(me_name);
264  }
265  if (me_names.empty())
266  return false;
267  else
268  return true;
269  // cout<<"...leaving
270  // SiPixelConfigParser::getMENamesForFEDErrorSummary!"<<endl;
271 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMENamesForGrandBarrelSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 319 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), and gen::k.

Referenced by SiPixelActionExecutor::fillSummary().

319  {
320  // cout<<"Entering
321  // SiPixelConfigParser::getMENamesForGrandBarrelSummary..."<<endl;
322  if (!doc()) {
323  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
324  return false;
325  }
326 
327  me_names.clear();
328  unsigned int structureNodes =
329  doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->getLength();
330  if (structureNodes == 0)
331  return false;
333  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->item(0);
334  // Get QTEST name
335  if (!structureNode)
336  return false;
337  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
338  if (!structureElement)
339  return false;
340 
341  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
342 
343  DOMNodeList *meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
344  for (unsigned int k = 0; k < meList->getLength(); k++) {
345  DOMNode *meNode = meList->item(k);
346  if (!meNode)
347  return false;
348  DOMElement *meElement = static_cast<DOMElement *>(meNode);
349  if (!meElement)
350  return false;
351  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
352  me_names.push_back(me_name);
353  }
354  if (me_names.empty())
355  return false;
356  else
357  return true;
358  // cout<<"...leaving
359  // SiPixelConfigParser::getMENamesForGrandBarrelSummary!"<<endl;
360 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMENamesForGrandEndcapSummary ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 362 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), and gen::k.

Referenced by SiPixelActionExecutor::fillSummary().

362  {
363  // cout<<"Entering
364  // SiPixelConfigParser::getMENamesForGrandEndcapSummary..."<<endl;
365  if (!doc()) {
366  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
367  return false;
368  }
369 
370  me_names.clear();
371  unsigned int structureNodes =
372  doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->getLength();
373  if (structureNodes == 0)
374  return false;
376  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->item(0);
377  // Get QTEST name
378  if (!structureNode)
379  return false;
380  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
381  if (!structureElement)
382  return false;
383 
384  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
385 
386  DOMNodeList *meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
387  for (unsigned int k = 0; k < meList->getLength(); k++) {
388  DOMNode *meNode = meList->item(k);
389  if (!meNode)
390  return false;
391  DOMElement *meElement = static_cast<DOMElement *>(meNode);
392  if (!meElement)
393  return false;
394  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
395  me_names.push_back(me_name);
396  }
397  if (me_names.empty())
398  return false;
399  else
400  return true;
401  // cout<<"...leaving
402  // SiPixelConfigParser::getMENamesForGrandEndcapSummary!"<<endl;
403 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMENamesForTrackerMap ( std::string &  tkmap_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 27 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), ACBold, ACPlain, ACRed, ACYellow, gather_cfg::cout, DQMParserBase::doc(), and gen::k.

27  {
28  if (!doc()) {
29  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
30  return false;
31  }
32 
33  me_names.clear();
34  unsigned int tkMapNodes = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->getLength();
35  if (tkMapNodes != 1) {
36  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
37  << "No TkMap tag found in configuration file" << ACPlain << endl;
38  return false;
39  }
41  DOMNode *tkMapNode = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->item(0);
42  // Get QTEST name
43  if (!tkMapNode) {
44  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
45  << " No TkMap tag elements found in configuration file" << ACPlain << endl;
46  return false;
47  }
48  DOMElement *tkMapElement = static_cast<DOMElement *>(tkMapNode);
49  if (!tkMapElement) {
50  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
51  << " No TkMap tag dom elements found in configuration file" << ACPlain << endl;
52  return false;
53  }
54  tkmap_name = qtxml::_toString(tkMapElement->getAttribute(qtxml::_toDOMS("name")));
55 
56  DOMNodeList *meList = tkMapElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
57  if (meList->getLength() == 0) {
58  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
59  << " No MonElement found in configuration file" << ACPlain << endl;
60  }
61  for (unsigned int k = 0; k < meList->getLength(); k++) {
62  DOMNode *meNode = meList->item(k);
63  if (!meNode) {
64  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
65  << " No MonElement item found in configuration file" << ACPlain << endl;
66  return false;
67  }
68  DOMElement *meElement = static_cast<DOMElement *>(meNode);
69  if (!meElement) {
70  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
71  << " No MonElement sub-elements found in configuration file" << ACPlain << endl;
72  return false;
73  }
74  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
75  me_names.push_back(me_name);
76  }
77  if (me_names.empty()) {
78  cout << ACYellow << ACBold << "[SiPixelConfigParser::getMENamesForTrackerMap()]" << ACRed << ACBold
79  << " No MonElement sub-element names found in configuration file" << ACPlain << endl;
80  return false;
81  } else {
82  return true;
83  }
84 }
#define ACRed
Definition: ANSIColors.h:16
#define ACYellow
Definition: ANSIColors.h:26
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
#define ACPlain
Definition: ANSIColors.h:29
#define ACBold
Definition: ANSIColors.h:30
bool SiPixelConfigParser::getMENamesForTree ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 112 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, DQMParserBase::doc(), and gen::k.

112  {
113  // cout<<"Entering SiPixelConfigParser::getMENamesForTree..."<<endl;
114  if (!doc()) {
115  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
116  return false;
117  }
118 
119  me_names.clear();
120  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureLevel"))->getLength();
121  if (structureNodes == 0)
122  return false;
124  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureLevel"))->item(0);
125  // Get QTEST name
126  if (!structureNode)
127  return false;
128  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
129  if (!structureElement)
130  return false;
131 
132  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
133 
134  DOMNodeList *meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
135  for (unsigned int k = 0; k < meList->getLength(); k++) {
136  DOMNode *meNode = meList->item(k);
137  if (!meNode)
138  return false;
139  DOMElement *meElement = static_cast<DOMElement *>(meNode);
140  if (!meElement)
141  return false;
142  string me_name = qtxml::_toString(meElement->getAttribute(qtxml::_toDOMS("name")));
143  me_names.push_back(me_name);
144  }
145  if (me_names.empty())
146  return false;
147  else
148  return true;
149  // cout<<"...leaving SiPixelConfigParser::getMENamesForTree!"<<endl;
150 }
std::string _toString(const XMLCh *toTranscode)
int k[5][pyjets_maxn]
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getMessageLimitForQTests ( int &  u_freq)

Get Node

Definition at line 451 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::readConfiguration().

451  {
452  if (!doc()) {
453  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
454  return false;
455  }
456  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("QTestMessageLimit"))->getLength();
457  if (structureNodes == 0)
458  return false;
460  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("QTestMessageLimit"))->item(0);
461  // Get Node name
462  if (!structureNode)
463  return false;
464  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
465  if (!structureElement)
466  return false;
467 
468  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("value"))).c_str());
469  return true;
470 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45
bool SiPixelConfigParser::getSourceType ( int &  u_freq)

Get Node

Definition at line 472 of file SiPixelConfigParser.cc.

References qtxml::_toDOMS(), qtxml::_toString(), gather_cfg::cout, and DQMParserBase::doc().

Referenced by SiPixelActionExecutor::createSummary(), and SiPixelActionExecutor::readConfiguration().

472  {
473  if (!doc()) {
474  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
475  return false;
476  }
477  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SourceType"))->getLength();
478  if (structureNodes == 0)
479  return false;
481  DOMNode *structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SourceType"))->item(0);
482  // Get Node name
483  if (!structureNode)
484  return false;
485  DOMElement *structureElement = static_cast<DOMElement *>(structureNode);
486  if (!structureElement)
487  return false;
488 
489  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("code"))).c_str());
490  return true;
491 }
std::string _toString(const XMLCh *toTranscode)
XMLCh * _toDOMS(std::string temp)
xercesc::DOMDocument * doc()
DOM Document.
Definition: DQMParserBase.h:45