CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/OnlineDB/EcalCondDB/interface/CaliGainRatioDat.h

Go to the documentation of this file.
00001 #ifndef CALIGAINRATIODAT_H
00002 #define CALIGAINRATIODAT_H
00003 
00004 #include <map>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
00008 #include "OnlineDB/EcalCondDB/interface/CaliTag.h"
00009 #include "OnlineDB/EcalCondDB/interface/CaliIOV.h"
00010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
00011 
00012 class CaliGainRatioDat : public IDataItem {
00013  public:
00014   friend class EcalCondDBInterface;
00015   CaliGainRatioDat();
00016   ~CaliGainRatioDat();
00017   
00018   // User data methods
00019   inline std::string getTable() { return "CALI_GAIN_RATIO_DAT"; }
00020 
00021   inline void setG1G12(float c) { m_g1_g12 = c; }
00022   inline float getG1G12() const { return m_g1_g12; }
00023 
00024   inline void setG6G12(float c) { m_g6_g12 = c; }
00025   inline float getG6G12() const { return m_g6_g12; }
00026 
00027   inline void setTaskStatus(bool s) { m_taskStatus = s; }
00028   inline bool getTaskStatus() const { return m_taskStatus; }
00029 
00030  private:
00031   void prepareWrite() 
00032     throw(std::runtime_error);
00033   
00034   void writeDB(const EcalLogicID* ecid, const CaliGainRatioDat* item, CaliIOV* iov)
00035     throw(std::runtime_error);
00036   
00037   void fetchData(std::map< EcalLogicID, CaliGainRatioDat >* fillVec, CaliIOV* iov)
00038     throw(std::runtime_error);
00039 
00040   void writeArrayDB(const std::map< EcalLogicID, CaliGainRatioDat >* data, CaliIOV* iov)
00041     throw(std::runtime_error);
00042   
00043   // User data
00044   float m_g1_g12;
00045   float m_g6_g12;
00046   bool m_taskStatus;
00047   
00048 };
00049 
00050 #endif