CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
HcalHLXMaskDbInterface Class Reference

#include <HcalDQMDbInterface.h>

Inheritance diagram for HcalHLXMaskDbInterface:
HcalDQMDbInterface

Public Member Functions

void createData (DOMDocument *doc, DOMElement *parent, HcalHLXMask mask)
 
DOMElement * createDataset (DOMDocument *doc, const HcalHLXMask mask, const char *gmtime, const char *version, const char *subversion)
 
void createHeader (DOMDocument *doc)
 
 HcalHLXMaskDbInterface ()
 
- Public Member Functions inherited from HcalDQMDbInterface
DOMElement * createChannel (DOMDocument *doc, DOMElement *parent, HcalDetId id)
 
DOMDocument * createDocument ()
 
DOMElement * createElement (DOMDocument *doc, DOMElement *parent, char *name)
 
DOMElement * createElement (DOMDocument *doc, DOMElement *parent, char *name, char *value)
 
DOMElement * createElement (DOMDocument *doc, DOMElement *parent, char *name, const char *value)
 
DOMElement * createFooter (DOMDocument *doc, unsigned long long fIovBegin, unsigned long long fIovEnd, const char *fTagName, const char *fDetectorName, const char *fComment)
 
DOMElement * createIOV (DOMDocument *doc, DOMElement *parent, unsigned long long fIovBegin, unsigned long long fIovEnd)
 
DOMElement * createTag (DOMDocument *doc, DOMElement *parent, const char *fTagName, const char *fDetectorName, const char *fComment)
 
 HcalDQMDbInterface ()
 
const char * itoa (int i)
 
DOMElement * makeMapDataset (DOMDocument *doc, DOMElement *fIov)
 
DOMElement * makeMapIOV (DOMDocument *doc, DOMElement *fTag)
 
DOMElement * makeMapTag (DOMDocument *doc, DOMElement *fMap)
 
void writeDocument (DOMDocument *doc, const char *xmlFile)
 

Detailed Description

Definition at line 72 of file HcalDQMDbInterface.h.

Constructor & Destructor Documentation

HcalHLXMaskDbInterface::HcalHLXMaskDbInterface ( )
inline

Definition at line 75 of file HcalDQMDbInterface.h.

75 {};

Member Function Documentation

void HcalHLXMaskDbInterface::createData ( DOMDocument *  doc,
DOMElement *  parent,
HcalHLXMask  mask 
)

Definition at line 171 of file HcalDQMDbInterface.cc.

References HcalDQMDbInterface::createElement(), HcalHLXMask::lhcMask, HcalHLXMask::occMask, HcalHLXMask::position, HcalHLXMask::sumEtMask, and tmp.

171  {
172  DOMElement* dataElem = createElement(doc,parent,(char*)"DATA");
173  createElement(doc, dataElem, (char*)"FPGA", masks.position);
174  char tmp[5] = "fooo";
175  sprintf(tmp,"%i",masks.occMask);
176  createElement(doc, dataElem, (char*)"OCC_MASK", tmp);
177  sprintf(tmp,"%i",masks.lhcMask);
178  createElement(doc, dataElem, (char*)"LHC_MASK", tmp);
179  sprintf(tmp,"%i",masks.sumEtMask);
180  createElement(doc, dataElem, (char*)"SUM_ET_MASK", tmp);
181 }
list parent
Definition: dbtoconf.py:74
tuple doc
Definition: asciidump.py:381
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
DOMElement * createElement(DOMDocument *doc, DOMElement *parent, char *name)
static const uint32_t masks[]
Definition: CaloRecHit.cc:14
DOMElement * HcalHLXMaskDbInterface::createDataset ( DOMDocument *  doc,
const HcalHLXMask  mask,
const char *  gmtime,
const char *  version,
const char *  subversion 
)

Definition at line 183 of file HcalDQMDbInterface.cc.

References HcalHLXMask::crateId, HcalDQMDbInterface::createElement(), HcalDQMDbInterface::itoa(), dbtoconf::parent, HcalHLXMask::slotId, and tmp.

186  {
187 
188  DOMElement* parent = doc->getDocumentElement();
189  DOMElement* dataSetElem = createElement(doc,parent,(char*)"DATA_SET");
190  createElement(doc,dataSetElem,(char*)"VERSION",version);
191  createElement(doc,dataSetElem,(char*)"SUBVERSION",subversion);
192  createElement(doc,dataSetElem,(char*)"CREATION_TIMESTAMP",gmtime);
193  createElement(doc,dataSetElem,(char*)"CREATED_BY",(char*)"jwerner");
194 
195  DOMElement* partAssElem = createElement(doc,dataSetElem,(char*)"PART_ASSEMBLY");
196  DOMElement* parentPartAssElem = createElement(doc,partAssElem,(char*)"PARENT_PART");
197  createElement(doc, parentPartAssElem, (char*)"KIND_OF_PART", (char*)"HCAL HTR Crate");
198  char tmp[5];
199  if(masks.crateId <10){ sprintf(tmp,"CRATE0%i",masks.crateId);}
200  else{ sprintf(tmp,"CRATE%i",masks.crateId);}
201  createElement(doc, parentPartAssElem, (char*)"NAME_LABEL",tmp);
202  //end PARENT_PART
203  DOMElement* childUniqueIdByElem = createElement(doc,partAssElem,(char*)"CHILD_UNIQUELY_IDENTIFIED_BY");
204  createElement(doc, childUniqueIdByElem, (char*)"KIND_OF_PART", (char*)"HCAL HTR Crate Slot");
205  DOMElement* attributeElem = createElement(doc,childUniqueIdByElem,(char*)"ATTRIBUTE");
206  createElement(doc, attributeElem, (char*)"NAME", (char*)"HCAL HTR Slot Number");
207  createElement(doc, attributeElem, (char*)"VALUE", itoa(masks.slotId));
208  //end attribute
209  //end child uni...
210  //end part assembly
211 
212  return dataSetElem;
213 }
list parent
Definition: dbtoconf.py:74
tuple doc
Definition: asciidump.py:381
const char * itoa(int i)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
DOMElement * createElement(DOMDocument *doc, DOMElement *parent, char *name)
static const uint32_t masks[]
Definition: CaloRecHit.cc:14
void HcalHLXMaskDbInterface::createHeader ( DOMDocument *  doc)

Definition at line 161 of file HcalDQMDbInterface.cc.

References HcalDQMDbInterface::createElement(), and dbtoconf::parent.

161  {
162  DOMElement* parent = doc->getDocumentElement();
163  DOMElement* headerElem = createElement(doc,parent,(char*)"HEADER");
164  DOMElement* typeElem = createElement(doc,headerElem,(char*)"TYPE");
165  createElement(doc,typeElem,(char*)"EXTENSION_TABLE_NAME",(char*)"HCAL_HLX_MASKS_TYPE01");
166  createElement(doc,typeElem,(char*)"NAME",(char*)"HCAL HLX masks [type 1]");
167  DOMElement* element= createElement(doc,headerElem,(char*)"RUN");
168  element->setAttribute(transcode("mode"), transcode("no-run"));
169 }
list parent
Definition: dbtoconf.py:74
tuple doc
Definition: asciidump.py:381
DOMElement * createElement(DOMDocument *doc, DOMElement *parent, char *name)