File indexing completed on 2023-03-17 10:56:38
0001 #ifndef SiStripConfigWriter_H
0002 #define SiStripConfigWriter_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "Utilities/Xerces/interface/Xerces.h"
0012 #include <xercesc/framework/StdOutFormatTarget.hpp>
0013 #include <xercesc/framework/LocalFileFormatTarget.hpp>
0014
0015 #include <xercesc/util/XMLString.hpp>
0016 #include <xercesc/dom/DOMException.hpp>
0017 #include <xercesc/dom/DOMImplementation.hpp>
0018 #include <xercesc/dom/DOM.hpp>
0019
0020 #include <iostream>
0021 #include <string>
0022 #include <vector>
0023 #include <map>
0024
0025 class SiStripConfigWriter {
0026 public:
0027
0028 SiStripConfigWriter();
0029
0030 ~SiStripConfigWriter();
0031
0032 bool init(std::string main);
0033 void write(std::string fname);
0034 void createElement(std::string tag);
0035 void createElement(std::string tag, std::string name);
0036 void createChildElement(std::string tag, std::string name);
0037 void createChildElement(std::string tag, std::string name, std::string att_name, std::string att_val);
0038 void createChildElement(std::string tag,
0039 std::string name,
0040 std::string att_name1,
0041 std::string att_val1,
0042 std::string att_name2,
0043 std::string att_val2);
0044 void createChildElement(std::string tag,
0045 std::string name,
0046 std::string att_name1,
0047 std::string att_val1,
0048 std::string att_name2,
0049 std::string att_val2,
0050 std::string att_name3,
0051 std::string att_val3);
0052
0053 protected:
0054 private:
0055 xercesc::DOMElement* theTopElement;
0056 xercesc::DOMElement* theLastElement;
0057 xercesc::DOMDocument* theDoc;
0058 xercesc::DOMLSSerializer* theDomWriter;
0059 xercesc::DOMLSOutput* theOutput;
0060 };
0061
0062 #endif