File indexing completed on 2024-04-06 12:02:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _EcalTBWeightsXMLTranslator_h_
0011 #define _EcalTBWeightsXMLTranslator_h_
0012
0013 #include "CondFormats/EcalObjects/interface/EcalTBWeights.h"
0014 #include "CondFormats/EcalObjects/interface/EcalWeightSet.h"
0015 #include "CondTools/Ecal/interface/EcalCondHeader.h"
0016 #include <xercesc/dom/DOMNode.hpp>
0017 #include <string>
0018
0019 class EcalTBWeightsXMLTranslator {
0020 public:
0021 static int readXML(const std::string& filename, EcalCondHeader& header, EcalTBWeights& record);
0022
0023 static int writeXML(const std::string& filename, const EcalCondHeader& header, const EcalTBWeights& record);
0024
0025 private:
0026 static std::string dumpXML(const EcalCondHeader& header, const EcalTBWeights& record);
0027
0028 static void readWeightSet(xercesc::DOMNode* parentNode, EcalWeightSet& ws);
0029 static void writeWeightSet(xercesc::DOMNode* parentNode, const EcalWeightSet& ws);
0030 static void writeWeightMatrix(xercesc::DOMNode* node, const EcalWeightSet::EcalWeightMatrix& matrix);
0031
0032 static void writeChi2WeightMatrix(xercesc::DOMNode* node, const EcalWeightSet::EcalChi2WeightMatrix& matrix);
0033 };
0034
0035 #endif