CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDQMDbInterface.h
Go to the documentation of this file.
1 #include <xercesc/util/XMLString.hpp>
2 #include <xercesc/framework/LocalFileFormatTarget.hpp>
3 #include <xercesc/dom/DOM.hpp>
4 #include <xercesc/dom/DOMImplementationLS.hpp>
5 #include <xercesc/dom/DOMWriter.hpp>
6 
11 //#include "CondTools/Hcal/include/HcalDbXml.h"
12 
13 #include <ctime>
14 #include <fstream>
15 #include <sstream>
16 #include <iostream>
17 #include <string>
18 
19 #if defined(XERCES_NEW_IOSTREAMS)
20 #include <iostream>
21 #else
22 #include <iostream.h>
23 #endif
24 
25 #define XML(str) XMLString::transcode(str)
26 
27 
29 public:
30 
32 
33  XERCES_CPP_NAMESPACE::DOMDocument* createDocument();
34  void writeDocument(XERCES_CPP_NAMESPACE::DOMDocument* doc, const char* xmlFile);
35 
36  XERCES_CPP_NAMESPACE::DOMElement* createElement(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* parent, const char* name);
37  XERCES_CPP_NAMESPACE::DOMElement* createElement(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* parent, const char* name, const char* value);
38  XERCES_CPP_NAMESPACE::DOMElement* createIOV(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* parent,
39  unsigned long long fIovBegin, unsigned long long fIovEnd);
40  XERCES_CPP_NAMESPACE::DOMElement* createTag(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* parent,
41  const char* fTagName, const char* fDetectorName, const char* fComment);
42  XERCES_CPP_NAMESPACE::DOMElement* makeMapTag(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* fMap);
43  XERCES_CPP_NAMESPACE::DOMElement* makeMapIOV(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* fTag);
44  XERCES_CPP_NAMESPACE::DOMElement* makeMapDataset(XERCES_CPP_NAMESPACE::DOMDocument* doc, XERCES_CPP_NAMESPACE::DOMElement* fIov);
45  XERCES_CPP_NAMESPACE::DOMElement* createFooter(XERCES_CPP_NAMESPACE::DOMDocument* doc,
46  unsigned long long fIovBegin, unsigned long long fIovEnd,
47  const char* fTagName, const char* fDetectorName, const char* fComment);
48  XERCES_CPP_NAMESPACE::DOMElement* createChannel(XERCES_CPP_NAMESPACE::DOMDocument* doc,XERCES_CPP_NAMESPACE::DOMElement* parent, HcalDetId id);
49 
50  const char* itoa(int i){
51  char temp[256];
52  sprintf(temp,"%d",i);
53  std::string outVal(temp);
54  return outVal.c_str();
55  }
56 };
57 
58 
60  public:
61 
63 
64  XERCES_CPP_NAMESPACE::DOMElement* createData(XERCES_CPP_NAMESPACE::DOMDocument* doc,XERCES_CPP_NAMESPACE::DOMElement* parent, const HcalDQMChannelQuality::Item& item);
65  void createDataset(XERCES_CPP_NAMESPACE::DOMDocument* doc, const HcalDQMChannelQuality::Item& item, const char* gmtime, const char* version);
66  void createHeader(XERCES_CPP_NAMESPACE::DOMDocument* doc, unsigned int runno, const char* startTime);
67 
68 };
69 
71  public:
72 
74 
75  void createData(XERCES_CPP_NAMESPACE::DOMDocument* doc,XERCES_CPP_NAMESPACE::DOMElement* parent, const HcalHLXMask& mask);
76  XERCES_CPP_NAMESPACE::DOMElement* createDataset(XERCES_CPP_NAMESPACE::DOMDocument* doc, const HcalHLXMask& mask, const char* gmtime, const char* version, const char* subversion);
77  void createHeader(XERCES_CPP_NAMESPACE::DOMDocument* doc);
78 };
79 
80 
81 
82 
83 /*
84 class HcalRunSummaryDbInterface : public HcalDQMDbInterface{
85  public:
86 
87  HcalDQMDbInterface(){};
88 
89  DOMElement* createChannel(DOMDocument* doc,DOMElement* parent );
90  DOMElement* createData(DOMDocument* doc,DOMElement* parent );
91  void createDataset(DOMDocument* doc);
92 
93 
94 };
95 */
XERCES_CPP_NAMESPACE::DOMElement * createIOV(XERCES_CPP_NAMESPACE::DOMDocument *doc, XERCES_CPP_NAMESPACE::DOMElement *parent, unsigned long long fIovBegin, unsigned long long fIovEnd)
int i
Definition: DBlmapReader.cc:9
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)
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)
const char * itoa(int i)
XERCES_CPP_NAMESPACE::DOMElement * createDataset(XERCES_CPP_NAMESPACE::DOMDocument *doc, const HcalHLXMask &mask, const char *gmtime, const char *version, const char *subversion)
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)