CMS 3D CMS Logo

ODWeightsDat.h
Go to the documentation of this file.
1 #ifndef ODWEIGHTSDAT_H
2 #define ODWEIGHTSDAT_H
3 
4 #include <vector>
5 #include <stdexcept>
6 
11 
12 class ODWeightsDat : public IODConfig {
13 public:
14  friend class EcalCondDBInterface;
15  ODWeightsDat();
16  ~ODWeightsDat() override;
17 
18  // User data methods
19  inline std::string getTable() override { return "DCC_WEIGHTS_DAT"; }
20 
21  inline void setId(int dac) { m_ID = dac; }
22  inline int getId() const { return m_ID; }
23 
24  inline void setSMId(int dac) { m_sm = dac; }
25  inline int getSMId() const { return m_sm; }
26 
27  inline void setFedId(int dac) { m_fed = dac; }
28  inline int getFedId() const { return m_fed; }
29 
30  inline void setTTId(int dac) { m_tt = dac; }
31  inline int getTTId() const { return m_tt; }
32 
33  inline void setCrystalId(int dac) { m_xt = dac; }
34  inline int getCrystalId() const { return m_xt; }
35 
36  inline void setWeight0(float x) { m_wei0 = x; }
37  inline void setWeight1(float x) { m_wei1 = x; }
38  inline void setWeight2(float x) { m_wei2 = x; }
39  inline void setWeight3(float x) { m_wei3 = x; }
40  inline void setWeight4(float x) { m_wei4 = x; }
41  inline void setWeight5(float x) { m_wei5 = x; }
42 
43  inline void setWeight(int pos, float x) { m_wei[pos] = x; }
44 
45  inline float getWeight0() const { return m_wei0; }
46  inline float getWeight1() const { return m_wei1; }
47  inline float getWeight2() const { return m_wei2; }
48  inline float getWeight3() const { return m_wei3; }
49  inline float getWeight4() const { return m_wei4; }
50  inline float getWeight5() const { return m_wei5; }
51 
52  inline std::vector<std::vector<float> > getWeight() const { return dccw; }
53 
54 private:
55  void clear();
56  void prepareWrite() noexcept(false) override;
57 
58  void writeDB(const ODWeightsDat* item, ODFEWeightsInfo* iov) noexcept(false);
59 
61 
62  void fetchData(std::vector<ODWeightsDat>* fillMap, ODFEWeightsInfo* iov) noexcept(false);
63 
64  void fetchData(ODWeightsDat* p) noexcept(false);
65 
66  // User data
67  int m_sm;
68  int m_fed;
69  int m_tt;
70  int m_xt;
71  int m_ID;
72 
73  float m_wei0;
74  float m_wei1;
75  float m_wei2;
76  float m_wei3;
77  float m_wei4;
78  float m_wei5;
79 
80  float m_wei[6];
81  std::vector<std::vector<float> > dccw;
82 };
83 
84 #endif
void setId(int dac)
Definition: ODWeightsDat.h:21
void setWeight3(float x)
Definition: ODWeightsDat.h:39
void setWeight2(float x)
Definition: ODWeightsDat.h:38
float getWeight3() const
Definition: ODWeightsDat.h:48
std::string getTable() override
Definition: ODWeightsDat.h:19
void setSMId(int dac)
Definition: ODWeightsDat.h:24
void setWeight4(float x)
Definition: ODWeightsDat.h:40
float getWeight5() const
Definition: ODWeightsDat.h:50
void setWeight(int pos, float x)
Definition: ODWeightsDat.h:43
float m_wei[6]
Definition: ODWeightsDat.h:80
int getSMId() const
Definition: ODWeightsDat.h:25
void setWeight1(float x)
Definition: ODWeightsDat.h:37
std::vector< std::vector< float > > getWeight() const
Definition: ODWeightsDat.h:52
int getCrystalId() const
Definition: ODWeightsDat.h:34
void writeArrayDB(const std::vector< ODWeightsDat > &data, ODFEWeightsInfo *iov) noexcept(false)
float getWeight1() const
Definition: ODWeightsDat.h:46
void setTTId(int dac)
Definition: ODWeightsDat.h:30
void setWeight0(float x)
Definition: ODWeightsDat.h:36
void setCrystalId(int dac)
Definition: ODWeightsDat.h:33
int getTTId() const
Definition: ODWeightsDat.h:31
~ODWeightsDat() override
Definition: ODWeightsDat.cc:22
void prepareWrite() noexcept(false) override
Definition: ODWeightsDat.cc:37
std::vector< std::vector< float > > dccw
Definition: ODWeightsDat.h:81
float getWeight2() const
Definition: ODWeightsDat.h:47
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void setWeight5(float x)
Definition: ODWeightsDat.h:41
int getFedId() const
Definition: ODWeightsDat.h:28
int getId() const
Definition: ODWeightsDat.h:22
float getWeight4() const
Definition: ODWeightsDat.h:49
void fetchData(std::vector< ODWeightsDat > *fillMap, ODFEWeightsInfo *iov) noexcept(false)
Definition: ODWeightsDat.cc:73
void setFedId(int dac)
Definition: ODWeightsDat.h:27
float getWeight0() const
Definition: ODWeightsDat.h:45
void writeDB(const ODWeightsDat *item, ODFEWeightsInfo *iov) noexcept(false)
Definition: ODWeightsDat.cc:50