CMS 3D CMS Logo

Public Member Functions

HcalHLXMaskDbInterface Class Reference

#include <HcalDQMDbInterface.h>

Inheritance diagram for HcalHLXMaskDbInterface:
HcalDQMDbInterface

List of all members.

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 ()

Detailed Description

Definition at line 72 of file HcalDQMDbInterface.h.


Constructor & Destructor Documentation

HcalHLXMaskDbInterface::HcalHLXMaskDbInterface ( ) [inline]

Definition at line 75 of file HcalDQMDbInterface.h.

{};

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.

                                                                                             {
  DOMElement*  dataElem = createElement(doc,parent,(char*)"DATA");
  createElement(doc, dataElem, (char*)"FPGA", masks.position);
  char tmp[5] = "fooo";
  sprintf(tmp,"%i",masks.occMask);
  createElement(doc, dataElem, (char*)"OCC_MASK", tmp);
  sprintf(tmp,"%i",masks.lhcMask);
  createElement(doc, dataElem, (char*)"LHC_MASK", tmp);
  sprintf(tmp,"%i",masks.sumEtMask);
  createElement(doc, dataElem, (char*)"SUM_ET_MASK", tmp);
}
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.

                                                                                              {

  DOMElement*  parent = doc->getDocumentElement();
  DOMElement*  dataSetElem = createElement(doc,parent,(char*)"DATA_SET");
  createElement(doc,dataSetElem,(char*)"VERSION",version);
  createElement(doc,dataSetElem,(char*)"SUBVERSION",subversion);
  createElement(doc,dataSetElem,(char*)"CREATION_TIMESTAMP",gmtime);
  createElement(doc,dataSetElem,(char*)"CREATED_BY",(char*)"jwerner");

  DOMElement*  partAssElem = createElement(doc,dataSetElem,(char*)"PART_ASSEMBLY");
  DOMElement* parentPartAssElem = createElement(doc,partAssElem,(char*)"PARENT_PART");
  createElement(doc, parentPartAssElem, (char*)"KIND_OF_PART", (char*)"HCAL HTR Crate");
  char tmp[5];
  if(masks.crateId <10){ sprintf(tmp,"CRATE0%i",masks.crateId);}
  else{ sprintf(tmp,"CRATE%i",masks.crateId);}
  createElement(doc, parentPartAssElem, (char*)"NAME_LABEL",tmp);
  //end PARENT_PART 
  DOMElement* childUniqueIdByElem = createElement(doc,partAssElem,(char*)"CHILD_UNIQUELY_IDENTIFIED_BY");
  createElement(doc, childUniqueIdByElem, (char*)"KIND_OF_PART", (char*)"HCAL HTR Crate Slot");
  DOMElement* attributeElem = createElement(doc,childUniqueIdByElem,(char*)"ATTRIBUTE");
  createElement(doc, attributeElem, (char*)"NAME", (char*)"HCAL HTR Slot Number");
  createElement(doc, attributeElem, (char*)"VALUE", itoa(masks.slotId));
  //end attribute                                                                                                                  
  //end child uni...                                                                                                               
  //end part assembly                                                                                                              

  return dataSetElem;
}
void HcalHLXMaskDbInterface::createHeader ( DOMDocument *  doc)

Definition at line 161 of file HcalDQMDbInterface.cc.

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

                                                         {
  DOMElement*  parent = doc->getDocumentElement();
  DOMElement*  headerElem = createElement(doc,parent,(char*)"HEADER");
  DOMElement*  typeElem = createElement(doc,headerElem,(char*)"TYPE");
  createElement(doc,typeElem,(char*)"EXTENSION_TABLE_NAME",(char*)"HCAL_HLX_MASKS_TYPE01");
  createElement(doc,typeElem,(char*)"NAME",(char*)"HCAL HLX masks [type 1]");
  DOMElement* element= createElement(doc,headerElem,(char*)"RUN");
  element->setAttribute(transcode("mode"), transcode("no-run"));
}