Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:50

0001 /**
0002    Translates a EcalFloatCondObjectContainer record to XML
0003    and vice versa   
0004 
0005    \author Stefano ARGIRO
0006    \version $Id: EcalFloatCondObjectContainerXMLTranslator.h,v 1.3 2009/07/09 22:56:14 argiro Exp $
0007    \date 20 Jun 2008
0008 */
0009 
0010 #ifndef __EcalFloatCondObjectContainterXMLTranslator_h_
0011 #define __EcalFloatCondObjectContainterXMLTranslator_h_
0012 
0013 #include "CondTools/Ecal/interface/EcalCondHeader.h"
0014 #include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
0015 #include <string>
0016 #include <vector>
0017 
0018 class EcalFloatCondObjectContainerXMLTranslator {
0019 public:
0020   static int readXML(const std::string& filename, EcalCondHeader& header, EcalFloatCondObjectContainer& record);
0021 
0022   static std::vector<float> barrelfromXML(const std::string& filename);
0023 
0024   static std::vector<float> endcapfromXML(const std::string& filename);
0025 
0026   static int writeXML(const std::string& filename,
0027                       const EcalCondHeader& header,
0028                       const EcalFloatCondObjectContainer& record);
0029 
0030   // dump the two flat arrays (hashed-indexed as in EBDetId, EEDetId) to XML
0031   static std::string dumpXML(const EcalCondHeader& header, const std::vector<float>& eb, const std::vector<float>& ee);
0032 
0033 private:
0034   // dump the CMSSW object container to XML
0035   static std::string dumpXML(const EcalCondHeader& header, const EcalFloatCondObjectContainer& record);
0036 };
0037 
0038 #endif  // __EcalFloatCondObjectContainerXMLTranslator_h_