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