CMS 3D CMS Logo

LMFPrimDat.cc
Go to the documentation of this file.
2 
4 
5 LMFPrimDat::LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn) : LMFColoredTable(env, conn) {
6  init();
7 }
8 
10 
12  init();
13  setColor(color);
14  setSystem(system);
15 }
16 
18  init();
19  setColor(color);
20  setSystem(system);
21 }
22 
23 LMFPrimDat::LMFPrimDat(oracle::occi::Environment *env,
24  oracle::occi::Connection *conn,
25  std::string color,
26  std::string system)
28  init();
29  setColor(color);
30  setSystem(system);
31 }
32 
33 LMFPrimDat::LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, int color, std::string system)
35  init();
36  setColor(color);
37  setSystem(system);
38 }
39 
41  init();
42  setColor(color);
43  setSystem(system);
44 }
45 
47  init();
48  setColor(color);
49  setSystem(system);
50 }
51 
53  m_className = "LMFPrimDat";
54  m_keys["FLAG"] = 0;
55  m_keys["MEAN"] = 1;
56  m_keys["RMS"] = 2;
57  m_keys["M3"] = 3;
58  m_keys["APDAMEAN"] = 4;
59  m_keys["APDARMS"] = 5;
60  m_keys["APDAM3"] = 6;
61  m_keys["APDBMEAN"] = 7;
62  m_keys["APDBRMS"] = 8;
63  m_keys["APDBM3"] = 9;
64  m_keys["APDPNMEAN"] = 10;
65  m_keys["APDPNRMS"] = 11;
66  m_keys["APDPNM3"] = 12;
67  m_keys["ALPHA"] = 13;
68  m_keys["BETA"] = 14;
69  m_keys["SHAPECORR"] = 15;
70  m_keys["VMIN"] = 16;
71  m_keys["VMAX"] = 17;
72  for (unsigned int i = 0; i < m_keys.size(); i++) {
73  m_type.push_back("NUMBER");
74  }
75  m_system = 0;
76  m_color = 0;
77 }
78 
80  bool ret = true;
81  if ((getSystem() != "LASER") && (getSystem() != "LED")) {
82  m_Error += " System name not properly set [" + getSystem() + "]";
83  ret = false;
84  }
85  if ((getSystem() == "LASER") && (getColor() != "BLUE") && (getColor() != "IR")) {
86  m_Error += " Color not properly set [" + getColor() + "]";
87  ret = false;
88  }
89  if ((getSystem() == "LED") && (getColor() != "BLUE") && (getColor() != "ORANGE")) {
90  m_Error += " Color not properly set [" + getColor() + "]";
91  ret = false;
92  }
93  return ret;
94 }
95 
97  LMFDat::setData(id, "MEAN", v);
98  return *this;
99 }
100 
102  LMFDat::setData(id, "RMS", v);
103  return *this;
104 }
105 
107  LMFDat::setData(id, "M3", v);
108  return *this;
109 }
110 
111 LMFPrimDat &LMFPrimDat::setPN(EcalLogicID &id, float mean, float rms, float m3) {
112  setMean(id, mean);
113  setRMS(id, rms);
114  setM3(id, m3);
115  return *this;
116 }
117 
119  LMFDat::setData(id, "APDAM3", v);
120  return *this;
121 }
122 
124  LMFDat::setData(id, "APDAMEAN", v);
125  return *this;
126 }
127 
129  LMFDat::setData(id, "APDARMS", v);
130  return *this;
131 }
132 
133 LMFPrimDat &LMFPrimDat::setAPDoverA(EcalLogicID &id, float mean, float rms, float m3) {
134  setAPDoverAMean(id, mean);
135  setAPDoverARMS(id, rms);
136  setAPDoverAM3(id, m3);
137  return *this;
138 }
139 
141  LMFDat::setData(id, "APDBM3", v);
142  return *this;
143 }
144 
146  LMFDat::setData(id, "APDBMEAN", v);
147  return *this;
148 }
149 
151  LMFDat::setData(id, "APDBRMS", v);
152  return *this;
153 }
154 
155 LMFPrimDat &LMFPrimDat::setAPDoverB(EcalLogicID &id, float mean, float rms, float m3) {
156  setAPDoverBMean(id, mean);
157  setAPDoverBRMS(id, rms);
158  setAPDoverBM3(id, m3);
159  return *this;
160 }
161 
163  LMFDat::setData(id, "APDPNM3", v);
164  return *this;
165 }
166 
168  LMFDat::setData(id, "APDPNMEAN", v);
169  return *this;
170 }
171 
173  LMFDat::setData(id, "APDPNRMS", v);
174  return *this;
175 }
176 
177 LMFPrimDat &LMFPrimDat::setAPDoverPn(EcalLogicID &id, float mean, float rms, float m3) {
178  setAPDoverPnMean(id, mean);
179  setAPDoverPnRMS(id, rms);
180  setAPDoverPnM3(id, m3);
181  return *this;
182 }
183 
185  LMFDat::setData(id, "FLAG", v);
186  return *this;
187 }
188 
190  LMFDat::setData(id, "ALPHA", v);
191  return *this;
192 }
193 
195  LMFDat::setData(id, "BETA", v);
196  return *this;
197 }
198 
200  LMFDat::setData(id, "SHAPECORR", v);
201  return *this;
202 }
203 
204 float LMFPrimDat::getMean(EcalLogicID &id) { return getData(id, "MEAN"); }
205 
206 float LMFPrimDat::getRMS(EcalLogicID &id) { return getData(id, "RMS"); }
207 
208 float LMFPrimDat::getM3(EcalLogicID &id) { return getData(id, "M3"); }
209 
210 float LMFPrimDat::getAPDoverAM3(EcalLogicID &id) { return getData(id, "APDAM3"); }
211 
212 float LMFPrimDat::getAPDoverAMean(EcalLogicID &id) { return getData(id, "APDAMEAN"); }
213 
214 float LMFPrimDat::getAPDoverARMS(EcalLogicID &id) { return getData(id, "APDARMS"); }
215 
216 float LMFPrimDat::getAPDoverBM3(EcalLogicID &id) { return getData(id, "APDBM3"); }
217 
218 float LMFPrimDat::getAPDoverPnMean(EcalLogicID &id) { return getData(id, "APDPNMEAN"); }
219 
220 float LMFPrimDat::getAPDoverPnRMS(EcalLogicID &id) { return getData(id, "APDPNRMS"); }
221 
222 float LMFPrimDat::getAPDoverPnM3(EcalLogicID &id) { return getData(id, "APDPNM3"); }
223 
224 float LMFPrimDat::getAPDoverBMean(EcalLogicID &id) { return getData(id, "APDBMEAN"); }
225 
226 float LMFPrimDat::getAPDoverBRMS(EcalLogicID &id) { return getData(id, "APDBRMS"); }
227 
228 float LMFPrimDat::getAlpha(EcalLogicID &id) { return getData(id, "ALPHA"); }
229 
230 float LMFPrimDat::getBeta(EcalLogicID &id) { return getData(id, "BETA"); }
231 
232 float LMFPrimDat::getShapeCorr(EcalLogicID &id) { return getData(id, "SHAPECORR"); }
233 
234 int LMFPrimDat::getFlag(EcalLogicID &id) { return getData(id, "FLAG"); }
235 
236 float LMFPrimDat::getMean(int id) { return getData(id, "MEAN"); }
237 
238 float LMFPrimDat::getRMS(int id) { return getData(id, "RMS"); }
239 
240 float LMFPrimDat::getM3(int id) { return getData(id, "M3"); }
241 
242 float LMFPrimDat::getAPDoverAM3(int id) { return getData(id, "APDAM3"); }
243 
244 float LMFPrimDat::getAPDoverAMean(int id) { return getData(id, "APDAMEAN"); }
245 
246 float LMFPrimDat::getAPDoverARMS(int id) { return getData(id, "APDARMS"); }
247 
248 float LMFPrimDat::getAPDoverBM3(int id) { return getData(id, "APDBM3"); }
249 
250 float LMFPrimDat::getAPDoverPnMean(int id) { return getData(id, "APDPNMEAN"); }
251 
252 float LMFPrimDat::getAPDoverPnRMS(int id) { return getData(id, "APDPNRMS"); }
253 
254 float LMFPrimDat::getAPDoverPnM3(int id) { return getData(id, "APDPNM3"); }
255 
256 float LMFPrimDat::getAPDoverBMean(int id) { return getData(id, "APDBMEAN"); }
257 
258 float LMFPrimDat::getAPDoverBRMS(int id) { return getData(id, "APDBRMS"); }
259 
260 float LMFPrimDat::getAlpha(int id) { return getData(id, "ALPHA"); }
261 
262 float LMFPrimDat::getBeta(int id) { return getData(id, "BETA"); }
263 
264 float LMFPrimDat::getShapeCorr(int id) { return getData(id, "SHAPECORR"); }
265 
266 int LMFPrimDat::getFlag(int id) { return getData(id, "FLAG"); }
LMFPrimDat & setBeta(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:194
std::string m_className
Definition: LMFUnique.h:99
LMFPrimDat & setAPDoverPnRMS(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:172
float getAPDoverPnM3(EcalLogicID &id)
Definition: LMFPrimDat.cc:222
bool isValid() override
Definition: LMFPrimDat.cc:79
float getAPDoverAM3(EcalLogicID &id)
Definition: LMFPrimDat.cc:210
LMFPrimDat & setAPDoverBMean(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:145
LMFPrimDat & setAPDoverBRMS(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:150
ret
prodAgent to be discontinued
LMFPrimDat & setAPDoverAMean(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:123
float getAlpha(EcalLogicID &id)
Definition: LMFPrimDat.cc:228
LMFPrimDat & setAPDoverARMS(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:128
virtual std::string getSystem() const
float getAPDoverBM3(EcalLogicID &id)
Definition: LMFPrimDat.cc:216
LMFPrimDat & setAPDoverPnM3(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:162
std::string getColor() const
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49
float getAPDoverPnRMS(EcalLogicID &id)
Definition: LMFPrimDat.cc:220
std::vector< std::string > m_type
Definition: LMFDat.h:140
LMFPrimDat & setAPDoverPn(EcalLogicID &id, float mean, float rms, float m3)
Definition: LMFPrimDat.cc:177
float getAPDoverPnMean(EcalLogicID &id)
Definition: LMFPrimDat.cc:218
LMFPrimDat & setAPDoverB(EcalLogicID &id, float mean, float rms, float m3)
Definition: LMFPrimDat.cc:155
LMFPrimDat & setAPDoverBM3(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:140
float getAPDoverBRMS(EcalLogicID &id)
Definition: LMFPrimDat.cc:226
LMFPrimDat & setRMS(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:101
float getAPDoverARMS(EcalLogicID &id)
Definition: LMFPrimDat.cc:214
float getBeta(EcalLogicID &id)
Definition: LMFPrimDat.cc:230
std::string m_Error
Definition: LMFDat.h:147
float getShapeCorr(EcalLogicID &id)
Definition: LMFPrimDat.cc:232
LMFPrimDat & setM3(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:106
LMFColoredTable & setColor(int color)
int getFlag(EcalLogicID &id)
Definition: LMFPrimDat.cc:234
LMFPrimDat & setAPDoverAM3(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:118
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559
float getRMS(EcalLogicID &id)
Definition: LMFPrimDat.cc:206
LMFPrimDat & setFlag(EcalLogicID &id, int v)
Definition: LMFPrimDat.cc:184
virtual LMFColoredTable & setSystem(int system)
LMFPrimDat & setAPDoverA(EcalLogicID &id, float mean, float rms, float m3)
Definition: LMFPrimDat.cc:133
float getMean(EcalLogicID &id)
Definition: LMFPrimDat.cc:204
float getM3(EcalLogicID &id)
Definition: LMFPrimDat.cc:208
LMFPrimDat & setAPDoverPnMean(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:167
std::map< std::string, unsigned int > m_keys
Definition: LMFDat.h:145
LMFPrimDat & setShapeCorr(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:199
float getAPDoverBMean(EcalLogicID &id)
Definition: LMFPrimDat.cc:224
LMFPrimDat & setPN(EcalLogicID &id, float mean, float rms, float m3)
Definition: LMFPrimDat.cc:111
LMFPrimDat & setMean(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:96
LMFPrimDat & setAlpha(EcalLogicID &id, float v)
Definition: LMFPrimDat.cc:189
void init()
Definition: LMFPrimDat.cc:52
float getAPDoverAMean(EcalLogicID &id)
Definition: LMFPrimDat.cc:212