Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ODWEIGHTSSAMPLESDAT_H
0002 #define ODWEIGHTSSAMPLESDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 #include "OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h"
0011 
0012 class ODWeightsSamplesDat : public IODConfig {
0013 public:
0014   friend class EcalCondDBInterface;
0015   ODWeightsSamplesDat();
0016   ~ODWeightsSamplesDat() override;
0017 
0018   // User data methods
0019   inline std::string getTable() override { return "DCC_WEIGHTSAMPLE_DAT"; }
0020 
0021   inline void setId(int dac) { m_ID = dac; }
0022   inline int getId() const { return m_ID; }
0023 
0024   inline void setFedId(int dac) { m_fed = dac; }
0025   inline int getFedId() const { return m_fed; }
0026 
0027   inline void setSampleId(int dac) { m_ss = dac; }
0028   inline int getSampleId() const { return m_ss; }
0029 
0030   inline void setWeightNumber(int dac) { m_sn = dac; }
0031   inline int getWeightNumber() const { return m_sn; }
0032 
0033 private:
0034   void clear();
0035   void prepareWrite() noexcept(false) override;
0036 
0037   void writeDB(const ODWeightsSamplesDat* item, ODFEWeightsInfo* iov) noexcept(false);
0038 
0039   void writeArrayDB(const std::vector<ODWeightsSamplesDat>& data, ODFEWeightsInfo* iov) noexcept(false);
0040 
0041   void fetchData(std::vector<ODWeightsSamplesDat>* fillMap, ODFEWeightsInfo* iov) noexcept(false);
0042 
0043   void fetchData(ODWeightsSamplesDat* p) noexcept(false);
0044 
0045   // User data
0046 
0047   int m_fed;
0048   int m_ss;
0049   int m_sn;
0050   int m_ID;
0051 };
0052 
0053 #endif