CMS 3D CMS Logo

EcalLaserCondTools.cc
Go to the documentation of this file.
1 //emacs settings:-*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 /*
3  * $Id: EcalLaserCondTools.cc,v 1.2 2010/06/14 10:45:17 pgras Exp $
4  *
5  * author: Ph Gras. June, 2010
6  */
7 
9 
13 
17 
18 #include <string>
19 #include <fstream>
20 #include <algorithm>
21 
22 using namespace std;
23 
25  : fout_(nullptr),
26  eventList_(nullptr),
27  eventListFileName_(ps.getParameter<string>("eventListFile")),
28  verb_(ps.getParameter<int>("verbosity")),
29  mode_(ps.getParameter<string>("mode")),
30  fnames_(ps.getParameter<vector<string> >("laserCorrectionAsciiFiles")),
31  skipIov_(ps.getParameter<int>("skipIov")),
32  nIovs_(ps.getParameter<int>("nIovs")),
33  fromTime_(ps.getParameter<int>("fromTime")),
34  toTime_(ps.getParameter<int>("toTime")),
35  minP_(ps.getParameter<double>("transparencyMin")),
36  maxP_(ps.getParameter<double>("transparencyMax")) {
37  ferr_ = fopen("corr_errors.txt", "w");
38  fprintf(ferr_, "#t1\tdetid\tp1\tp2\tp3");
39 
40  if (!eventListFileName_.empty()) {
41  eventList_ = fopen(eventListFileName_.c_str(), "r");
42  if (eventList_ == nullptr)
43  throw cms::Exception("User") << "Failed to open file " << eventListFileName_ << "\n";
44  }
45 }
46 
48  if (ferr_)
49  fclose(ferr_);
50  if (fout_)
51  fclose(fout_);
52 }
53 
55  static bool done = false;
56 
57  if (mode_ == "ascii_file_to_db") {
58  if (done)
59  return;
60  if (verb_ > 2)
61  cout << "ascii_file_to_db mode" << endl;
62  if (!db_.isAvailable()) {
63  throw cms::Exception("CondDBAccess") << "Failed to connect to PoolDBOutputService\n";
64  }
65  FileReader corrReader(fnames_);
66  corrReader.setVerbosity(verb_);
67  fillDb(corrReader);
68  } else if (mode_ == "db_to_ascii_file") {
69  dbToAscii(es);
70  } else {
71  cms::Exception("InvalidParam") << "Value of parameter mode is not valid. Expecting ascii_file_to_db or read";
72  }
73 }
74 
76  int iIov = 0;
77  int processedIovs = 0;
78  if (verb_ > 2)
79  cout << "Starting filling DB...\n";
80  int t1 = 0;
81  int t3 = 0;
82  int t2[nLmes];
83 
84  int prevT1 = 0;
85  int prevT3 = 0;
86  int prevT = 0;
87  int t = 0;
88  if (eventList_) {
89  int iline = 0;
90  while (!feof(eventList_)) {
91  //skips comment lines:
92  char c;
93  while (fscanf(eventList_, " %1[#]%*[^\n]\n", &c) == 1)
94  ++iline;
95 
96  int n = fscanf(eventList_, "%*d %*d %*d %d%*[^\n]\n", &t);
97  if (verb_ > 1)
98  cout << "Event time: t = " << t << ", " << timeToString(t) << "\n";
99  ++iline;
100  if (n != 1)
101  throw cms::Exception("User") << "Syntax error in event list file " << eventListFileName_ << " at line " << iline
102  << " " << n << " "
103  << ".\n";
104  if (t < prevT)
105  throw cms::Exception("User") << "Events in the event list file " << eventListFileName_
106  << " are not ordered in increased time as required! See line " << iline << "\n";
107  if (t == 0)
108  throw cms::Exception("User") << "Found an unexpected t = 0 time value "
109  "in the event list file"
110  << eventListFileName_ << " at line " << iline << "!\n";
111  //Look for IOV:
112  bool iovFound = true;
113  if (t <= t3) { //IOV already inserted for previous event.
114  if (verb_ > 1)
115  cout << "Event in same IOV than previous one.\n";
116  continue;
117  }
118 
119  while ((iovFound = r.readTime(t1, t2, t3)) && t3 < t) /*NOP*/
120  ;
121 
122  if (iovFound) {
123  if (t1 < prevT1 && t3 < prevT3)
124  throw cms::Exception("User")
125  << "IOVs in the correction ascii file are not ordered in increased time as required!\n";
126  else if (t1 < prevT1 || t3 < prevT3)
127  throw cms::Exception("User") << "Found interleaved IOVs in the correction ascii file!\n";
128  processIov(r, t1, t2, t3);
129  } else {
130  cout << "Warning: event beyond last IOV t3. Event time: " << timeToString(t)
131  << ". Last IOV t3: " << timeToString(t3) << "\n";
132  }
133  }
134  } else
135  while (r.readTime(t1, t2, t3)) {
136  ++iIov;
137  if (iIov <= skipIov_) {
138  std::cout << "Skipping IOV " << iIov << "\n";
139  continue;
140  } else if (processedIovs >= nIovs_) {
141  std::cout << "Requested number of IOVs, " << nIovs_ << ", processed.\n";
142  return;
143  } else {
144  processIov(r, t1, t2, t3);
145  ++processedIovs;
146  }
147  }
148 }
149 
151  static int iIov = 0;
152  ++iIov;
153 
154  // FILE* fdebug = 0;
155  // if(i==) fdebug = fopen("debug.txt", "w");
156 
157  // if(iIov <= skipIov_) { std::cout << "Skipping IOV " << iIov << "\n"; return; }
158 
159  cond::Time_t iovStart = 0;
160 
161  if (verb_ > 1) {
162  cout << "t1:" << t1 << "(" << timeToString(t1) << ") \n"
163  << "t3: " << t3 << "(" << timeToString(t3) << ")\nt2-t1: ";
164  for (int i = 0; i < EcalLaserCondTools::nLmes; ++i)
165  cout << t2[i] - t1 << "\t";
166  cout << "\n";
167  }
168  if (t1 < fromTime_) {
169  std::cout << "Skipping IOV " << iIov << ", "
170  << ", which is before 'fromTime'," << timeToString(fromTime_) << "(" << fromTime_ << ").\n";
171  return;
172  }
173 
174  // if(toTime_!=-1 && t2 < toTime_) { std::cout << "Skipping IOV " << iIov << ", " << ", which is beyond 'toTime',"
175  // << timeToString(toTime_) << "(" << toTime_ << ").\n"; return; }
176 
177  if (t1 == 0) {
178  std::cout << "Skipping IOV with t1 = 0"
179  << "\n";
180  return;
181  }
182 
184 
186  iovStart = uint64_t(t1) << 32;
187  for (size_t i = 0; i < EcalLaserCondTools::nLmes; ++i) {
188  t.t1 = edm::Timestamp(uint64_t(t1) << 32);
189  t.t2 = edm::Timestamp(uint64_t(t2[i]) << 32);
190  t.t3 = edm::Timestamp(uint64_t(t3) << 32);
191  corrSet->setTime(i, t);
192  }
193 
194  constexpr int ncrystals = 75848;
195  std::set<int> detidList;
196  for (int i = 0; i < ncrystals; ++i) {
197  DetId detid;
198  //EcalLaserAPDPNRatios::EcalLaserAPDPNpair corr = {0, 0, 0};
200  if (verb_ > 2)
201  cout << "Reading " << toNth(i + 1) << " crystal\n";
202  if (!r.readPs(detid, corr)) {
203  throw cms::Exception("LasCor") << "Failed to read " << toNth(i + 1) << " crystal correction.\n";
204  }
205 
206  pair<std::set<int>::iterator, bool> res = detidList.insert(int(detid));
207 
208  if (!res.second) { //detid already processed
209  std::cout << "Duplicate det id, for IOV " << iIov << " t1 = " << t1 << " detid = " << int(detid) << endl;
210  }
211 
212  if (!isfinite(corr.p1) || !isfinite(corr.p2) || !isfinite(corr.p3) || corr.p1 < minP_ || corr.p1 > maxP_ ||
213  corr.p2 < minP_ || corr.p2 > maxP_ || corr.p3 < minP_ || corr.p3 > maxP_) {
214  fprintf(ferr_, "%d %d %f %f %f\n", t1, (int)detid, corr.p1, corr.p2, corr.p3);
215  corr.p1 = corr.p2 = corr.p3 = 1;
216  }
217 
218  if (verb_ > 2) {
219  if (detid.subdetId() == EcalBarrel) {
220  cout << EBDetId(detid);
221  } else if (detid.subdetId() == EcalEndcap) {
222  cout << EEDetId(detid);
223  } else {
224  cout << (int)detid;
225  }
226  cout << ": "
227  << "p1 = " << corr.p1 << "\t"
228  << "p2 = " << corr.p2 << "\t"
229  << "p3 = " << corr.p3 << "\n";
230  }
231 
232  corrSet->setValue((int)detid, corr);
233  }
234 
235  try {
236  //Write correction set in DB (one IOV):
237  if (db_->isNewTagRequest("EcalLaserAPDPNRatiosRcd")) {
238  if (verb_)
239  cout << "First IOV, extending starting time." << endl;
240  iovStart = db_->beginOfTime();
241  }
242  timeval t;
243  gettimeofday(&t, nullptr);
244  if (verb_ > 1)
245  cout << "[" << timeToString(t.tv_sec) << "] "
246  << "Write IOV " << iIov << " starting from " << timeToString(iovStart >> 32) << "... ";
247  db_->writeOne(corrSet, iovStart, "EcalLaserAPDPNRatiosRcd");
248  } catch (const cms::Exception& e) {
249  std::cout << "Failed.\nException cathed while writting to cond DB" << e.what() << "\n";
250  }
251  std::cout << "Suceeded.\n";
252 }
253 
255  for (;;) {
256  ++ifile_;
257  if (ifile_ >= fnames_.size()) {
258  if (verb_ > 1)
259  cout << "No more correction files.\n";
260  return false;
261  }
262  if (verb_ > 1)
263  cout << "Opening file " << fnames_[ifile_] << "\n";
264  f_ = fopen(fnames_[ifile_].c_str(), "r");
265  iline_ = 0;
266  if (f_ == nullptr) {
267  std::cerr << "Failed to open file " << fnames_[ifile_] << ". File skipped!\n";
268  } else {
269  return true;
270  }
271  }
272 }
273 
275  trim();
276  if ((f_ == nullptr || feof(f_)) && !nextFile()) {
277  if (verb_ > 1)
278  cout << "No more record\n";
279  return false;
280  }
281  int i;
282  char* buf = nullptr;
283  size_t s = 0;
284  while ((i = fgetc(f_)) != 'T' && i != 'L' && i >= 0)
285  getline(&buf, &s, f_);
286  if (buf)
287  free(buf);
288  buf = nullptr;
289 
290  if (i == 'L') { //last record put 3 consecutive times starting from end of prev. IOV
291  t1 = t3;
292  for (int i = 0; i < EcalLaserCondTools::nLmes; ++i)
293  t2[i] = t1 + 1;
294  t3 = t1 + 2;
295  return true;
296  }
297 
298  if (i != 'T') {
299  if (verb_ > 1)
300  cout << "No more record or bad line type/marker (getc returned " << i << ")\n";
301  return false;
302  }
303 
305  int n = fscanf(f_, "%d %d", &t1, &t3);
306  for (int i = 0; i < EcalLaserCondTools::nLmes; ++i) {
307  int nn = fscanf(f_, "%d", &t2[i]);
308  if (nn != 1)
309  break;
310  n += nn;
311  }
312 
313  int nnn = fscanf(f_, " ");
314 
315  if (n != (2 + EcalLaserCondTools::nLmes) || nnn != 0)
316  throw cms::Exception("LasCorFile") << "File " << fnames_[ifile_] << " line " << iline_
317  << ": syntax error. Expecting 'T' marker followed by 94 values: "
318  << "t1 t2 t3(lme 1) t3(lme 2) ... t3(lme " << EcalLaserCondTools::nLmes << ")\n";
319 
320  return true;
321 }
322 
324  if (f_ == nullptr) {
325  if (verb_)
326  cout << "Requested to read p1..p3 parameter line while no file is closed.\n";
327  return false;
328  }
329 
330  trim();
331  int i = fgetc(f_);
332 
333  if (i != 'P') {
334  if (verb_ && i >= 0)
335  cout << "File " << fnames_[ifile_] << " line " << iline_ << ": unexpected line type, '" << (char)i
336  << "' while expecting 'P'\n";
337  if (verb_ && i < 0)
338  cout << "Failed to read p1..p3 parameter line\n";
339  return false;
340  }
341 
342  int rawdetid;
343  int n = fscanf(f_, "%d %f %f %f\n", &rawdetid, &corr.p1, &corr.p2, &corr.p3);
344  ++iline_;
345 
346  if (n != 4) {
347  // corr.p2=corr.p1;
348  // corr.p3=corr.p1;
349  throw cms::Exception("I/O") << "Syntax error at line " << iline_ << "of file " << fnames_[ifile_] << " read " << n
350  << " values,"
351  << " raw id" << rawdetid << ": " << corr.p1 << ", " << corr.p2;
352  }
353  detid = rawdetid;
354  constexpr int ECALID = 3;
355  if (detid.det() != ECALID)
356  throw cms::Exception("InvalidValue") << "Line " << iline_ << "of file " << fnames_[ifile_]
357  << " contains an invalid det ID (detector code is not ECAL!)\n";
358  if (detid.subdetId() == EcalBarrel) {
359  EBDetId ebDetId(detid);
360  if (!EBDetId::validDetId(ebDetId.ietaAbs(), ebDetId.iphi()))
361  throw cms::Exception("InvalidValue") << "Line " << iline_ << "of file " << fnames_[ifile_]
362  << " contains an invalid det ID (detector code is not ECAL!)\n";
363  }
364  if (detid.subdetId() == EcalEndcap) {
365  EEDetId eeDetId(detid);
366  if (!EEDetId::validDetId(eeDetId.ix(), eeDetId.iy(), eeDetId.zside()))
367  throw cms::Exception("InvalidValue") << "Line " << iline_ << "of file " << fnames_[ifile_]
368  << " contains an invalid det ID (detector code is not ECAL!)\n";
369  }
370  ++iline_;
371  return true;
372 }
373 
375  if (f_ == nullptr)
376  return;
377  bool skipLine = false;
378  int c;
379  while ((c = fgetc(f_)) >= 0 && (c == ' ' || c == '\t' || c == '\n' || c == '#' || skipLine)) {
380  if (c == '#')
381  skipLine = true;
382  if (c == '\n') {
383  ++iline_;
384  skipLine = false;
385  }
386  }
387  ungetc(c, f_);
388 }
389 
391  stringstream s;
392  s << n;
393  if (n % 100 < 10 || n % 100 > 20) {
394  switch (n % 10) {
395  case 1:
396  s << "st";
397  break;
398  case 2:
399  s << "nd";
400  break;
401  case 3:
402  s << "rd";
403  break;
404  default:
405  s << "th";
406  }
407  } else {
408  s << "th";
409  }
410  return s.str();
411 }
412 
414  char buf[256];
415  struct tm lt;
416  localtime_r(&t, &lt);
417  strftime(buf, sizeof(buf), "%F %R:%S", &lt);
418  buf[sizeof(buf) - 1] = 0;
419  return string(buf);
420 }
421 
424  es.get<EcalLaserAPDPNRatiosRcd>().get(hCorr);
425 
426  const EcalLaserAPDPNRatios* corr = hCorr.product();
427 
428  const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap& p = corr->getLaserMap();
429  const EcalLaserAPDPNRatios::EcalLaserTimeStampMap& t = corr->getTimeMap();
430 
431  if (t.size() != EcalLaserCondTools::nLmes)
432  throw cms::Exception("LasCor") << "Unexpected number time parameter triplets\n";
433 
434  if (fout_ == nullptr) {
435  fout_ = fopen("corr_dump.txt", "w");
436  if (fout_ == nullptr)
437  throw cms::Exception("LasCor") << "Failed to create file corr_dump.txt\n";
438  }
439 
440  unsigned t1 = t[0].t1.unixTime();
441  unsigned t3 = t[0].t3.unixTime();
442  fprintf(fout_, "T %d\t%d", t1, t3);
443 
444  if (verb_)
445  cout << "Processing IOV " << t1 << " - " << t3 << "(" << timeToString(t1) << " - " << timeToString(t3) << "\n";
446 
447  for (unsigned i = 0; i < t.size(); ++i) {
448  if (t[i].t1.unixTime() != t1 || t[i].t3.unixTime() != t3) {
449  throw cms::Exception("LasCor") << "Inconsitency in t1, t3: "
450  << "t1(lme 1) =" << t1 << ", t1(lme " << (i + 1) << ") = " << t[i].t1.unixTime()
451  << ", t3(lme 1) =" << t3 << ", t3(lme " << (i + 1) << ") = " << t[i].t3.unixTime()
452  << "\n";
453  }
454  fprintf(fout_, "\t%d", t[i].t2.unixTime());
455  }
456  fputc('\n', fout_);
457  fflush(fout_);
458 
459  for (int ieta = -EBDetId::MAX_IETA; ieta <= EBDetId::MAX_IETA; ++ieta) {
460  if (ieta == 0)
461  continue;
462  for (int iphi = EBDetId::MIN_IPHI; iphi <= EBDetId::MAX_IPHI; ++iphi) {
463  if (EBDetId::validDetId(ieta, iphi)) {
464  EBDetId detId(ieta, iphi);
466  fprintf(fout_, "P %d\t%f\t%f\t%f\n", (int)detId, corr.p1, corr.p2, corr.p3);
467  }
468  }
469  }
470 
471  for (int iZ = 1; iZ >= -1; --iZ) {
472  for (int iX = EEDetId::IX_MIN; iX <= EEDetId::IX_MAX; ++iX) {
473  for (int iY = EEDetId::IY_MIN; iY <= EEDetId::IY_MAX; ++iY) {
474  if (EEDetId::validDetId(iX, iY, iZ)) {
475  EEDetId detId(iX, iY, iZ);
477  fprintf(fout_, "P %d\t%f\t%f\t%f\n", (int)detId, corr.p1, corr.p2, corr.p3);
478  }
479  }
480  }
481  }
482 }
483 //DEFINE_FWK_MODULE(EcalLaserCondTools);
EBDetId::hashedIndex
int hashedIndex() const
get a compact index for arrays
Definition: EBDetId.h:82
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
mps_fire.i
i
Definition: mps_fire.py:428
EcalLaserAPDPNRatiosRcd
Definition: EcalLaserAPDPNRatiosRcd.h:24
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
ESHandle.h
EcalLaserCondTools::FileReader
Definition: EcalLaserCondTools.h:62
EcalLaserCondTools::verb_
int verb_
Definition: EcalLaserCondTools.h:88
EBDetId
Definition: EBDetId.h:17
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalLaserCondTools::FileReader::nextFile
bool nextFile()
Definition: EcalLaserCondTools.cc:254
EBDetId.h
EEDetId.h
EcalLaserCondTools::dbToAscii
void dbToAscii(const edm::EventSetup &es)
Definition: EcalLaserCondTools.cc:422
EEDetId::IX_MIN
static const int IX_MIN
Definition: EEDetId.h:290
EEDetId::IY_MIN
static const int IY_MIN
Definition: EEDetId.h:294
EcalLaserCondTools::CorrReader::setVerbosity
void setVerbosity(int verb)
Definition: EcalLaserCondTools.h:56
EcalCondObjectContainer< EcalLaserAPDPNpair >
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
EcalLaserCondTools::EcalLaserCondTools
EcalLaserCondTools(const edm::ParameterSet &)
Definition: EcalLaserCondTools.cc:24
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
EcalLaserCondTools::FileReader::ifile_
unsigned ifile_
Definition: EcalLaserCondTools.h:74
EcalBarrel
Definition: EcalSubdetector.h:10
EcalLaserCondTools::~EcalLaserCondTools
~EcalLaserCondTools() override
Definition: EcalLaserCondTools.cc:47
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalLaserCondTools::timeToString
static std::string timeToString(time_t t)
Definition: EcalLaserCondTools.cc:413
EcalLaserCondTools::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &es) override
Definition: EcalLaserCondTools.cc:54
EcalLaserCondTools::db_
edm::Service< cond::service::PoolDBOutputService > db_
Definition: EcalLaserCondTools.h:91
DetId
Definition: DetId.h:17
EcalLaserCondTools::eventListFileName_
std::string eventListFileName_
Definition: EcalLaserCondTools.h:87
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalLaserCondTools::mode_
std::string mode_
Definition: EcalLaserCondTools.h:89
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
EcalLaserCondTools::FileReader::f_
FILE * f_
Definition: EcalLaserCondTools.h:72
EcalLaserCondTools::processIov
void processIov(CorrReader &r, int t1, int t2[nLmes], int t3)
Definition: EcalLaserCondTools.cc:150
fileCollector.done
done
Definition: fileCollector.py:123
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
EcalLaserCondTools::CorrReader
Definition: EcalLaserCondTools.h:50
edm::ESHandle
Definition: DTSurvey.h:22
EcalLaserCondTools::FileReader::readPs
bool readPs(DetId &rawdetid, EcalLaserAPDPNRatios::EcalLaserAPDPNpair &corr) override
Definition: EcalLaserCondTools.cc:323
EBDetId::MAX_IPHI
static const int MAX_IPHI
Definition: EBDetId.h:137
EEDetId::IY_MAX
static const int IY_MAX
Definition: EEDetId.h:302
EcalLaserCondTools::CorrReader::verb_
int verb_
Definition: EcalLaserCondTools.h:59
EEDetId::zside
int zside() const
Definition: EEDetId.h:71
EcalLaserCondTools::FileReader::readTime
bool readTime(int &t1, int t2[EcalLaserCondTools::nLmes], int &t3) override
Definition: EcalLaserCondTools.cc:274
RandomServiceHelper.t3
t3
Definition: RandomServiceHelper.py:258
EcalLaserAPDPNRatiosRcd.h
EcalLaserCondTools::maxP_
double maxP_
Definition: EcalLaserCondTools.h:96
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
EEDetId
Definition: EEDetId.h:14
EcalLaserCondTools::fromTime_
int fromTime_
Definition: EcalLaserCondTools.h:94
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
EcalLaserCondTools::toNth
static std::string toNth(int n)
Definition: EcalLaserCondTools.cc:390
EcalLaserCondTools::nIovs_
int nIovs_
Definition: EcalLaserCondTools.h:93
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
Definition: EcalLaserAPDPNRatios.h:16
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
EEDetId::hashedIndex
int hashedIndex() const
Definition: EEDetId.h:183
EEDetId::IX_MAX
static const int IX_MAX
Definition: EEDetId.h:298
createfilelist.int
int
Definition: createfilelist.py:10
EcalLaserCondTools.h
ntuplemaker.iline
iline
Definition: ntuplemaker.py:186
EcalLaserCondTools::nLmes
static constexpr int nLmes
Definition: EcalLaserCondTools.h:28
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
EcalLaserAPDPNRatios::setValue
void setValue(uint32_t rawId, const EcalLaserAPDPNpair &value)
Definition: EcalLaserAPDPNRatios.h:39
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EcalLaserAPDPNRatios::EcalLaserTimeStampMap
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
Definition: EcalLaserAPDPNRatios.h:34
get
#define get
res
Definition: Electron.h:6
EcalLaserCondTools::minP_
double minP_
Definition: EcalLaserCondTools.h:96
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
alignCSCRings.r
r
Definition: alignCSCRings.py:93
EBDetId::validDetId
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:118
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
std
Definition: JetResolutionObject.h:76
EcalLaserCondTools::ferr_
FILE * ferr_
Definition: EcalLaserCondTools.h:97
EcalLaserCondTools::skipIov_
int skipIov_
Definition: EcalLaserCondTools.h:92
EcalLaserCondTools::FileReader::fnames_
std::vector< std::string > fnames_
Definition: EcalLaserCondTools.h:73
EcalLaserCondTools::FileReader::trim
void trim()
Definition: EcalLaserCondTools.cc:374
Exception
Definition: hltDiff.cc:246
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
EBDetId::ietaAbs
int ietaAbs() const
get the absolute value of the crystal ieta
Definition: EBDetId.h:47
EventSetup.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalLaserCondTools::fnames_
std::vector< std::string > fnames_
Definition: EcalLaserCondTools.h:90
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
cms::Exception
Definition: Exception.h:70
EcalLaserAPDPNRatios
Definition: EcalLaserAPDPNRatios.h:14
EcalLaserCondTools::eventList_
FILE * eventList_
Definition: EcalLaserCondTools.h:86
EcalLaserCondTools::fillDb
void fillDb(CorrReader &r)
Definition: EcalLaserCondTools.cc:75
EcalLaserCondTools::fout_
FILE * fout_
Definition: EcalLaserCondTools.h:85
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
EcalLaserAPDPNRatios::setTime
void setTime(int hashedIndex, const EcalLaserTimeStamp &value)
Definition: EcalLaserAPDPNRatios.h:42
trim
static void trim(std::string &s)
Definition: DTCCablingMapProducer.cc:67
EcalLaserAPDPNRatios::EcalLaserTimeStamp
Definition: EcalLaserAPDPNRatios.h:24
EBDetId::MAX_IETA
static const int MAX_IETA
Definition: EBDetId.h:136
EcalLaserCondTools::FileReader::iline_
int iline_
Definition: EcalLaserCondTools.h:75
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EBDetId::MIN_IPHI
static const int MIN_IPHI
Definition: EBDetId.h:135
edm::Timestamp
Definition: Timestamp.h:30