CMS 3D CMS Logo

EcalSRCondTools.cc
Go to the documentation of this file.
1 //emacs settings:-*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 /*
3  *
4  * author: Ph Gras. June, 2010
5  */
6 
8 
14 
18 
19 #include <string>
20 #include <fstream>
21 #include <iostream>
22 #include <algorithm>
23 
24 constexpr int tccNum[12][12] = {
25  /* EE- */
26  {36, 19, 20, 21, 22, 23, 18, 1, 2, 3, 4, 5}, //SRP 1
27  {24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11}, //SRP 2
28  {30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17}, //SRP 3
29  /* EB- */
30  {54, 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, -1}, //SRP 4
31  {42, 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, -1}, //SRP 5
32  {48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1, -1}, //SRP 6
33  /* EB+ */
34  {72, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1}, //SRP 7
35  {60, 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, -1}, //SRP 8
36  {66, 67, 68, 69, 70, 71, -1, -1, -1, -1, -1, -1}, //SRP 9
37  /* EE+ */
38  {90, 73, 74, 75, 76, 77, 108, 91, 92, 93, 94, 95}, //SRP 10
39  {78, 79, 80, 81, 82, 83, 96, 97, 98, 99, 100, 101}, //SRP 11
40  {84, 85, 86, 87, 88, 89, 102, 103, 104, 105, 106, 107} //SRP 12
41 };
42 
43 constexpr int dccNum[12][12] = {
44  {1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1}, //SRP 1
45  {4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1}, //SRP 2
46  {7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1}, //SRP 3
47  {10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1}, //SRP 4
48  {16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1}, //SRP 5
49  {22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1}, //SRP 6
50  {28, 29, 30, 31, 32, 33, -1, -1, -1, -1, -1, -1}, //SRP 7
51  {34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1}, //SRP 8
52  {40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1}, //SRP 9
53  {46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1}, //SRP 10
54  {49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1}, //SRP 11
55  {52, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1} //SRP 12
56 };
57 
58 using namespace std;
59 
61  : ps_(ps), hSrToken_(esConsumes<EcalSRSettings, EcalSRSettingsRcd>()), done_(false) {}
62 
64 
66  if (done_)
67  return;
69 
70  string mode = ps_.getParameter<string>("mode");
71 
72  bool iomode_write = true;
73  if (mode == "online_config" || mode == "combine_config") {
74  string fname = ps_.getParameter<string>("onlineSrpConfigFile");
75  ifstream f(fname.c_str());
76  if (!f.good()) {
77  throw cms::Exception("EcalSRCondTools") << "Failed to open file " << fname;
78  }
79  importSrpConfigFile(*sr, f, true);
80  }
81 
82  if (mode == "python_config" || mode == "combine_config") {
83  importParameterSet(*sr, ps_);
84  }
85 
86  if (mode == "read") {
87  iomode_write = false;
88  }
89 
90  if (!(mode == "python_config" || mode == "online_config" || mode == "combine_config" || (mode == "read"))) {
91  throw cms::Exception("Config") << "Invalid value," << mode << ", for parameter mode. "
92  << "Valid values: online_config, python_config, combine_config, read";
93  }
94 
95  if (iomode_write) {
96  sr->bxGlobalOffset_ = ps_.getParameter<int>("bxGlobalOffset");
97  sr->automaticSrpSelect_ = ps_.getParameter<int>("automaticSrpSelect");
98  sr->automaticMasks_ = ps_.getParameter<int>("automaticMasks");
99 
101  if (!db.isAvailable()) {
102  throw cms::Exception("CondDBAccess") << "Failed to connect to PoolDBOutputService\n";
103  }
104  //fillup DB
105  //create new infinite IOV
106  cond::Time_t firstSinceTime = db->beginOfTime();
107  db->writeOne(sr, firstSinceTime, "EcalSRSettingsRcd");
108  done_ = true;
109  } else { //read mode
111  if (!hSr.isValid()) {
112  cout << "EcalSRSettings record not found. Check the Cond DB Global tag.\n";
113  } else {
114  const EcalSRSettings* ssr = hSr.product();
115  cout << "ECAL Seletive readout settings:\n";
116  cout << *ssr << "\n" << endl;
117  }
118 
119  //trigger tower thresholds (from FENIX configuration):
121  es.get<EcalTPGPhysicsConstRcd>().get(hTp);
122  if (!hTp.isValid()) {
123  cout << "EcalTPGPhysicsConst record not found. Check the Cond DB Global tag.\n";
124  } else {
125  const EcalTPGPhysicsConst* tp = hTp.product();
126  const EcalTPGPhysicsConstMap& mymap = tp->getMap();
127  if (mymap.size() != 2) {
128  cout << "Error: TPG physics record is of unexpected size: " << mymap.size()
129  << " elements instead of two (one for EB, one for EE)\n";
130  } else {
131  EcalTPGPhysicsConstMap::const_iterator it = mymap.begin();
132  cout << "----------------------------------------------------------------------\n"
133  "Trigger tower Et thresholds extracted from TPG configuration \n"
134  "(EcalSRCondTools modules supports only read mode for these parameters):\n\n";
135  cout << "EB: "
136  << "LT = " << it->second.ttf_threshold_Low << " GeV "
137  << "HT = " << it->second.ttf_threshold_High << " GeV\n";
138  ++it;
139  cout << "EE: "
140  << "LT = " << it->second.ttf_threshold_Low << " GeV "
141  << "HT = " << it->second.ttf_threshold_High << " GeV\n";
142  }
143  }
144  }
145  delete sr;
146 }
147 
149  sr.deltaPhi_.resize(1);
150  sr.deltaPhi_[0] = ps.getParameter<int>("deltaPhi");
151  sr.deltaEta_.resize(1);
152  sr.deltaEta_[0] = ps.getParameter<int>("deltaEta");
153  sr.ecalDccZs1stSample_.resize(1);
154  sr.ecalDccZs1stSample_[0] = ps.getParameter<int>("ecalDccZs1stSample");
155  sr.ebDccAdcToGeV_ = ps.getParameter<double>("ebDccAdcToGeV");
156  sr.eeDccAdcToGeV_ = ps.getParameter<double>("eeDccAdcToGeV");
157  sr.dccNormalizedWeights_.resize(1);
158  const std::vector<double>& w = ps.getParameter<std::vector<double> >("dccNormalizedWeights");
159  sr.dccNormalizedWeights_[0].resize(w.size());
160  std::copy(w.begin(), w.end(), sr.dccNormalizedWeights_[0].begin());
161  sr.symetricZS_.resize(1);
162  sr.symetricZS_[0] = ps.getParameter<bool>("symetricZS");
163  sr.srpLowInterestChannelZS_.resize(2);
164  const int eb = 0;
165  const int ee = 1;
166  sr.srpLowInterestChannelZS_[eb] = ps.getParameter<double>("srpBarrelLowInterestChannelZS");
167  sr.srpLowInterestChannelZS_[ee] = ps.getParameter<double>("srpEndcapLowInterestChannelZS");
168  sr.srpHighInterestChannelZS_.resize(2);
169  sr.srpHighInterestChannelZS_[eb] = ps.getParameter<double>("srpBarrelHighInterestChannelZS");
170  sr.srpHighInterestChannelZS_[ee] = ps.getParameter<double>("srpEndcapHighInterestChannelZS");
171  //sr.trigPrimBypass_.resize(1);
172  //sr.trigPrimBypass_[0] = ps.getParameter<bool >("trigPrimBypass");
173  //sr.trigPrimBypassMode_.resize(1);
174  //sr.trigPrimBypassMode_[0] = ps.getParameter<int >("trigPrimBypassMode");
175  //sr.trigPrimBypassLTH_.resize(1);
176  //sr.trigPrimBypassLTH_[0] = ps.getParameter<double >("trigPrimBypassLTH");
177  //sr.trigPrimBypassHTH_.resize(1);
178  //sr.trigPrimBypassHTH_[0] = ps.getParameter<double >("trigPrimBypassHTH");
179  //sr.trigPrimBypassWithPeakFinder_.resize(1);
180  //sr.trigPrimBypassWithPeakFinder_[0] = ps.getParameter<bool >("trigPrimBypassWithPeakFinder");
181  //sr.defaultTtf_.resize(1);
182  //sr.defaultTtf_[0] = ps.getParameter<int >("defaultTtf");
183  sr.actions_ = ps.getParameter<std::vector<int> >("actions");
184 }
185 
186 void EcalSRCondTools::importSrpConfigFile(EcalSRSettings& sr, std::istream& f, bool d) {
187  //initialize vectors:
188  sr.deltaEta_ = vector<int>(1, 0);
189  sr.deltaPhi_ = vector<int>(1, 0);
190  sr.actions_ = vector<int>(4, 0);
191  sr.tccMasksFromConfig_ = vector<short>(EcalSRSettings::nTccs_, 0);
192  sr.srpMasksFromConfig_ = vector<vector<short> >(EcalSRSettings::nSrps_, vector<short>(8, 0));
193  sr.dccMasks_ = vector<short>(EcalSRSettings::nDccs_);
194  sr.srfMasks_ = vector<short>(EcalSRSettings::nDccs_);
195  sr.substitutionSrfs_ = vector<vector<short> >(EcalSRSettings::nSrps_, vector<short>(68, 0));
196  sr.testerTccEmuSrpIds_ = vector<int>(EcalSRSettings::nSrps_, 0);
197  sr.testerSrpEmuSrpIds_ = vector<int>(EcalSRSettings::nSrps_, 0);
198  sr.testerDccTestSrpIds_ = vector<int>(EcalSRSettings::nSrps_, 0);
199  sr.testerSrpTestSrpIds_ = vector<int>(EcalSRSettings::nSrps_, 0);
200  sr.bxOffsets_ = vector<short>(EcalSRSettings::nSrps_, 0);
201  sr.automaticMasks_ = 0;
202  sr.automaticSrpSelect_ = 0;
203 
204  //string line;
205  int iLine = 0;
206  int iValueSet = -1;
207  const int nValueSets = 6 * EcalSRSettings::nSrps_ + 9;
208  string line;
209  stringstream sErr("");
210  while (!f.eof() && sErr.str().empty()) {
211  getline(f, line);
212  ++iLine;
213  line = trim(line);
214  if (line[0] == '#' || line.empty()) { //comment line and empty line to ignore
215  continue;
216  } else {
217  ++iValueSet;
218  }
219  if (iValueSet >= nValueSets)
220  break;
221  uint32_t value;
222  string sValue;
223  int pos = 0;
224  int iCh = 0;
225  int nChs[nValueSets] = {
226  //TCC masks: 0-11
227  12,
228  12,
229  12,
230  12,
231  12,
232  12,
233  12,
234  12,
235  12,
236  12,
237  12,
238  12,
239  //SRP masks: 12-23
240  8,
241  8,
242  8,
243  8,
244  8,
245  8,
246  8,
247  8,
248  8,
249  8,
250  8,
251  8,
252  //DCC masks: 24-35
253  12,
254  12,
255  12,
256  12,
257  12,
258  12,
259  12,
260  12,
261  12,
262  12,
263  12,
264  12,
265  //SRF Masks: 36-47
266  6,
267  6,
268  6,
269  6,
270  6,
271  6,
272  6,
273  6,
274  6,
275  6,
276  6,
277  6,
278  //substitution SRFs: 48-59
279  68,
280  68,
281  68,
282  68,
283  68,
284  68,
285  68,
286  68,
287  68,
288  68,
289  68,
290  68,
291  //Tester card to emulate or test: 60-71
292  4,
293  4,
294  4,
295  4,
296  4,
297  4,
298  4,
299  4,
300  4,
301  4,
302  4,
303  4,
304  //Bx offsets: 72
305  12,
306  //algo type: 73
307  1,
308  //action flags: 74
309  4,
310  //pattern file directory: 75
311  1,
312  //VME slots: 76
313  12,
314  //card types: 77
315  12,
316  //config Mode
317  1,
318  //VME Interface card
319  1,
320  //Spy Mode
321  12,
322  };
323 
324  while (((sValue = tokenize(line, " \t", pos)) != string("")) && (iCh < nChs[iValueSet]) && sErr.str().empty()) {
325  value = strtoul(sValue.c_str(), nullptr, 0);
326  const int iSrp = iValueSet % EcalSRSettings::nSrps_;
327  if (iValueSet < 12) { //TCC
328  assert((unsigned)iSrp < sizeof(tccNum) / sizeof(tccNum[0]));
329  assert((unsigned)iCh < sizeof(tccNum[0]) / sizeof(tccNum[0][0]));
330  int tcc = tccNum[iSrp][iCh];
331  if (tcc >= 0) {
332  if (d)
333  cout << "tccMasksFromConfig_[" << tcc << "] <- " << value << "\n";
334  sr.tccMasksFromConfig_[tcc - 1] = value;
335  }
336  } else if (iValueSet < 24) { //SRP-SRP
337  if (d)
338  cout << "srpMasks_[" << iSrp << "][" << iCh << "] <- " << value << "\n";
339  sr.srpMasksFromConfig_[iSrp][iCh] = value;
340  } else if (iValueSet < 36) { //DCC output
341  assert((unsigned)iSrp < sizeof(dccNum) / sizeof(dccNum[0]));
342  assert((unsigned)iCh < sizeof(dccNum[0]) / sizeof(dccNum[0][0]));
343  int dcc = dccNum[iSrp][iCh];
344  if (dcc > 0) {
345  assert((unsigned)(dcc - 1) < sr.dccMasks_.size());
346  if (d)
347  cout << "dccMasks_[" << (dcc - 1) << "] <- " << value << "\n";
348  sr.dccMasks_[dcc - 1] = value;
349  }
350  } else if (iValueSet < 48) { //SRF masks
351  assert((unsigned)iSrp < sizeof(dccNum) / sizeof(dccNum[0]));
352  assert((unsigned)iCh < sizeof(dccNum[0]) / sizeof(dccNum[0][0]));
353  int dcc = dccNum[iSrp][iCh];
354  if (dcc > 0) {
355  if (d)
356  cout << "srfMasks_[" << (dcc - 1) << "] <- " << value << "\n";
357  assert((unsigned)(dcc - 1) < sr.srfMasks_.size());
358  sr.srfMasks_[dcc - 1] = value;
359  }
360  } else if (iValueSet < 60) { //substiution SRFs
361  assert((unsigned)iSrp < sr.substitutionSrfs_.size());
362  assert((unsigned)iCh < sr.substitutionSrfs_[0].size());
363  if (d)
364  cout << "substitutionMasks_[" << iSrp << "][" << iCh << "] <- " << value << "\n";
365  sr.substitutionSrfs_[iSrp][iCh] = value;
366  } else if (iValueSet < 72) { //Tester card config
367  switch (iCh) {
368  case 0:
369  assert((unsigned)iSrp < sr.testerTccEmuSrpIds_.size());
370  if (d)
371  cout << "testerTccEmuSrpIds_[" << iSrp << "] <- " << value << "\n";
372  sr.testerTccEmuSrpIds_[iSrp] = value;
373  break;
374  case 1:
375  assert((unsigned)iSrp < sr.testerSrpEmuSrpIds_.size());
376  if (d)
377  cout << "testerSrpEmuSrpIds_[" << iSrp << "] <- " << value << "\n";
378  sr.testerSrpEmuSrpIds_[iSrp] = value;
379  break;
380  case 2:
381  assert((unsigned)iSrp < sr.testerDccTestSrpIds_.size());
382  if (d)
383  cout << "testerDccTestSrpIds_[" << iSrp << "] <- " << value << "\n";
384  sr.testerDccTestSrpIds_[iSrp] = value;
385  break;
386  case 3:
387  assert((unsigned)iSrp < sr.testerSrpTestSrpIds_.size());
388  if (d)
389  cout << "testerSrpTestSrpIds_[" << iSrp << "] <- " << value << "\n";
390  sr.testerSrpTestSrpIds_[iSrp] = value;
391  break;
392  default:
393  sErr << "Syntax error in SRP system configuration "
394  << " line " << iLine << ".";
395  }
396  } else if (iValueSet < 73) { //bx offsets
397  assert((unsigned)iCh < sr.bxOffsets_.size());
398  if (d)
399  cout << "bxOffset_[" << iCh << "] <- " << value << "\n";
400  sr.bxOffsets_[iCh] = value;
401  } else if (iValueSet < 74) { //algo type
402  int algo = value;
403  switch (algo) {
404  case 0:
405  sr.deltaEta_[0] = sr.deltaPhi_[0] = 1;
406  break;
407  case 1:
408  sr.deltaEta_[0] = sr.deltaPhi_[0] = 2;
409  break;
410  default:
411  throw cms::Exception("OutOfRange")
412  << "Value of parameter algo ," << algo << ", is invalid. Valid values are 0 and 1.";
413  }
414  if (d)
415  cout << "deltaEta_[0] <- " << sr.deltaEta_[0] << "\t"
416  << "deltaPhi_[0] <- " << sr.deltaPhi_[0] << "\n";
417  } else if (iValueSet < 75) { //action flags
418  assert((unsigned)iCh < sr.actions_.size());
419  if (d)
420  cout << "actions_[" << iCh << "] <- " << value << "\n";
421  sr.actions_[iCh] = value;
422  } else if (iValueSet < 76) { //pattern file directory
423  // emuDir_ = sValue;
424  // if(d) cout << "emuDir_ <= "
425  // << value << "\n";
426  } else if (iValueSet < 77) { //VME slots
427  // slotIds_[iCh] = value;
428  // if(d) cout << "slotIds_[" << iCh << "] <= "
429  // << value << "\n";
430  } else if (iValueSet < 78) { //card types
431  // cardTypes_[iCh] = sValue[0];
432  // if(d) cout << "cardTypes_[" << iCh << "] <= "
433  // << value << "\n";
434  } else if (iValueSet < 79) { //config mode
435  //TODO validity check on value
436  // configMode_ = (ConfigMode)value;
437  // if(d) cout << "config mode <= " << value << "\n";
438  } else if (iValueSet < 80) { //VME I/F
439  //TODO validity check on value
440  // vmeInterface_ = (Vme::type_t)value;
441  //if(d) cout << "Vme Interface code <= " << value << "\n";
442  } else if (iValueSet < 81) { //Spy Mode
443  //TODO validity check on value
444  // spyMode_[iCh] = value & 0x3;
445  // if(d) cout << "Spy mode <= " << value << "\n";
446  } else { //should never be reached!
447  assert(false);
448  }
449  ++iCh;
450  }
451  if (iCh != nChs[iValueSet]) { //error
452  sErr << "Syntax error in imported SRP system configuration file "
453  /*<< filename <<*/ " line "
454  << iLine << ".";
455  }
456  }
457  if (sErr.str().empty() && iValueSet != (nValueSets - 1)) { //error
458  sErr << "Syntax Error in imported SRP system configuration file "
459  /*<< filename <<*/ " line "
460  << iLine << ".";
461  }
462  if (!sErr.str().empty())
463  throw cms::Exception("SyntaxError") << sErr.str();
464 }
465 
466 double EcalSRCondTools::normalizeWeights(int hwWeight) {
467  //Fix sign bit in case only the 12 least significant bits of hwWeight were set
468  //(hardware reprensentation uses only 12 bits)
469  if (hwWeight & (1 << 11))
470  hwWeight |= ~0xEFF;
471  return hwWeight / 1024.;
472 }
473 
474 string EcalSRCondTools::tokenize(const string& s, const string& delim, int& pos) {
475  if (pos < 0)
476  return "";
477  int pos0 = pos;
478  int len = s.size();
479  //eats delimeters at beginning of the string
480  while (pos0 < len && find(delim.begin(), delim.end(), s[pos0]) != delim.end()) {
481  ++pos0;
482  }
483  if (pos0 == len)
484  return "";
485  pos = s.find_first_of(delim, pos0);
486  return s.substr(pos0, (pos > 0 ? pos : len) - pos0);
487 }
488 
490  std::string::size_type pos0 = s.find_first_not_of(" \t");
491  if (pos0 == string::npos) {
492  pos0 = 0;
493  }
494  string::size_type pos1 = s.find_last_not_of(" \t") + 1;
495  if (pos1 == string::npos) {
496  pos1 = pos0;
497  }
498  return s.substr(pos0, pos1 - pos0);
499 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalSRCondTools::importParameterSet
static void importParameterSet(EcalSRSettings &sr, const edm::ParameterSet &ps)
Definition: EcalSRCondTools.cc:148
EcalSRSettings::srpLowInterestChannelZS_
std::vector< float > srpLowInterestChannelZS_
Definition: EcalSRSettings.h:121
EcalSRSettings::substitutionSrfs_
std::vector< std::vector< short > > substitutionSrfs_
Definition: EcalSRSettings.h:189
EcalSRCondTools::done_
bool done_
Definition: EcalSRCondTools.h:74
funct::false
false
Definition: Factorize.h:29
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
ESHandle.h
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
cms::cuda::assert
assert(be >=bs)
EcalSRSettings::srpMasksFromConfig_
std::vector< std::vector< short > > srpMasksFromConfig_
Definition: EcalSRSettings.h:177
EcalSRSettings::nTccs_
static const int nTccs_
Definition: EcalSRSettings.h:49
EcalSRSettings::actions_
std::vector< int > actions_
Definition: EcalSRSettings.h:168
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
EcalSRSettings.h
dqmiodatasetharvest.db
db
Definition: dqmiodatasetharvest.py:119
cmsdt::algo
algo
Definition: constants.h:164
EcalSRSettings::deltaEta_
std::vector< int > deltaEta_
Definition: EcalSRSettings.h:58
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PoolDBOutputService.h
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
Service.h
w
const double w
Definition: UKUtility.cc:23
nChs
const int nChs
Definition: recycleTccEmu.cc:11
EcalSRCondTools::ps_
edm::ParameterSet ps_
Definition: EcalSRCondTools.h:71
edm::ESHandle
Definition: DTSurvey.h:22
EcalSRCondTools::EcalSRCondTools
EcalSRCondTools(const edm::ParameterSet &)
Definition: EcalSRCondTools.cc:60
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
EcalSRSettings::symetricZS_
std::vector< int > symetricZS_
Definition: EcalSRSettings.h:111
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSRSettings::testerSrpTestSrpIds_
std::vector< int > testerSrpTestSrpIds_
Definition: EcalSRSettings.h:197
EcalSRSettings::srfMasks_
std::vector< short > srfMasks_
Definition: EcalSRSettings.h:185
tccNum
constexpr int tccNum[12][12]
Definition: EcalSRCondTools.cc:24
EcalSRCondTools::normalizeWeights
static double normalizeWeights(int hwWeight)
Definition: EcalSRCondTools.cc:466
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
EcalSRCondTools::~EcalSRCondTools
~EcalSRCondTools() override
Definition: EcalSRCondTools.cc:63
EcalSRSettings::testerDccTestSrpIds_
std::vector< int > testerDccTestSrpIds_
Definition: EcalSRSettings.h:196
EcalSRCondTools.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
EcalSRSettingsRcd
Definition: EcalSRSettingsRcd.h:5
edm::Service< cond::service::PoolDBOutputService >
EcalSRSettings::dccMasks_
std::vector< short > dccMasks_
Definition: EcalSRSettings.h:181
EcalSRCondTools::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &es) override
Definition: EcalSRCondTools.cc:65
EcalSRCondTools::importSrpConfigFile
static void importSrpConfigFile(EcalSRSettings &sr, std::istream &f, bool debug=false)
Definition: EcalSRCondTools.cc:186
value
Definition: value.py:1
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
EcalSRSettings::bxGlobalOffset_
short bxGlobalOffset_
Definition: EcalSRSettings.h:208
dccNum
constexpr int dccNum[12][12]
Definition: EcalSRCondTools.cc:43
EcalSRSettings::deltaPhi_
std::vector< int > deltaPhi_
Definition: EcalSRSettings.h:71
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
EcalSRSettings::ebDccAdcToGeV_
float ebDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EB.
Definition: EcalSRSettings.h:83
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
EcalSRSettings::testerSrpEmuSrpIds_
std::vector< int > testerSrpEmuSrpIds_
Definition: EcalSRSettings.h:195
EcalSRCondTools::trim
static std::string trim(std::string s)
Definition: EcalSRCondTools.cc:489
EcalSRSettings::nSrps_
static const int nSrps_
Definition: EcalSRSettings.h:47
EcalSRCondTools::hSrToken_
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcd > hSrToken_
Definition: EcalSRCondTools.h:72
EcalSRSettings::bxOffsets_
std::vector< short > bxOffsets_
Definition: EcalSRSettings.h:203
EcalTPGPhysicsConst
Definition: EcalTPGPhysicsConst.h:9
alignmentValidation.fname
string fname
main script
Definition: alignmentValidation.py:959
EcalTPGPhysicsConstMap
std::map< uint32_t, EcalTPGPhysicsConst::Item > EcalTPGPhysicsConstMap
Definition: EcalTPGPhysicsConst.h:36
EcalSRSettings
Definition: EcalSRSettings.h:29
EcalSRSettings::dccNormalizedWeights_
std::vector< std::vector< float > > dccNormalizedWeights_
Definition: EcalSRSettings.h:99
std
Definition: JetResolutionObject.h:76
EcalSRSettings::ecalDccZs1stSample_
std::vector< int > ecalDccZs1stSample_
Definition: EcalSRSettings.h:80
EcalSRSettings::eeDccAdcToGeV_
float eeDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EE.
Definition: EcalSRSettings.h:85
relativeConstraints.value
value
Definition: relativeConstraints.py:53
EcalSRSettings::testerTccEmuSrpIds_
std::vector< int > testerTccEmuSrpIds_
Definition: EcalSRSettings.h:194
Exception
Definition: hltDiff.cc:246
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalSRSettings::srpHighInterestChannelZS_
std::vector< float > srpHighInterestChannelZS_
Definition: EcalSRSettings.h:131
EcalTPGPhysicsConst.h
ztail.d
d
Definition: ztail.py:151
cms::Exception
Definition: Exception.h:70
EcalSRSettings::automaticMasks_
int automaticMasks_
Definition: EcalSRSettings.h:213
EcalSRSettings::automaticSrpSelect_
int automaticSrpSelect_
Definition: EcalSRSettings.h:218
event
Definition: event.py:1
EcalTPGPhysicsConstRcd.h
edm::Event
Definition: Event.h:73
mps_splice.line
line
Definition: mps_splice.py:76
EcalSRCondTools::tokenize
static std::string tokenize(const std::string &s, const std::string &delim, int &pos)
Definition: EcalSRCondTools.cc:474
EcalTPGPhysicsConstRcd
Definition: EcalTPGPhysicsConstRcd.h:5
EcalSRSettings::tccMasksFromConfig_
std::vector< short > tccMasksFromConfig_
Definition: EcalSRSettings.h:172
EcalSRSettings::nDccs_
static const int nDccs_
Definition: EcalSRSettings.h:48