Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:47

0001 #ifndef CALIGAINRATIODAT_H
0002 #define CALIGAINRATIODAT_H
0003 
0004 #include <map>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/CaliTag.h"
0009 #include "OnlineDB/EcalCondDB/interface/CaliIOV.h"
0010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0011 
0012 class CaliGainRatioDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   CaliGainRatioDat();
0016   ~CaliGainRatioDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "CALI_GAIN_RATIO_DAT"; }
0020 
0021   inline void setG1G12(float c) { m_g1_g12 = c; }
0022   inline float getG1G12() const { return m_g1_g12; }
0023 
0024   inline void setG6G12(float c) { m_g6_g12 = c; }
0025   inline float getG6G12() const { return m_g6_g12; }
0026 
0027   inline void setTaskStatus(bool s) { m_taskStatus = s; }
0028   inline bool getTaskStatus() const { return m_taskStatus; }
0029 
0030 private:
0031   void prepareWrite() noexcept(false) override;
0032 
0033   void writeDB(const EcalLogicID* ecid, const CaliGainRatioDat* item, CaliIOV* iov) noexcept(false);
0034 
0035   void fetchData(std::map<EcalLogicID, CaliGainRatioDat>* fillVec, CaliIOV* iov) noexcept(false);
0036 
0037   void writeArrayDB(const std::map<EcalLogicID, CaliGainRatioDat>* data, CaliIOV* iov) noexcept(false);
0038 
0039   // User data
0040   float m_g1_g12;
0041   float m_g6_g12;
0042   bool m_taskStatus;
0043 };
0044 
0045 #endif