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 ()
 
- 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 18 of file SiPixelConfigParser.h.

Constructor & Destructor Documentation

SiPixelConfigParser::SiPixelConfigParser ( )

Definition at line 13 of file SiPixelConfigParser.cc.

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

Definition at line 20 of file SiPixelConfigParser.cc.

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

Member Function Documentation

bool SiPixelConfigParser::getCalibType ( int &  u_freq)

Get Node

Definition at line 471 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

471  {
472  if (!doc()) {
473  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
474  return false;
475  }
476  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("CalibType"))->getLength();
477  if (structureNodes == 0) return false;
479  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("CalibType"))->item(0);
480  //Get Node name
481  if (! structureNode) return false;
482  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
483  if (! structureElement) return false;
484 
485  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("value"))).c_str());
486  return true;
487 }
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 281 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

281  {
282  if (!doc()) {
283  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
284  return false;
285  }
286 
287  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->getLength();
288  if (structureNodes == 0) return false;
290  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->item(0);
291  //Get Node name
292  if (! structureNode) return false;
293  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
294  if (! structureElement) return false;
295 
296  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
297  return true;
298 }
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 301 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

301  {
302  if (!doc()) {
303  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
304  return false;
305  }
306 
307  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->getLength();
308  if (structureNodes == 0) return false;
310  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->item(0);
311  //Get Node name
312  if (! structureNode) return false;
313  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
314  if (! structureElement) return false;
315 
316  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
317  return true;
318 }
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 393 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

393  {
394  if (!doc()) {
395  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
396  return false;
397  }
398 
399  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->getLength();
400  if (structureNodes == 0) return false;
402  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->item(0);
403  //Get Node name
404  if (! structureNode) return false;
405  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
406  if (! structureElement) return false;
407 
408  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
409  return true;
410 }
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 413 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

413  {
414  if (!doc()) {
415  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
416  return false;
417  }
418 
419  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->getLength();
420  if (structureNodes == 0) return false;
422  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->item(0);
423  //Get Node name
424  if (! structureNode) return false;
425  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
426  if (! structureElement) return false;
427 
428  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
429  return true;
430 }
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 118 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

118  {
119  if (!doc()) {
120  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
121  return false;
122  }
123 
124  unsigned int tkMapNodes = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->getLength();
125  if (tkMapNodes != 1) return false;
127  DOMNode* tkMapNode = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->item(0);
128  //Get Node name
129  if (! tkMapNode) return false;
130  DOMElement* tkMapElement = static_cast<DOMElement *>(tkMapNode);
131  if (! tkMapElement) return false;
132 
133  u_freq = atoi(qtxml::_toString(tkMapElement->getAttribute(qtxml::_toDOMS("update_frequency"))).c_str());
134  return true;
135 }
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 176 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::createSummary().

177  {
178 // cout<<"Entering SiPixelConfigParser::getMENamesForBarrelSummary..."<<endl;
179  if (!doc()) {
180  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
181  return false;
182  }
183  me_names.clear();
184  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->getLength();
185  if (structureNodes == 0) return false;
187  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureBarrelLevel"))->item(0);
188  //Get QTEST name
189  if (! structureNode) return false;
190  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
191  if (! structureElement) return false;
192  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
193 
194  DOMNodeList * meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
195  for (unsigned int k = 0; k < meList->getLength(); k++) {
196  DOMNode* meNode = meList->item(k);
197  if (!meNode) return false;
198  DOMElement* meElement = static_cast<DOMElement *>(meNode);
199  if (!meElement) return false;
200  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
201  me_names.push_back(me_name);
202  }
203 // cout<<"...leaving SiPixelConfigParser::getMENamesForBarrelSummary!"<<endl;
204  if (me_names.size() == 0) return false;
205  else return true;
206 
207 }
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 208 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::createSummary().

209  {
210 // cout<<"Entering SiPixelConfigParser::getMENamesForEndcapSummary..."<<endl;
211  if (!doc()) {
212  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
213  return false;
214  }
215 
216  me_names.clear();
217  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->getLength();
218  if (structureNodes == 0) return false;
220  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureEndcapLevel"))->item(0);
221  //Get QTEST name
222  if (! structureNode) return false;
223  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
224  if (! structureElement) return false;
225 
226  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
227 
228  DOMNodeList * meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
229  for (unsigned int k = 0; k < meList->getLength(); k++) {
230  DOMNode* meNode = meList->item(k);
231  if (!meNode) return false;
232  DOMElement* meElement = static_cast<DOMElement *>(meNode);
233  if (!meElement) return false;
234  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
235  me_names.push_back(me_name);
236  }
237  if (me_names.size() == 0) return false;
238  else return true;
239 // cout<<"...leaving SiPixelConfigParser::getMENamesForEndcapSummary!"<<endl;
240 
241 }
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 244 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::createSummary().

245  {
246  //cout<<"Entering SiPixelConfigParser::getMENamesForFEDErrorSummary..."<<endl;
247  if (!doc()) {
248  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
249  return false;
250  }
251 
252  me_names.clear();
253  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureNonDetId"))->getLength();
254  if (structureNodes == 0) return false;
256  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureNonDetId"))->item(0);
257  //Get QTEST name
258  if (! structureNode) return false;
259  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
260  if (! structureElement) return false;
261 
262  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
263 
264  DOMNodeList * meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
265  for (unsigned int k = 0; k < meList->getLength(); k++) {
266  DOMNode* meNode = meList->item(k);
267  if (!meNode) return false;
268  DOMElement* meElement = static_cast<DOMElement *>(meNode);
269  if (!meElement) return false;
270  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
271  me_names.push_back(me_name);
272  }
273  if (me_names.size() == 0) return false;
274  else return true;
275  //cout<<"...leaving SiPixelConfigParser::getMENamesForFEDErrorSummary!"<<endl;
276 
277 }
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 321 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::fillSummary().

322  {
323  //cout<<"Entering SiPixelConfigParser::getMENamesForGrandBarrelSummary..."<<endl;
324  if (!doc()) {
325  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
326  return false;
327  }
328 
329  me_names.clear();
330  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->getLength();
331  if (structureNodes == 0) return false;
333  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandBarrelLevel"))->item(0);
334  //Get QTEST name
335  if (! structureNode) return false;
336  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
337  if (! structureElement) return false;
338 
339  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
340 
341  DOMNodeList * meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
342  for (unsigned int k = 0; k < meList->getLength(); k++) {
343  DOMNode* meNode = meList->item(k);
344  if (!meNode) return false;
345  DOMElement* meElement = static_cast<DOMElement *>(meNode);
346  if (!meElement) return false;
347  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
348  me_names.push_back(me_name);
349  }
350  if (me_names.size() == 0) return false;
351  else return true;
352  //cout<<"...leaving SiPixelConfigParser::getMENamesForGrandBarrelSummary!"<<endl;
353 
354 }
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 357 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::fillSummary().

358  {
359  //cout<<"Entering SiPixelConfigParser::getMENamesForGrandEndcapSummary..."<<endl;
360  if (!doc()) {
361  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
362  return false;
363  }
364 
365  me_names.clear();
366  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->getLength();
367  if (structureNodes == 0) return false;
369  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureGrandEndcapLevel"))->item(0);
370  //Get QTEST name
371  if (! structureNode) return false;
372  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
373  if (! structureElement) return false;
374 
375  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
376 
377  DOMNodeList * meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
378  for (unsigned int k = 0; k < meList->getLength(); k++) {
379  DOMNode* meNode = meList->item(k);
380  if (!meNode) return false;
381  DOMElement* meElement = static_cast<DOMElement *>(meNode);
382  if (!meElement) return false;
383  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
384  me_names.push_back(me_name);
385  }
386  if (me_names.size() == 0) return false;
387  else return true;
388  //cout<<"...leaving SiPixelConfigParser::getMENamesForGrandEndcapSummary!"<<endl;
389 
390 }
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.

28  {
29  if (!doc()) {
30  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
31  return false;
32  }
33 
34  me_names.clear();
35  unsigned int tkMapNodes = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->getLength();
36  if (tkMapNodes != 1)
37  {
38  cout << ACYellow << ACBold
39  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
40  << ACRed << ACBold
41  << "No TkMap tag found in configuration file"
42  << ACPlain << endl ;
43  return false;
44  }
46  DOMNode* tkMapNode = doc()->getElementsByTagName(qtxml::_toDOMS("TkMap"))->item(0);
47  //Get QTEST name
48  if (! tkMapNode)
49  {
50  cout << ACYellow << ACBold
51  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
52  << ACRed << ACBold
53  << " No TkMap tag elements found in configuration file"
54  << ACPlain << endl ;
55  return false;
56  }
57  DOMElement* tkMapElement = static_cast<DOMElement *>(tkMapNode);
58  if (! tkMapElement)
59  {
60  cout << ACYellow << ACBold
61  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
62  << ACRed << ACBold
63  << " No TkMap tag dom elements found in configuration file"
64  << ACPlain << endl ;
65  return false;
66  }
67  tkmap_name = qtxml::_toString(tkMapElement->getAttribute(qtxml::_toDOMS("name")));
68 
69  DOMNodeList * meList
70  = tkMapElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
71  if( meList->getLength() == 0 )
72  {
73  cout << ACYellow << ACBold
74  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
75  << ACRed << ACBold
76  << " No MonElement found in configuration file"
77  << ACPlain << endl ;
78  }
79  for (unsigned int k = 0; k < meList->getLength(); k++) {
80  DOMNode* meNode = meList->item(k);
81  if (!meNode)
82  {
83  cout << ACYellow << ACBold
84  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
85  << ACRed << ACBold
86  << " No MonElement item found in configuration file"
87  << ACPlain << endl ;
88  return false;
89  }
90  DOMElement* meElement = static_cast<DOMElement *>(meNode);
91  if (!meElement)
92  {
93  cout << ACYellow << ACBold
94  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
95  << ACRed << ACBold
96  << " No MonElement sub-elements found in configuration file"
97  << ACPlain << endl ;
98  return false;
99  }
100  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
101  me_names.push_back(me_name);
102  }
103  if (me_names.size() == 0)
104  {
105  cout << ACYellow << ACBold
106  << "[SiPixelConfigParser::getMENamesForTrackerMap()]"
107  << ACRed << ACBold
108  << " No MonElement sub-element names found in configuration file"
109  << ACPlain << endl ;
110  return false;
111  } else {
112  return true;
113  }
114 }
#define ACRed
Definition: ANSIColors.h:15
#define ACYellow
Definition: ANSIColors.h:25
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:28
#define ACBold
Definition: ANSIColors.h:29
bool SiPixelConfigParser::getMENamesForTree ( std::string &  structure_name,
std::vector< std::string > &  me_names 
)

Get Node

Definition at line 139 of file SiPixelConfigParser.cc.

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

140  {
141  //cout<<"Entering SiPixelConfigParser::getMENamesForTree..."<<endl;
142  if (!doc()) {
143  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
144  return false;
145  }
146 
147  me_names.clear();
148  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureLevel"))->getLength();
149  if (structureNodes == 0) return false;
151  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("SubStructureLevel"))->item(0);
152  //Get QTEST name
153  if (! structureNode) return false;
154  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
155  if (! structureElement) return false;
156 
157  structure_name = qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("name")));
158 
159  DOMNodeList * meList = structureElement->getElementsByTagName(qtxml::_toDOMS("MonElement"));
160  for (unsigned int k = 0; k < meList->getLength(); k++) {
161  DOMNode* meNode = meList->item(k);
162  if (!meNode) return false;
163  DOMElement* meElement = static_cast<DOMElement *>(meNode);
164  if (!meElement) return false;
165  string me_name = qtxml::_toString(meElement->getAttribute (qtxml::_toDOMS ("name")));
166  me_names.push_back(me_name);
167  }
168  if (me_names.size() == 0) return false;
169  else return true;
170  //cout<<"...leaving SiPixelConfigParser::getMENamesForTree!"<<endl;
171 
172 }
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 433 of file SiPixelConfigParser.cc.

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

Referenced by SiPixelActionExecutor::readConfiguration().

433  {
434  if (!doc()) {
435  cout << " SiPixelConfigParser::Configuration File is not set!!! " << endl;
436  return false;
437  }
438  unsigned int structureNodes = doc()->getElementsByTagName(qtxml::_toDOMS("QTestMessageLimit"))->getLength();
439  if (structureNodes == 0) return false;
441  DOMNode* structureNode = doc()->getElementsByTagName(qtxml::_toDOMS("QTestMessageLimit"))->item(0);
442  //Get Node name
443  if (! structureNode) return false;
444  DOMElement* structureElement = static_cast<DOMElement *>(structureNode);
445  if (! structureElement) return false;
446 
447  u_freq = atoi(qtxml::_toString(structureElement->getAttribute(qtxml::_toDOMS("value"))).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::getSourceType ( int &  u_freq)

Get Node

Definition at line 453 of file SiPixelConfigParser.cc.

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

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

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