test
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, const 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, const char *name)
 
DOMElement * createElement (DOMDocument *doc, DOMElement *parent, const 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 71 of file HcalDQMDbInterface.h.

Constructor & Destructor Documentation

HcalHLXMaskDbInterface::HcalHLXMaskDbInterface ( )
inline

Definition at line 74 of file HcalDQMDbInterface.h.

74 {};

Member Function Documentation

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

Definition at line 165 of file HcalDQMDbInterface.cc.

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

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

Definition at line 177 of file HcalDQMDbInterface.cc.

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

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

Definition at line 155 of file HcalDQMDbInterface.cc.

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

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