Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-14 02:22:48

0001 #ifndef ONLINEDB_ECALCONDDB_FECONFIGCOKEDAT_H
0002 #define ONLINEDB_ECALCONDDB_FECONFIGCOKEDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigCokeInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class FEConfigCokeDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;  // XXX temp should not need
0014   FEConfigCokeDat();
0015   ~FEConfigCokeDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "FE_CONFIG_COKE_DAT"; }
0019 
0020   inline void setThreshold(int x) { m_thre = x; }
0021   inline int getThreshold() const { return m_thre; }
0022   inline void setSuccEventLimit(int x) { m_succ_ev_lim = x; }
0023   inline int getSuccEventLimit() const { return m_succ_ev_lim; }
0024   inline void setCumulEventLimit(int x) { m_cum_ev_lim = x; }
0025   inline int getCumulEventLimit() const { return m_cum_ev_lim; }
0026   inline void setSuccDetectEnable(int x) { m_succ_det_en = x; }
0027   inline int getSuccDetectEnable() const { return m_succ_det_en; }
0028   inline void setCumDetectEnable(int x) { m_cum_det_en = x; }
0029   inline int getCumDetectEnable() const { return m_cum_det_en; }
0030   inline void setThreshold1(int x) { m_thre1 = x; }
0031   inline int getThreshold1() const { return m_thre1; }
0032   inline void setSucc1EventLimit(int x) { m_succ1_ev_lim = x; }
0033   inline int getSucc1EventLimit() const { return m_succ1_ev_lim; }
0034   inline void setCumul1EventLimit(int x) { m_cum1_ev_lim = x; }
0035   inline int getCumul1EventLimit() const { return m_cum1_ev_lim; }
0036   inline void setCombiMode(int x) { m_combi_mode = x; }
0037   inline int getCombiMode() const { return m_combi_mode; }
0038   inline void setOccMode(int x) { m_occ_mode = x; }
0039   inline int getOccMode() const { return m_occ_mode; }
0040   inline void setCombSuccDetect(int x) { m_comb_succ_det = x; }
0041   inline int getCombSuccDetect() const { return m_comb_succ_det; }
0042   inline void setCombCumulDetect(int x) { m_comb_cumul_det = x; }
0043   inline int getCombCumulDetect() const { return m_comb_cumul_det; }
0044   inline void setOccDetect(int x) { m_occ_det = x; }
0045   inline int getOccDetect() const { return m_occ_det; }
0046   inline void setCumul1Detect(int x) { m_cum1_det = x; }
0047   inline int getCumul1Detect() const { return m_cum1_det; }
0048   inline void setThreshold2(int x) { m_thre2 = x; }
0049   inline int getThreshold2() const { return m_thre2; }
0050   inline void setOccLimit(int x) { m_occ_lim = x; }
0051   inline int getOccLimit() const { return m_occ_lim; }
0052   inline void setThreshold3(int x) { m_thre3 = x; }
0053   inline int getThreshold3() const { return m_thre3; }
0054   inline void setCumul2Limit(int x) { m_cum2_lim = x; }
0055   inline int getCumul2Limit() const { return m_cum2_lim; }
0056   inline void setStopBufW(int x) { m_stop_bufw = x; }
0057   inline int getStopBufW() const { return m_stop_bufw; }
0058   // this simplifies the code
0059   inline void setPar1(int x) { m_thre = x; }
0060   inline int getPar1() const { return m_thre; }
0061   inline void setPar2(int x) { m_succ_ev_lim = x; }
0062   inline int getPar2() const { return m_succ_ev_lim; }
0063   inline void setPar3(int x) { m_cum_ev_lim = x; }
0064   inline int getPar3() const { return m_cum_ev_lim; }
0065   inline void setPar4(int x) { m_succ_det_en = x; }
0066   inline int getPar4() const { return m_succ_det_en; }
0067   inline void setPar5(int x) { m_cum_det_en = x; }
0068   inline int getPar5() const { return m_cum_det_en; }
0069   inline void setPar6(int x) { m_thre1 = x; }
0070   inline int getPar6() const { return m_thre1; }
0071   inline void setPar7(int x) { m_succ1_ev_lim = x; }
0072   inline int getPar7() const { return m_succ1_ev_lim; }
0073   inline void setPar8(int x) { m_cum1_ev_lim = x; }
0074   inline int getPar8() const { return m_cum1_ev_lim; }
0075   inline void setPar9(int x) { m_combi_mode = x; }
0076   inline int getPar9() const { return m_combi_mode; }
0077   inline void setPar10(int x) { m_occ_mode = x; }
0078   inline int getPar10() const { return m_occ_mode; }
0079   inline void setPar11(int x) { m_comb_succ_det = x; }
0080   inline int getPar11() const { return m_comb_succ_det; }
0081   inline void setPar12(int x) { m_comb_cumul_det = x; }
0082   inline int getPar12() const { return m_comb_cumul_det; }
0083   inline void setPar13(int x) { m_occ_det = x; }
0084   inline int getPar13() const { return m_occ_det; }
0085   inline void setPar14(int x) { m_cum1_det = x; }
0086   inline int getPar14() const { return m_cum1_det; }
0087   inline void setPar15(int x) { m_thre2 = x; }
0088   inline int getPar15() const { return m_thre2; }
0089   inline void setPar16(int x) { m_occ_lim = x; }
0090   inline int getPar16() const { return m_occ_lim; }
0091   inline void setPar17(int x) { m_thre3 = x; }
0092   inline int getPar17() const { return m_thre3; }
0093   inline void setPar18(int x) { m_cum2_lim = x; }
0094   inline int getPar18() const { return m_cum2_lim; }
0095   inline void setPar19(int x) { m_stop_bufw = x; }
0096   inline int getPar19() const { return m_stop_bufw; }
0097 
0098   void clear() {
0099     m_thre = 0;
0100     m_succ_ev_lim = 0;
0101     m_cum_ev_lim = 0;
0102     m_succ_det_en = 0;
0103     m_cum_det_en = 0;
0104     m_thre1 = 0;
0105     m_succ1_ev_lim = 0;
0106     m_cum1_ev_lim = 0;
0107     m_combi_mode = 0;
0108     m_occ_mode = 0;
0109     m_comb_succ_det = 0;
0110     m_comb_cumul_det = 0;
0111     m_occ_det = 0;
0112     m_cum1_det = 0;
0113     m_thre2 = 0;
0114     m_occ_lim = 0;
0115     m_thre3 = 0;
0116     m_cum2_lim = 0;
0117     m_stop_bufw = 0;
0118   }
0119 
0120 private:
0121   void prepareWrite() noexcept(false) override;
0122   void writeDB(const EcalLogicID* ecid, const FEConfigCokeDat* item, FEConfigCokeInfo* iconf) noexcept(false);
0123   void writeArrayDB(const std::map<EcalLogicID, FEConfigCokeDat>* data, FEConfigCokeInfo* iconf) noexcept(false);
0124   void fetchData(std::map<EcalLogicID, FEConfigCokeDat>* fillMap, FEConfigCokeInfo* iconf) noexcept(false);
0125   // User data
0126   int m_thre;
0127   int m_succ_ev_lim;
0128   int m_cum_ev_lim;
0129   int m_succ_det_en;
0130   int m_cum_det_en;
0131   int m_thre1;
0132   int m_succ1_ev_lim;
0133   int m_cum1_ev_lim;
0134   int m_combi_mode;
0135   int m_occ_mode;
0136   int m_comb_succ_det;
0137   int m_comb_cumul_det;
0138   int m_occ_det;
0139   int m_cum1_det;
0140   int m_thre2;
0141   int m_occ_lim;
0142   int m_thre3;
0143   int m_cum2_lim;
0144   int m_stop_bufw;
0145 };
0146 
0147 #endif