Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CALICRYSTALINTERCALDAT_H
0002 #define CALICRYSTALINTERCALDAT_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 CaliCrystalIntercalDat : public IDataItem {
0013 public:
0014   friend class EcalCondDBInterface;
0015   CaliCrystalIntercalDat();
0016   ~CaliCrystalIntercalDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "CALI_CRYSTAL_INTERCAL_DAT"; }
0020 
0021   inline void setCali(float c) { m_cali = c; }
0022   inline float getCali() const { return m_cali; }
0023 
0024   inline void setCaliRMS(float c) { m_caliRMS = c; }
0025   inline float getCaliRMS() const { return m_caliRMS; }
0026 
0027   inline void setNumEvents(int n) { m_numEvents = n; }
0028   inline int getNumEvents() const { return m_numEvents; }
0029 
0030   inline void setTaskStatus(bool s) { m_taskStatus = s; }
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 CaliCrystalIntercalDat* item, CaliIOV* iov) noexcept(false);
0037 
0038   void fetchData(std::map<EcalLogicID, CaliCrystalIntercalDat>* fillVec, CaliIOV* iov) noexcept(false);
0039 
0040   void writeArrayDB(const std::map<EcalLogicID, CaliCrystalIntercalDat>* data, CaliIOV* iov) noexcept(false);
0041 
0042   // User data
0043   float m_cali;
0044   float m_caliRMS;
0045   int m_numEvents;
0046   bool m_taskStatus;
0047 };
0048 
0049 #endif