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
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
IDataItem.h
ODWeightsDat::getTable
std::string getTable() override
Definition: ODWeightsDat.h:19
ODWeightsDat::getWeight1
float getWeight1() const
Definition: ODWeightsDat.h:46
ODWeightsDat::setTTId
void setTTId(int dac)
Definition: ODWeightsDat.h:30
funct::false
false
Definition: Factorize.h:29
ODWeightsDat::~ODWeightsDat
~ODWeightsDat() override
Definition: ODWeightsDat.cc:22
ODWeightsDat::ODWeightsDat
ODWeightsDat()
Definition: ODWeightsDat.cc:10
ODWeightsDat::m_wei4
float m_wei4
Definition: ODWeightsDat.h:77
ODWeightsDat::m_wei2
float m_wei2
Definition: ODWeightsDat.h:75
ODWeightsDat::setId
void setId(int dac)
Definition: ODWeightsDat.h:21
pos
Definition: PixelAliasList.h:18
IODConfig.h
ODWeightsDat::setWeight
void setWeight(int pos, float x)
Definition: ODWeightsDat.h:43
ODWeightsDat::setWeight5
void setWeight5(float x)
Definition: ODWeightsDat.h:41
DDAxes::x
ODWeightsDat::getWeight2
float getWeight2() const
Definition: ODWeightsDat.h:47
ODWeightsDat
Definition: ODWeightsDat.h:12
watchdog.const
const
Definition: watchdog.py:83
ODFEWeightsInfo.h
ODWeightsDat::getWeight
std::vector< std::vector< float > > getWeight() const
Definition: ODWeightsDat.h:52
ODWeightsDat::m_wei
float m_wei[6]
Definition: ODWeightsDat.h:80
ODWeightsDat::m_wei0
float m_wei0
Definition: ODWeightsDat.h:73
ODWeightsDat::setFedId
void setFedId(int dac)
Definition: ODWeightsDat.h:27
ODWeightsDat::m_fed
int m_fed
Definition: ODWeightsDat.h:68
ODWeightsDat::getWeight4
float getWeight4() const
Definition: ODWeightsDat.h:49
ODWeightsDat::m_wei5
float m_wei5
Definition: ODWeightsDat.h:78
ODFEWeightsInfo
Definition: ODFEWeightsInfo.h:9
ODWeightsDat::getWeight5
float getWeight5() const
Definition: ODWeightsDat.h:50
ODWeightsDat::setWeight1
void setWeight1(float x)
Definition: ODWeightsDat.h:37
ODWeightsDat::m_sm
int m_sm
Definition: ODWeightsDat.h:67
ODWeightsDat::getTTId
int getTTId() const
Definition: ODWeightsDat.h:31
ODWeightsDat::getSMId
int getSMId() const
Definition: ODWeightsDat.h:25
ODWeightsDat::getWeight3
float getWeight3() const
Definition: ODWeightsDat.h:48
ODWeightsDat::m_wei1
float m_wei1
Definition: ODWeightsDat.h:74
ODWeightsDat::writeDB
void writeDB(const ODWeightsDat *item, ODFEWeightsInfo *iov) noexcept(false)
Definition: ODWeightsDat.cc:50
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ODWeightsDat::setSMId
void setSMId(int dac)
Definition: ODWeightsDat.h:24
ODWeightsDat::writeArrayDB
void writeArrayDB(const std::vector< ODWeightsDat > &data, ODFEWeightsInfo *iov) noexcept(false)
Definition: ODWeightsDat.cc:147
ODWeightsDat::setWeight2
void setWeight2(float x)
Definition: ODWeightsDat.h:38
ODWeightsDat::setWeight0
void setWeight0(float x)
Definition: ODWeightsDat.h:36
ODWeightsDat::m_xt
int m_xt
Definition: ODWeightsDat.h:70
IODConfig
Definition: IODConfig.h:18
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
ODWeightsDat::setWeight4
void setWeight4(float x)
Definition: ODWeightsDat.h:40
ODWeightsDat::m_wei3
float m_wei3
Definition: ODWeightsDat.h:76
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ODWeightsDat::prepareWrite
void prepareWrite() noexcept(false) override
Definition: ODWeightsDat.cc:37
ODWeightsDat::m_ID
int m_ID
Definition: ODWeightsDat.h:71
ODWeightsDat::dccw
std::vector< std::vector< float > > dccw
Definition: ODWeightsDat.h:81
EcalLogicID.h
std
Definition: JetResolutionObject.h:76
ODWeightsDat::fetchData
void fetchData(std::vector< ODWeightsDat > *fillMap, ODFEWeightsInfo *iov) noexcept(false)
Definition: ODWeightsDat.cc:73
ODWeightsDat::clear
void clear()
Definition: ODWeightsDat.cc:24
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ODWeightsDat::getWeight0
float getWeight0() const
Definition: ODWeightsDat.h:45
ODWeightsDat::m_tt
int m_tt
Definition: ODWeightsDat.h:69
ODWeightsDat::setWeight3
void setWeight3(float x)
Definition: ODWeightsDat.h:39
ODWeightsDat::getFedId
int getFedId() const
Definition: ODWeightsDat.h:28
ODWeightsDat::getId
int getId() const
Definition: ODWeightsDat.h:22
ODWeightsDat::getCrystalId
int getCrystalId() const
Definition: ODWeightsDat.h:34
ODWeightsDat::setCrystalId
void setCrystalId(int dac)
Definition: ODWeightsDat.h:33