Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONPEDESTALOFFSETSDAT_H
0002 #define MONPEDESTALOFFSETSDAT_H
0003 
0004 #include <map>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonRunTag.h"
0009 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
0010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0011 
0012 class MonPedestalOffsetsDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   MonPedestalOffsetsDat();
0016   ~MonPedestalOffsetsDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "MON_PEDESTAL_OFFSETS_DAT"; }
0020 
0021   inline void setDACG1(int dac) { m_dacG1 = dac; }
0022   inline int getDACG1() const { return m_dacG1; }
0023 
0024   inline void setDACG6(int dac) { m_dacG6 = dac; }
0025   inline int getDACG6() const { return m_dacG6; }
0026 
0027   inline void setDACG12(int dac) { m_dacG12 = dac; }
0028   inline int getDACG12() const { return m_dacG12; }
0029 
0030   inline void setTaskStatus(bool status) { m_taskStatus = status; }
0031   inline bool getTaskStatus() const { return m_taskStatus; }
0032 
0033 private:
0034   void prepareWrite() noexcept(false) override;
0035 
0036   void writeDB(const EcalLogicID* ecid, const MonPedestalOffsetsDat* item, MonRunIOV* iov) noexcept(false);
0037 
0038   void writeArrayDB(const std::map<EcalLogicID, MonPedestalOffsetsDat>* data, MonRunIOV* iov) noexcept(false);
0039 
0040   void fetchData(std::map<EcalLogicID, MonPedestalOffsetsDat>* fillMap,
0041                  MonRunIOV* iov,
0042                  std::string mappa = " cv.maps_to ") noexcept(false);
0043 
0044   // User data
0045   int m_dacG1;
0046   int m_dacG6;
0047   int m_dacG12;
0048   bool m_taskStatus;
0049 };
0050 
0051 #endif