CMS 3D CMS Logo

EcalPedOffset.cc
Go to the documentation of this file.
1 // TODO: fix header here?
11 #include <fstream>
12 #include <iostream>
13 #include <memory>
14 
16 
18 
24 
26 
29 
33 
34 using namespace cms;
35 using namespace edm;
36 
39  : m_barrelDigiCollection(paramSet.getParameter<edm::InputTag>("EBdigiCollection")),
40  m_endcapDigiCollection(paramSet.getParameter<edm::InputTag>("EEdigiCollection")),
41  m_headerCollection(paramSet.getParameter<edm::InputTag>("headerCollection")),
42  m_xmlFile(paramSet.getParameter<std::string>("xmlFile")),
43  m_DACmin(paramSet.getUntrackedParameter<int>("DACmin", 0)),
44  m_DACmax(paramSet.getUntrackedParameter<int>("DACmax", 256)),
45  m_RMSmax(paramSet.getUntrackedParameter<double>("RMSmax", 2)),
46  m_bestPed(paramSet.getUntrackedParameter<int>("bestPed", 200)),
47  m_dbHostName(paramSet.getUntrackedParameter<std::string>("dbHostName", "0")),
48  m_dbName(paramSet.getUntrackedParameter<std::string>("dbName", "0")),
49  m_dbUserName(paramSet.getUntrackedParameter<std::string>("dbUserName")),
50  m_dbPassword(paramSet.getUntrackedParameter<std::string>("dbPassword")),
51  m_dbHostPort(paramSet.getUntrackedParameter<int>("dbHostPort", 1521)),
52  m_create_moniov(paramSet.getUntrackedParameter<bool>("createMonIOV", false)),
53  m_location(paramSet.getUntrackedParameter<std::string>("location", "H4")),
54  m_run(-1),
55  m_plotting(paramSet.getParameter<std::string>("plotting")),
56  m_maxSlopeAllowed_(paramSet.getUntrackedParameter<double>("maxSlopeAllowed", -29)),
57  m_minSlopeAllowed_(paramSet.getUntrackedParameter<double>("minSlopeAllowed", -18)),
58  m_maxChi2OverNDFAllowed_(paramSet.getUntrackedParameter<double>("maxChi2OverNDF", 5)) {
59  edm::LogInfo("EcalPedOffset") << " reading "
60  << " m_DACmin: " << m_DACmin << " m_DACmax: " << m_DACmax << " m_RMSmax: " << m_RMSmax
61  << " m_bestPed: " << m_bestPed;
62 }
63 
64 // -----------------------------------------------------------------------------
65 
68  for (std::map<int, TPedValues *>::iterator mapIt = m_pedValues.begin(); mapIt != m_pedValues.end(); ++mapIt)
69  delete mapIt->second;
70  for (std::map<int, TPedResult *>::iterator mapIt = m_pedResult.begin(); mapIt != m_pedResult.end(); ++mapIt)
71  delete mapIt->second;
72 }
73 
74 // -----------------------------------------------------------------------------
75 
77 void EcalPedOffset::beginRun(Run const &, EventSetup const &eventSetup) {
78  LogDebug("EcalPedOffset") << "entering beginRun...";
79 
81  eventSetup.get<EcalMappingRcd>().get(handle);
82  ecalElectronicsMap_ = handle.product();
83 }
84 
85 // -----------------------------------------------------------------------------
86 
88 void EcalPedOffset::analyze(Event const &event, EventSetup const &eventSetup) {
89  LogDebug("EcalPedOffset") << "entering analyze ...";
90 
91  // get the headers
92  // (one header for each supermodule)
94  event.getByLabel(m_headerCollection, DCCHeaders);
95 
96  std::map<int, int> DACvalues;
97 
98  if (m_run == -1)
99  m_run = event.id().run();
100 
101  // loop over the headers
102  for (EcalRawDataCollection::const_iterator headerItr = DCCHeaders->begin(); headerItr != DCCHeaders->end();
103  ++headerItr) {
104  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
105  int FEDid = 600 + headerItr->id();
106  DACvalues[FEDid] = settings.ped_offset;
107  LogDebug("EcalPedOffset") << "Found FED: " << FEDid << " in DCC header";
108  }
109 
110  bool barrelDigisFound = true;
111  bool endcapDigisFound = true;
112  // get the barrel digis
113  // (one digi for each crystal)
115  event.getByLabel(m_barrelDigiCollection, barrelDigis);
116  if (!barrelDigis.isValid()) {
117  edm::LogError("EcalPedOffset") << "Error! can't get the product " << m_barrelDigiCollection
118  << "; not reading barrel digis";
119  barrelDigisFound = false;
120  }
121 
122  if (barrelDigis->empty()) {
123  edm::LogInfo("EcalPedOffset") << "Size of EBDigiCollection is zero;"
124  << " not reading barrel digis";
125  barrelDigisFound = false;
126  }
127 
128  // get the endcap digis
129  // (one digi for each crystal)
131  event.getByLabel(m_endcapDigiCollection, endcapDigis);
132  if (!endcapDigis.isValid()) {
133  edm::LogError("EcalPedOffset") << "Error! can't get the product " << m_endcapDigiCollection
134  << "; not reading endcap digis";
135  endcapDigisFound = false;
136  }
137 
138  if (endcapDigis->empty()) {
139  edm::LogInfo("EcalPedOffset") << "Size of EEDigiCollection is zero;"
140  << " not reading endcap digis";
141  endcapDigisFound = false;
142  }
143 
144  if (barrelDigisFound)
145  readDACs(barrelDigis, DACvalues);
146  if (endcapDigisFound)
147  readDACs(endcapDigis, DACvalues);
148  if (!barrelDigisFound && !endcapDigisFound)
149  edm::LogError("EcalPedOffset") << "No digis found in the event!";
150 }
151 
152 // -----------------------------------------------------------------------------
153 
154 void EcalPedOffset::readDACs(const edm::Handle<EBDigiCollection> &pDigis, const std::map<int, int> &_DACvalues) {
155  std::map<int, int> DACvalues = _DACvalues;
156  // loop over the digis
157  for (EBDigiCollection::const_iterator itdigi = pDigis->begin(); itdigi != pDigis->end(); ++itdigi) {
158  int gainId = ((EBDataFrame)(*itdigi)).sample(0).gainId();
159  EBDetId detId = EBDetId(itdigi->id());
161  int FEDid = 600 + elecId.dccId();
162  int crystalId = detId.ic();
163 
164  // TODO: Behavior here
165  if (DACvalues.find(FEDid) == DACvalues.end()) {
166  edm::LogError("EcalPedOffset") << "Error! EB DCCid of digi does not "
167  "match any DCCid found in DCC headers"
168  << FEDid;
169  }
170 
171  if (!m_pedValues.count(FEDid)) {
172  LogDebug("EcalPedOffset") << "Inserting new TPedValues object for FED:" << FEDid;
173  m_pedValues[FEDid] = new TPedValues(m_RMSmax, m_bestPed);
174  }
175 
176  // loop over the samples
177  for (int iSample = 0; iSample < EcalDataFrame::MAXSAMPLES; ++iSample) {
178  m_pedValues[FEDid]->insert(
179  gainId, crystalId, DACvalues[FEDid], ((EBDataFrame)(*itdigi)).sample(iSample).adc(), crystalId);
180  }
181 
182  } // end loop over digis
183 }
184 
185 // -----------------------------------------------------------------------------
186 
187 void EcalPedOffset::readDACs(const edm::Handle<EEDigiCollection> &pDigis, const std::map<int, int> &_DACvalues) {
188  std::map<int, int> DACvalues = _DACvalues;
189  // loop over the digis
190  for (EEDigiCollection::const_iterator itdigi = pDigis->begin(); itdigi != pDigis->end(); ++itdigi) {
191  int gainId = ((EEDataFrame)(*itdigi)).sample(0).gainId();
192  // int gainId = itdigi->sample(0).gainId();
193  EEDetId detId = EEDetId(itdigi->id());
195  int FEDid = 600 + elecId.dccId();
196  int crystalId = 25 * elecId.towerId() + 5 * elecId.stripId() + elecId.xtalId();
197  int endcapCrystalId = 100 * elecId.towerId() + 5 * (elecId.stripId() - 1) + elecId.xtalId();
198 
199  // TODO: Behavior here
200  if (DACvalues.find(FEDid) == DACvalues.end()) {
201  edm::LogError("EcalPedOffset") << "Error! EE DCCid of digi does not "
202  "match any DCCid found in DCC headers: "
203  << FEDid;
204  }
205 
206  if (!m_pedValues.count(FEDid)) {
207  LogDebug("EcalPedOffset") << "Inserting new TPedValues object for FED:" << FEDid;
208  m_pedValues[FEDid] = new TPedValues(m_RMSmax, m_bestPed);
209  }
210 
211  // loop over the samples
212  for (int iSample = 0; iSample < EcalDataFrame::MAXSAMPLES; ++iSample) {
213  m_pedValues[FEDid]->insert(
214  gainId, crystalId, DACvalues[FEDid], ((EEDataFrame)(*itdigi)).sample(iSample).adc(), endcapCrystalId);
215  }
216 
217  } // end loop over digis
218 }
219 
220 // -----------------------------------------------------------------------------
221 
224  for (std::map<int, TPedValues *>::const_iterator smPeds = m_pedValues.begin(); smPeds != m_pedValues.end();
225  ++smPeds) {
226  m_pedResult[smPeds->first] = new TPedResult((smPeds->second)->terminate(m_DACmin, m_DACmax));
227  }
228  edm::LogInfo("EcalPedOffset") << " results map size " << m_pedResult.size();
230 
231  if (m_plotting != '0')
232  makePlots();
233  if (m_dbHostName != '0')
234  writeDb();
235 }
236 
237 // -----------------------------------------------------------------------------
238 
242  LogDebug("EcalPedOffset") << " entering writeDb ...";
243 
244  // connect to the database
245  EcalCondDBInterface *DBconnection;
246  try {
247  LogInfo("EcalPedOffset") << "Opening DB connection with TNS_ADMIN ...";
249  } catch (std::runtime_error &e) {
250  LogError("EcalPedOffset") << e.what();
251  if (!m_dbHostName.empty()) {
252  try {
253  LogInfo("EcalPedOffset") << "Opening DB connection without TNS_ADMIN ...";
255  } catch (std::runtime_error &e) {
256  LogError("EcalPedOffset") << e.what();
257  return;
258  }
259  } else
260  return;
261  }
262 
263  // define the query for RunIOV to get the right place in the database
264  RunTag runtag;
265  LocationDef locdef;
266  RunTypeDef rundef;
267  locdef.setLocation(m_location);
268 
269  runtag.setGeneralTag("PEDESTAL-OFFSET");
270  rundef.setRunType("PEDESTAL-OFFSET");
271  // rundef.setRunType ("TEST");
272  // runtag.setGeneralTag ("TEST");
273 
274  runtag.setLocationDef(locdef);
275  runtag.setRunTypeDef(rundef);
276 
277  run_t run = m_run; // FIXME dal config file
278  // RunIOV runiov = DBconnection->fetchRunIOV (&runtag, run);
279  RunIOV runiov = DBconnection->fetchRunIOV(m_location, run);
280 
281  // MonRunIOV
282  MonVersionDef monverdef;
283  monverdef.setMonitoringVersion("test01");
284  MonRunTag montag;
285  montag.setMonVersionDef(monverdef);
286  montag.setGeneralTag("CMSSW");
287 
288  subrun_t subrun = 1; // hardcoded!
289 
290  MonRunIOV moniov;
291 
292  try {
293  runtag = runiov.getRunTag();
294  moniov = DBconnection->fetchMonRunIOV(&runtag, &montag, run, subrun);
295  } catch (std::runtime_error &e) {
296  if (m_create_moniov) {
297  // if not already in the DB create a new MonRunIOV
298  Tm startSubRun;
299  startSubRun.setToCurrentGMTime();
300  // setup the MonIOV
301  moniov.setRunIOV(runiov);
302  moniov.setSubRunNumber(subrun);
303  moniov.setSubRunStart(startSubRun);
304  moniov.setMonRunTag(montag);
305  LogDebug("EcalPedOffset") << " creating a new MonRunIOV";
306  } else {
307  edm::LogError("EcalPedOffset") << " no MonRunIOV existing in the DB";
308  edm::LogError("EcalPedOffset") << " the result will not be stored into the DB";
309  if (DBconnection) {
310  delete DBconnection;
311  }
312  return;
313  }
314  }
315 
316  // create the table to be filled and the map to be inserted
317  EcalLogicID ecid;
318  std::map<EcalLogicID, MonPedestalOffsetsDat> DBdataset;
319  MonPedestalOffsetsDat DBtable;
320 
321  // fill the table
322 
323  // loop over the super-modules
324  for (std::map<int, TPedResult *>::const_iterator result = m_pedResult.begin(); result != m_pedResult.end();
325  ++result) {
326  // loop over the crystals
327  for (int xtal = 0; xtal < 1700; ++xtal) {
328  DBtable.setDACG1(result->second->m_DACvalue[2][xtal]);
329  DBtable.setDACG6(result->second->m_DACvalue[1][xtal]);
330  DBtable.setDACG12(result->second->m_DACvalue[0][xtal]);
331  DBtable.setTaskStatus(true); // FIXME to be set correctly
332 
333  // fill the table
334  if (DBconnection) {
335  try {
336  int fedid = result->first;
337  int eid = m_pedValues[fedid]->getCrystalNumber(xtal);
338  // If eid is zero, that crystal was not present in digis
339  if (eid == 0)
340  continue;
341 
342  if (fedid >= 601 && fedid <= 609) {
343  // Add the FEDid part in for DB
344  eid = eid + 10000 * (fedid - 600);
345  ecid = DBconnection->getEcalLogicID("EE_elec_crystal_number", eid);
346  } else if (fedid >= 610 && fedid <= 627) {
347  ecid = DBconnection->getEcalLogicID("EB_crystal_number", fedid - 610 + 19, eid);
348  } else if (fedid >= 628 && fedid <= 645) {
349  ecid = DBconnection->getEcalLogicID("EB_crystal_number", fedid - 628 + 1, eid);
350  } else if (fedid >= 646 && fedid <= 654) {
351  // Add the FEDid part in for DB
352  eid = eid + 10000 * (fedid - 600);
353  ecid = DBconnection->getEcalLogicID("EE_elec_crystal_number", eid);
354  } else
355  LogError("EcalPedOffset") << "FEDid is out of range 601-654";
356 
357  DBdataset[ecid] = DBtable;
358  } catch (std::runtime_error &e) {
359  edm::LogError("EcalPedOffset") << e.what();
360  }
361  }
362  } // loop over the crystals
363  } // loop over the super-modules
364 
365  // insert the map of tables in the database
366  if (DBconnection) {
367  try {
368  LogDebug("EcalPedOffset") << "Inserting dataset ... " << std::flush;
369  if (!DBdataset.empty())
370  DBconnection->insertDataSet(&DBdataset, &moniov);
371  LogDebug("EcalPedOffset") << "done.";
372  } catch (std::runtime_error &e) {
373  edm::LogError("EcalPedOffset") << e.what();
374  }
375  }
376 
377  if (DBconnection) {
378  delete DBconnection;
379  }
380 }
381 
382 // -----------------------------------------------------------------------------
383 
386  // loop over the super-modules
387  for (std::map<int, TPedResult *>::const_iterator smRes = m_pedResult.begin(); smRes != m_pedResult.end(); ++smRes) {
388  std::string thisSMFileName = fileName;
389  // open the output stream
390  thisSMFileName += "_";
391  thisSMFileName += intToString(smRes->first);
392  thisSMFileName += ".xml";
393  std::ofstream xml_outfile;
394  xml_outfile.open(thisSMFileName.c_str());
395 
396  // write the header file
397  xml_outfile << "<offsets>" << std::endl;
398  xml_outfile << "<PEDESTAL_OFFSET_RELEASE VERSION_ID = \"SM1_VER1\"> \n";
399  xml_outfile << " <RELEASE_ID>RELEASE_1</RELEASE_ID>\n";
400  xml_outfile << " <SUPERMODULE>";
401  xml_outfile << smRes->first;
402  xml_outfile << "</SUPERMODULE>\n";
403  xml_outfile << " <TIME_STAMP> 070705 </TIME_STAMP>" << std::endl;
404 
405  // loop over the crystals
406  for (int xtal = 0; xtal < 1700; ++xtal) {
407  int crystalNumber = m_pedValues[smRes->first]->getCrystalNumber(xtal);
408  if (crystalNumber == 0)
409  continue;
410  xml_outfile << " <PEDESTAL_OFFSET>\n";
411  xml_outfile << " <HIGH>" << ((smRes->second)->m_DACvalue)[0][xtal] << "</HIGH>\n";
412  xml_outfile << " <MED>" << ((smRes->second)->m_DACvalue)[1][xtal] << "</MED>\n";
413  xml_outfile << " <LOW>" << ((smRes->second)->m_DACvalue)[2][xtal] << "</LOW>\n";
414  xml_outfile << " <CRYSTAL> " << crystalNumber << " </CRYSTAL>\n";
415  xml_outfile << " </PEDESTAL_OFFSET>" << std::endl;
416  }
417 
418  // close the open tags
419  xml_outfile << " </PEDESTAL_OFFSET_RELEASE>" << std::endl;
420  xml_outfile << "</offsets>" << std::endl;
421  xml_outfile.close();
422  } // loop over the super-modules
423 }
424 
425 // -----------------------------------------------------------------------------
426 
429  LogDebug("EcalPedOffset") << " entering makePlots ...";
430 
431  edm::LogInfo("EcalPedOffset") << " map size: " << m_pedValues.size();
432 
433  // create the ROOT file
434  m_plotting += ".root";
435 
436  TFile *rootFile = new TFile(m_plotting.c_str(), "RECREATE");
437 
438  // loop over the supermodules
439  for (std::map<int, TPedValues *>::const_iterator smPeds = m_pedValues.begin(); smPeds != m_pedValues.end();
440  ++smPeds) {
441  // make a folder in the ROOT file
442  char folderName[120];
443  sprintf(folderName, "FED%02d", smPeds->first);
444  rootFile->mkdir(folderName);
446  }
447 
448  rootFile->Close();
449  delete rootFile;
450 
451  LogDebug("EcalPedOffset") << " DONE";
452 }
453 
454 // -----------------------------------------------------------------------------
455 
456 // convert an int to a string
458  // outputs the number into the string stream and then flushes
459  // the buffer (makes sure the output is put into the stream)
460  std::ostringstream myStream;
461  myStream << num << std::flush;
462  return (myStream.str()); // returns the string form of the stringstream object
463 }
EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
EcalPedOffset::m_create_moniov
bool m_create_moniov
Definition: EcalPedOffset.h:87
LocationDef::setLocation
void setLocation(std::string loc)
Definition: LocationDef.cc:20
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
EcalPedOffset::m_location
std::string m_location
Definition: EcalPedOffset.h:89
RunIOV
Definition: RunIOV.h:13
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
electrons_cff.bool
bool
Definition: electrons_cff.py:366
MonVersionDef::setMonitoringVersion
void setMonitoringVersion(std::string ver)
Definition: MonVersionDef.cc:21
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
MessageLogger.h
EcalPedOffset::makePlots
void makePlots()
create the plots of the DAC pedestal trend
Definition: EcalPedOffset.cc:428
funct::false
false
Definition: Factorize.h:29
subrun_t
int subrun_t
Definition: MODRunIOV.h:11
MonPedestalOffsetsDat::setDACG1
void setDACG1(int dac)
Definition: MonPedestalOffsetsDat.h:21
run_t
int run_t
Definition: CaliIOV.h:11
ESHandle.h
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
TPedResult
Definition: TPedResult.h:15
EcalPedOffset.h
EcalPedOffset::EcalPedOffset
EcalPedOffset(const edm::ParameterSet &ps)
Constructor.
Definition: EcalPedOffset.cc:38
mtdUncalibratedRecHits_cfi.barrelDigis
barrelDigis
Definition: mtdUncalibratedRecHits_cfi.py:33
EBDetId::ic
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:41
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Run
Definition: Run.h:45
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
RunIOV.h
EBDataFrame
Definition: EBDataFrame.h:11
RunTag
Definition: RunTag.h:13
LocationDef
Definition: LocationDef.h:12
EcalCondDBInterface::fetchMonRunIOV
MonRunIOV fetchMonRunIOV(RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun) noexcept(false)
Definition: EcalCondDBInterface.cc:674
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
EcalElectronicsId::dccId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalElectronicsId.h:31
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
MonRunIOV::setRunIOV
void setRunIOV(const RunIOV &iov)
Definition: MonRunIOV.cc:36
edm::Handle
Definition: AssociativeIterator.h:50
MonRunTag::setGeneralTag
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:21
EcalPedOffset::m_plotting
std::string m_plotting
the root file where to store the detail plots
Definition: EcalPedOffset.h:94
EcalPedOffset::m_headerCollection
edm::InputTag m_headerCollection
name of module/plugin/producer making headers
Definition: EcalPedOffset.h:63
EcalCondDBInterface::insertDataSet
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
Definition: EcalCondDBInterface.h:260
EcalPedOffset::m_pedValues
std::map< int, TPedValues * > m_pedValues
Definition: EcalPedOffset.h:67
EcalRawDataCollections.h
EcalPedOffset::ecalElectronicsMap_
const EcalElectronicsMapping * ecalElectronicsMap_
Definition: EcalPedOffset.h:55
RunTypeDef::setRunType
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:21
EcalPedOffset::m_bestPed
int m_bestPed
Definition: EcalPedOffset.h:73
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
EcalPedOffset::m_dbPassword
std::string m_dbPassword
database user password
Definition: EcalPedOffset.h:82
EcalPedOffset::m_dbName
std::string m_dbName
database name
Definition: EcalPedOffset.h:78
EcalPedOffset::~EcalPedOffset
~EcalPedOffset() override
Destructor.
Definition: EcalPedOffset.cc:67
MonPedestalOffsetsDat::setDACG6
void setDACG6(int dac)
Definition: MonPedestalOffsetsDat.h:24
RunInfoPI::m_run
Definition: RunInfoPayloadInspectoHelper.h:24
EcalPedOffset::m_DACmin
int m_DACmin
Definition: EcalPedOffset.h:70
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
RunIOV::getRunTag
RunTag getRunTag() const
Definition: RunIOV.cc:58
EcalPedOffset::m_DACmax
int m_DACmax
Definition: EcalPedOffset.h:71
indexGen.rootFile
rootFile
Definition: indexGen.py:92
EcalMappingRcd.h
EcalDigiCollections.h
edm::ESHandle< EcalElectronicsMapping >
EcalElectronicsMapping::getElectronicsId
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Definition: EcalElectronicsMapping.cc:324
EcalLogicID
Definition: EcalLogicID.h:7
MonVersionDef
Definition: MonVersionDef.h:12
EcalPedOffset::m_dbHostName
std::string m_dbHostName
database host name
Definition: EcalPedOffset.h:76
EcalPedOffset::m_endcapDigiCollection
edm::InputTag m_endcapDigiCollection
secondary name given to collection of digis
Definition: EcalPedOffset.h:62
Tm::setToCurrentGMTime
void setToCurrentGMTime()
Definition: Tm.cc:141
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
Tm
Definition: Tm.h:13
TPedValues
Definition: TPedValues.h:19
EEDetId
Definition: EEDetId.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDCCHeaderBlock::EcalDCCEventSettings
Definition: EcalDCCHeaderBlock.h:64
EcalPedOffset::writeDb
void writeDb()
WriteDB.
Definition: EcalPedOffset.cc:241
RunTypeDef
Definition: RunTypeDef.h:12
EcalPedOffset::endJob
void endJob(void) override
EndJob.
Definition: EcalPedOffset.cc:223
MonRunIOV.h
EcalPedOffset::intToString
std::string intToString(int num)
Definition: EcalPedOffset.cc:457
EcalPedOffset::m_dbHostPort
int m_dbHostPort
database
Definition: EcalPedOffset.h:84
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalPedOffset::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &eventSetup) override
BeginRun.
Definition: EcalPedOffset.cc:77
EcalElectronicsMapping.h
MonPedestalOffsetsDat::setDACG12
void setDACG12(int dac)
Definition: MonPedestalOffsetsDat.h:27
EcalPedOffset::analyze
void analyze(edm::Event const &event, edm::EventSetup const &eventSetup) override
! Analyze
Definition: EcalPedOffset.cc:88
createfilelist.int
int
Definition: createfilelist.py:10
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
test_db_connect.runtag
runtag
Definition: test_db_connect.py:16
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
EcalPedOffset::m_xmlFile
std::string m_xmlFile
name of the xml file to be saved
Definition: EcalPedOffset.h:65
MonRunIOV
Definition: MonRunIOV.h:14
EcalDCCHeaderBlock.h
edm::EventSetup
Definition: EventSetup.h:58
MonRunIOV::setSubRunNumber
void setSubRunNumber(subrun_t subrun)
Definition: MonRunIOV.cc:45
MonRunTag
Definition: MonRunTag.h:13
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
MonRunIOV::setMonRunTag
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunIOV.cc:27
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition: PixelSLinkDataInputSource_cfi.py:6
EcalCondDBInterface::getEcalLogicID
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
get
#define get
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:27
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
ALCARECODTCalibSynchCosmicsDQM_cff.folderName
folderName
Definition: ALCARECODTCalibSynchCosmicsDQM_cff.py:9
MonPedestalOffsetsDat.h
MonPedestalOffsetsDat::setTaskStatus
void setTaskStatus(bool status)
Definition: MonPedestalOffsetsDat.h:30
EcalDCCHeaderBlock::EcalDCCEventSettings::ped_offset
short ped_offset
Definition: EcalDCCHeaderBlock.h:71
EcalPedOffset::readDACs
void readDACs(const edm::Handle< EBDigiCollection > &pDigis, const std::map< int, int > &DACvalues)
Definition: EcalPedOffset.cc:154
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EcalMappingRcd
Definition: EcalMappingRcd.h:15
MonPedestalOffsetsDat
Definition: MonPedestalOffsetsDat.h:12
EcalPedOffset::m_RMSmax
double m_RMSmax
Definition: EcalPedOffset.h:72
EcalPedOffset::m_minSlopeAllowed_
double m_minSlopeAllowed_
min slope (in magnitude) allowed for linearity test
Definition: EcalPedOffset.h:98
EcalPedOffset::m_barrelDigiCollection
edm::InputTag m_barrelDigiCollection
secondary name given to collection of digis
Definition: EcalPedOffset.h:61
EcalPedOffset::m_run
int m_run
run number
Definition: EcalPedOffset.h:91
EcalPedOffset::m_pedResult
std::map< int, TPedResult * > m_pedResult
Definition: EcalPedOffset.h:68
MonRunIOV::setSubRunStart
void setSubRunStart(const Tm &start)
Definition: MonRunIOV.cc:54
mps_fire.result
result
Definition: mps_fire.py:311
EcalPedOffset::writeXMLFiles
void writeXMLFiles(std::string fileName)
write the results into xml format
Definition: EcalPedOffset.cc:385
MonRunTag::setMonVersionDef
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:30
RunTag.h
mtdUncalibratedRecHits_cfi.endcapDigis
endcapDigis
Definition: mtdUncalibratedRecHits_cfi.py:34
event
Definition: event.py:1
EEDataFrame
Definition: EEDataFrame.h:12
edm::Event
Definition: Event.h:73
EcalCondDBInterface::fetchRunIOV
RunIOV fetchRunIOV(RunTag *tag, run_t run) noexcept(false)
Definition: EcalCondDBInterface.cc:631
EcalPedOffset::m_dbUserName
std::string m_dbUserName
database user name
Definition: EcalPedOffset.h:80
EcalCondDBInterface.h
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
edm::InputTag
Definition: InputTag.h:15
EcalPedOffset::m_maxSlopeAllowed_
double m_maxSlopeAllowed_
max slope (in magnitude) allowed for linearity test
Definition: EcalPedOffset.h:96
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalPedOffset::m_maxChi2OverNDFAllowed_
double m_maxChi2OverNDFAllowed_
max chi2/ndf allowed for linearity test
Definition: EcalPedOffset.h:100