CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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();
17 
18  // User data methods
19  inline std::string getTable() { 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()
57  throw(std::runtime_error);
58 
60  throw(std::runtime_error);
61 
62  void writeArrayDB(const std::vector< ODWeightsDat >& data, ODFEWeightsInfo* iov)
63  throw(std::runtime_error);
64 
65 
66  void fetchData(std::vector< ODWeightsDat >* fillMap, ODFEWeightsInfo* iov)
67  throw(std::runtime_error);
68 
69  void fetchData(ODWeightsDat * p) throw(std::runtime_error);
70 
71  // User data
72  int m_sm;
73  int m_fed;
74  int m_tt;
75  int m_xt;
76  int m_ID;
77 
78  float m_wei0;
79  float m_wei1;
80  float m_wei2;
81  float m_wei3;
82  float m_wei4;
83  float m_wei5;
84 
85  float m_wei[6];
86  std::vector<std::vector<float> > dccw;
87 };
88 
89 #endif
float getWeight0() const
Definition: ODWeightsDat.h:45
void writeArrayDB(const std::vector< ODWeightsDat > &data, ODFEWeightsInfo *iov)
void setId(int dac)
Definition: ODWeightsDat.h:21
void writeDB(const ODWeightsDat *item, ODFEWeightsInfo *iov)
Definition: ODWeightsDat.cc:60
void fetchData(std::vector< ODWeightsDat > *fillMap, ODFEWeightsInfo *iov)
Definition: ODWeightsDat.cc:87
void setWeight3(float x)
Definition: ODWeightsDat.h:39
void setWeight2(float x)
Definition: ODWeightsDat.h:38
int getId() const
Definition: ODWeightsDat.h:22
std::string getTable()
Definition: ODWeightsDat.h:19
float getWeight5() const
Definition: ODWeightsDat.h:50
int getCrystalId() const
Definition: ODWeightsDat.h:34
void setSMId(int dac)
Definition: ODWeightsDat.h:24
void prepareWrite()
Definition: ODWeightsDat.cc:44
float getWeight3() const
Definition: ODWeightsDat.h:48
void setWeight4(float x)
Definition: ODWeightsDat.h:40
void setWeight(int pos, float x)
Definition: ODWeightsDat.h:43
float getWeight4() const
Definition: ODWeightsDat.h:49
float m_wei[6]
Definition: ODWeightsDat.h:85
void setWeight1(float x)
Definition: ODWeightsDat.h:37
int getTTId() const
Definition: ODWeightsDat.h:31
float getWeight1() const
Definition: ODWeightsDat.h:46
tuple iov
Definition: o2o.py:307
void setTTId(int dac)
Definition: ODWeightsDat.h:30
void setWeight0(float x)
Definition: ODWeightsDat.h:36
void setCrystalId(int dac)
Definition: ODWeightsDat.h:33
std::vector< std::vector< float > > dccw
Definition: ODWeightsDat.h:86
std::vector< std::vector< float > > getWeight() const
Definition: ODWeightsDat.h:52
string const
Definition: compareJSON.py:14
float getWeight2() const
Definition: ODWeightsDat.h:47
int getSMId() const
Definition: ODWeightsDat.h:25
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void setWeight5(float x)
Definition: ODWeightsDat.h:41
Definition: DDAxes.h:10
void setFedId(int dac)
Definition: ODWeightsDat.h:27
int getFedId() const
Definition: ODWeightsDat.h:28