CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CalibCalorimetry/CaloMiscalibTools/interface/MiscalibReaderFromXML.h

Go to the documentation of this file.
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 class MiscalibReaderFromXML{
00031 
00032 public:
00033 MiscalibReaderFromXML(CaloMiscalibMap &);
00034 virtual ~MiscalibReaderFromXML(){}
00035 
00036 bool parseXMLMiscalibFile(std::string configFile);
00037 
00038 virtual DetId parseCellEntry(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute)=0;
00039 int    getIntAttribute(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute, const std::string &attribute_name);
00040 double getScalingFactor(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute);
00041 double getFloatAttribute(XERCES_CPP_NAMESPACE::DOMNamedNodeMap *attribute, const std::string &attribute_name);
00042 
00043 private:
00044 static int s_numberOfInstances;
00045 CaloMiscalibMap & caloMap_;
00046 };
00047 
00048 #endif