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

Detailed Description

Definition at line 70 of file HcalDQMDbInterface.h.

Constructor & Destructor Documentation

HcalHLXMaskDbInterface::HcalHLXMaskDbInterface ( )
inline

Definition at line 73 of file HcalDQMDbInterface.h.

73 {};

Member Function Documentation

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

Definition at line 167 of file HcalDQMDbInterface.cc.

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

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

Definition at line 179 of file HcalDQMDbInterface.cc.

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

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

Definition at line 157 of file HcalDQMDbInterface.cc.

References HcalDQMDbInterface::createElement(), and XERCES_CPP_NAMESPACE_USE::transcode().

157  {
158  DOMElement* parent = doc->getDocumentElement();
159  DOMElement* headerElem = createElement(doc,parent,"HEADER");
160  DOMElement* typeElem = createElement(doc,headerElem,"TYPE");
161  createElement(doc,typeElem,"EXTENSION_TABLE_NAME","HCAL_HLX_MASKS_TYPE01");
162  createElement(doc,typeElem,"NAME","HCAL HLX masks [type 1]");
163  DOMElement* element= createElement(doc,headerElem,"RUN");
164  element->setAttribute(transcode("mode"), transcode("no-run"));
165 }
XERCES_CPP_NAMESPACE::DOMElement * createElement(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, const char *name)
XMLCh * transcode(const T &fInput)