00001 #ifndef MiscalibReaderFromXML_H 00002 #define MiscalibReaderFromXML_H 00003 00013 #include <xercesc/dom/DOMNode.hpp> 00014 #include <xercesc/dom/DOM.hpp> 00015 #include <xercesc/dom/DOMCharacterData.hpp> 00016 #include <xercesc/parsers/XercesDOMParser.hpp> 00017 #include <xercesc/util/PlatformUtils.hpp> 00018 #include <xercesc/framework/LocalFileFormatTarget.hpp> 00019 #include <xercesc/util/XMLUni.hpp> 00020 #include <xercesc/util/XMLURL.hpp> 00021 #include "CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibMap.h" 00022 00023 00024 #include<iostream> 00025 #include<string> 00026 #include<vector> 00027 #include<map> 00028 00029 00030 using namespace xercesc; 00031 00032 class MiscalibReaderFromXML{ 00033 00034 public: 00035 MiscalibReaderFromXML(CaloMiscalibMap &); 00036 virtual ~MiscalibReaderFromXML(){} 00037 00038 bool parseXMLMiscalibFile(std::string configFile); 00039 00040 virtual DetId parseCellEntry(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute)=0; 00041 int getIntAttribute(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute, const std::string &attribute_name); 00042 double getScalingFactor(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute); 00043 double getFloatAttribute(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute, const std::string &attribute_name); 00044 00045 private: 00046 static int s_numberOfInstances; 00047 CaloMiscalibMap & caloMap_; 00048 }; 00049 00050 #endif