3 XERCES_CPP_NAMESPACE_USE
6 template <
class T> XMLCh*
transcode (
const T& fInput) {
7 std::ostringstream ost;
14 DOMElement*
elem = doc->createElement(
XML(name));
15 parent->appendChild(elem);
21 elem->appendChild(doc->createTextNode(
XML(value)));
26 DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(
XML(
"Core"));
27 return impl->createDocument(0,
XML(
"ROOT"),0);
31 DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(
XML(
"Core"));
32 DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
33 if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true))
34 theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true);
35 if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM,
true))
36 theSerializer->setFeature(XMLUni::fgDOMWRTBOM,
true);
37 XMLFormatTarget *myFormTarget =
new LocalFileFormatTarget(xmlFile);
38 theSerializer->writeNode(myFormTarget, *doc);
44 unsigned long long fIovBegin,
unsigned long long fIovEnd,
45 const char* fTagName,
const char* fDetectorName,
const char* fComment){
47 DOMElement* parent = doc->getDocumentElement();
52 createTag(doc,elems,fTagName,fDetectorName,fComment);
81 unsigned long long fIovBegin,
unsigned long long fIovEnd) {
93 const char* fTagName,
const char* fDetectorName,
const char* fComment) {
107 DOMElement* parent = doc->getDocumentElement();
110 createElement(doc,typeElem,
"EXTENSION_TABLE_NAME",
"HCAL_CHANNEL_ON_OFF_STATES");
111 createElement(doc,typeElem,
"NAME",
"HCAL channel on off states");
122 createElement(doc,chanElem,
"EXTENSION_TABLE_NAME",
"HCAL_CHANNELS");
146 DOMElement* parent = doc->getDocumentElement();
147 DOMElement* dataSetElem =
createElement(doc,parent,
"DATA_SET");
158 DOMElement* parent = doc->getDocumentElement();
161 createElement(doc,typeElem,
"EXTENSION_TABLE_NAME",
"HCAL_HLX_MASKS_TYPE01");
162 createElement(doc,typeElem,
"NAME",
"HCAL HLX masks [type 1]");
170 char tmp[5] =
"fooo";
171 sprintf(tmp,
"%i",masks.
occMask);
173 sprintf(tmp,
"%i",masks.
lhcMask);
182 const char*
version,
const char* subversion){
184 DOMElement* parent = doc->getDocumentElement();
185 DOMElement* dataSetElem =
createElement(doc,parent,
"DATA_SET");
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");
196 else{ sprintf(tmp,
"CRATE%i",masks.
crateId);}
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");
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 * makeMapDataset(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *fIov)
XERCES_CPP_NAMESPACE::DOMElement * createData(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, const HcalDQMChannelQuality::Item &item)
void createData(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, const HcalHLXMask &mask)
XERCES_CPP_NAMESPACE::DOMElement * createElement(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, const char *name)
XERCES_CPP_NAMESPACE::DOMDocument * createDocument()
XERCES_CPP_NAMESPACE::DOMElement * createTag(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, const char *fTagName, const char *fDetectorName, const char *fComment)
XERCES_CPP_NAMESPACE::DOMElement * createChannel(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, HcalDetId id)
void writeDocument(XERCES_CPP_NAMESPACE::DOMDocument *doc, const char *xmlFile)
XMLCh * transcode(const T &fInput)
void createHeader(XERCES_CPP_NAMESPACE::DOMDocument *doc)
void createDataset(XERCES_CPP_NAMESPACE::DOMDocument *doc, const HcalDQMChannelQuality::Item &item, const char *gmtime, const char *version)
XERCES_CPP_NAMESPACE::DOMElement * makeMapIOV(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *fTag)
void createHeader(XERCES_CPP_NAMESPACE::DOMDocument *doc, unsigned int runno, const char *startTime)
bool xmlFile(const std::string fParam)
XERCES_CPP_NAMESPACE::DOMElement * createDataset(XERCES_CPP_NAMESPACE::DOMDocument *doc, const HcalHLXMask &mask, const char *gmtime, const char *version, const char *subversion)
std::vector< std::vector< double > > tmp
constexpr uint32_t masks[]
const std::string & getFlavor() const
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 * makeMapTag(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *fMap)