CMS 3D CMS Logo

EcalRawToDigi.cc
Go to the documentation of this file.
4 
7 
10 
13 
15  :
16 
17  //define the list of FED to be unpacked
18  fedUnpackList_(conf.getParameter<std::vector<int> >("FEDs")),
19 
20  //define the ordered FED list
21  orderedFedUnpackList_(conf.getParameter<std::vector<int> >("orderedFedList")),
22 
23  //define the ordered DCCId list
24  orderedDCCIdList_(conf.getParameter<std::vector<int> >("orderedDCCIdList")),
25 
26  //get number of Xtal Time Samples
27  numbXtalTSamples_(conf.getParameter<int>("numbXtalTSamples")),
28 
29  //Get number of Trigger Time Samples
30  numbTriggerTSamples_(conf.getParameter<int>("numbTriggerTSamples")),
31 
32  //See if header unpacking is enabled
33  headerUnpacking_(conf.getParameter<bool>("headerUnpacking")),
34 
35  //See if srp unpacking is enabled
36  srpUnpacking_(conf.getParameter<bool>("srpUnpacking")),
37 
38  //See if tcc unpacking is enabled
39  tccUnpacking_(conf.getParameter<bool>("tccUnpacking")),
40 
41  //See if fe unpacking is enabled
42  feUnpacking_(conf.getParameter<bool>("feUnpacking")),
43 
44  //See if fe unpacking is enabled for mem box
45  memUnpacking_(conf.getParameter<bool>("memUnpacking")),
46 
47  //See if syncCheck is enabled
48  syncCheck_(conf.getParameter<bool>("syncCheck")),
49 
50  //See if feIdCheck is enabled
51  feIdCheck_(conf.getParameter<bool>("feIdCheck")),
52 
53  // See if we want to keep data even if we have a mismatch between SR decision and block length
54  forceToKeepFRdata_(conf.getParameter<bool>("forceToKeepFRData")),
55 
56  put_(conf.getParameter<bool>("eventPut")),
57 
58  REGIONAL_(conf.getParameter<bool>("DoRegional")),
59 
60  myMap_(nullptr),
61 
62  theUnpacker_(nullptr)
63 
64 {
65  first_ = true;
66  DCCDataUnpacker::silentMode_ = conf.getUntrackedParameter<bool>("silentMode", false);
67 
68  if (numbXtalTSamples_ < 6 || numbXtalTSamples_ > 64 || (numbXtalTSamples_ - 2) % 4) {
69  std::ostringstream output;
70  output << "\n Unsuported number of xtal time samples : " << numbXtalTSamples_
71  << "\n Valid Number of xtal time samples are : 6,10,14,18,...,62";
72  edm::LogError("IncorrectConfiguration") << output.str();
73  // todo : throw an execption
74  }
75 
77  std::ostringstream output;
78  output << "\n Unsuported number of trigger time samples : " << numbTriggerTSamples_
79  << "\n Valid number of trigger time samples are : 1, 4 or 8";
80  edm::LogError("IncorrectConfiguration") << output.str();
81  // todo : throw an execption
82  }
83 
84  //NA : testing
85  //nevts_=0;
86  //RUNNING_TIME_=0;
87 
88  // if there are FEDs specified to unpack fill the vector of the fedUnpackList_
89  // else fill with the entire ECAL fed range (600-670)
90  if (fedUnpackList_.empty())
92  fedUnpackList_.push_back(i);
93 
94  //print the FEDs to unpack to the logger
95  std::ostringstream loggerOutput_;
96  if (!fedUnpackList_.empty()) {
97  for (unsigned int i = 0; i < fedUnpackList_.size(); i++)
98  loggerOutput_ << fedUnpackList_[i] << " ";
99  edm::LogInfo("EcalRawToDigi") << "EcalRawToDigi will unpack FEDs ( " << loggerOutput_.str() << ")";
100  LogDebug("EcalRawToDigi") << "EcalRawToDigi will unpack FEDs ( " << loggerOutput_.str() << ")";
101  }
102 
103  edm::LogInfo("EcalRawToDigi") << "\n ECAL RawToDigi configuration:"
104  << "\n Header unpacking is " << headerUnpacking_ << "\n SRP Bl. unpacking is "
105  << srpUnpacking_ << "\n TCC Bl. unpacking is " << tccUnpacking_
106  << "\n FE Bl. unpacking is " << feUnpacking_ << "\n MEM Bl. unpacking is "
107  << memUnpacking_ << "\n sync check is " << syncCheck_ << "\n feID check is "
108  << feIdCheck_ << "\n force keep FR data is " << forceToKeepFRdata_ << "\n";
109 
110  edm::InputTag dataLabel = conf.getParameter<edm::InputTag>("InputLabel");
111  edm::InputTag fedsLabel = conf.getParameter<edm::InputTag>("FedLabel");
112 
113  // Producer products
114  if (headerUnpacking_) {
115  produces<EcalRawDataCollection>();
116  }
117 
118  if (feUnpacking_) {
119  produces<EBDigiCollection>("ebDigis");
120  produces<EEDigiCollection>("eeDigis");
121 
122  // Integrity for xtal data
123  produces<EBDetIdCollection>("EcalIntegrityGainErrors");
124  produces<EBDetIdCollection>("EcalIntegrityGainSwitchErrors");
125  produces<EBDetIdCollection>("EcalIntegrityChIdErrors");
126 
127  // Integrity for xtal data - EE specific (to be rivisited towards EB+EE common collection)
128  produces<EEDetIdCollection>("EcalIntegrityGainErrors");
129  produces<EEDetIdCollection>("EcalIntegrityGainSwitchErrors");
130  produces<EEDetIdCollection>("EcalIntegrityChIdErrors");
131 
132  // Integrity Errors
133  produces<EcalElectronicsIdCollection>("EcalIntegrityTTIdErrors");
134  produces<EcalElectronicsIdCollection>("EcalIntegrityZSXtalIdErrors");
135  produces<EcalElectronicsIdCollection>("EcalIntegrityBlockSizeErrors");
136 
137  //
138  produces<EcalPnDiodeDigiCollection>();
139  }
140 
141  if (srpUnpacking_) {
142  produces<EBSrFlagCollection>();
143  produces<EESrFlagCollection>();
144  }
145 
146  if (tccUnpacking_) {
147  produces<EcalTrigPrimDigiCollection>("EcalTriggerPrimitives");
148  produces<EcalPSInputDigiCollection>("EcalPseudoStripInputs");
149  }
150 
151  // Mem channels' integrity
152  if (memUnpacking_) {
153  produces<EcalElectronicsIdCollection>("EcalIntegrityMemTtIdErrors");
154  produces<EcalElectronicsIdCollection>("EcalIntegrityMemBlockSizeErrors");
155  produces<EcalElectronicsIdCollection>("EcalIntegrityMemChIdErrors");
156  produces<EcalElectronicsIdCollection>("EcalIntegrityMemGainErrors");
157  }
158 
159  dataToken_ = consumes<FEDRawDataCollection>(dataLabel);
160  if (REGIONAL_) {
161  fedsToken_ = consumes<EcalListOfFEDS>(fedsLabel);
162  }
163  chStatusToken_ = esConsumes<EcalChannelStatusMap, EcalChannelStatusRcd, edm::Transition::BeginRun>();
164  ecalMappingToken_ = esConsumes<EcalElectronicsMapping, EcalMappingRcd>();
165 
166  // Build a new Electronics mapper and parse default map file
168 
169  // in case of external tsext file (deprecated by HLT environment)
170  // bool readResult = myMap_->readDCCMapFile(conf.getParameter<std::string>("DCCMapFile",""));
171 
172  // use two arrays from cfg to establish DCCId:FedId. If they are empy, than use hard coded correspondence
174  // myMap::makeMapFromVectors() returns "true" always
175  // need to be fixed?
176 
177  if (!readResult) {
178  edm::LogWarning("IncorrectConfiguration") << "Arrays orderedFedList and orderedDCCIdList are emply. "
179  "Hard coded correspondence for DCCId:FedId will be used.";
180  // edm::LogError("EcalRawToDigi")<<"\n unable to read file : "
181  // <<conf.getParameter<std::string>("DCCMapFile");
182  }
183 
184  // Build a new ECAL DCC data unpacker
189  feUnpacking_,
191  syncCheck_,
192  feIdCheck_,
194 }
195 
196 // print list of crystals with non-zero statuses
197 // this functions is only for debug purposes
199  // Endcap
200  std::cout << "===> ENDCAP" << std::endl;
201  for (int i = 0; i < EEDetId::kSizeForDenseIndexing; ++i) {
202  const EEDetId id = EEDetId::unhashIndex(i);
203  if (!id.null()) {
204  // channel status
205  const uint16_t code = unpacker->getChannelValue(id);
206 
207  if (code) {
208  const EcalElectronicsId ei = mapping->getElectronicsId(id);
209 
210  // convert DCC ID (1 - 54) to FED ID (601 - 654)
211  const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
212 
213  std::cout << " id " << id.rawId() << " -> (" << id.ix() << ", " << id.iy() << ", " << id.zside() << ") "
214  << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", "
215  << ei.xtalId() << ") "
216  << "status = " << code << std::endl;
217  }
218  }
219  }
220  std::cout << "<=== ENDCAP" << std::endl;
221 
222  std::cout << "===> BARREL" << std::endl;
223  for (int i = 0; i < EBDetId::kSizeForDenseIndexing; ++i) {
224  const EBDetId id = EBDetId::unhashIndex(i);
225  if (!id.null()) {
226  // channel status
227  const uint16_t code = unpacker->getChannelValue(id);
228 
229  if (code) {
230  const EcalElectronicsId ei = mapping->getElectronicsId(id);
231 
232  // convert DCC ID (1 - 54) to FED ID (601 - 654)
233  const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
234 
235  std::cout << " id " << id.rawId() << " -> (" << id.ieta() << ", " << id.iphi() << ", " << id.zside() << ") "
236  << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", "
237  << ei.xtalId() << ") "
238  << "status = " << code << std::endl;
239  }
240  }
241  }
242  std::cout << "<=== BARREL" << std::endl;
243 }
244 
247  desc.add<bool>("tccUnpacking", true);
248  desc.add<edm::InputTag>("FedLabel", edm::InputTag("listfeds"));
249  desc.add<bool>("srpUnpacking", true);
250  desc.add<bool>("syncCheck", true);
251  desc.add<bool>("feIdCheck", true);
252  desc.addUntracked<bool>("silentMode", true);
253  desc.add<edm::InputTag>("InputLabel", edm::InputTag("rawDataCollector"));
254  {
255  std::vector<int> temp1;
256  unsigned int nvec = 54;
257  temp1.reserve(nvec);
258  for (unsigned int i = 0; i < nvec; i++)
259  temp1.push_back(601 + i);
260  desc.add<std::vector<int> >("orderedFedList", temp1);
261  }
262  desc.add<bool>("eventPut", true);
263  desc.add<int>("numbTriggerTSamples", 1);
264  desc.add<int>("numbXtalTSamples", 10);
265  {
266  std::vector<int> temp1;
267  unsigned int nvec = 54;
268  temp1.reserve(nvec);
269  for (unsigned int i = 0; i < nvec; i++)
270  temp1.push_back(1 + i);
271  desc.add<std::vector<int> >("orderedDCCIdList", temp1);
272  }
273  {
274  std::vector<int> temp1;
275  unsigned int nvec = 54;
276  temp1.reserve(nvec);
277  for (unsigned int i = 0; i < nvec; i++)
278  temp1.push_back(601 + i);
279  desc.add<std::vector<int> >("FEDs", temp1);
280  }
281  desc.add<bool>("DoRegional", false);
282  desc.add<bool>("feUnpacking", true);
283  desc.add<bool>("forceToKeepFRData", false);
284  desc.add<bool>("headerUnpacking", true);
285  desc.add<bool>("memUnpacking", true);
286  descriptions.add("ecalRawToDigi", desc);
287 }
288 
290  // channel status database
293 
294  // uncomment following line to print list of crystals with bad status
295  //edm::ESHandle<EcalElectronicsMapping> pEcalMapping;
296  //es.get<EcalMappingRcd>().get(pEcalMapping);
297  //const EcalElectronicsMapping* mapping = pEcalMapping.product();
298  //printStatusRecords(theUnpacker_, mapping);
299 }
300 
302  //double TIME_START = clock();
303  //nevts_++; //NUNO
304 
305  if (first_) {
306  watcher_.check(es);
308  myMap_->setEcalElectronicsMapping(ecalmapping.product());
309 
310  first_ = false;
311 
312  } else {
313  if (watcher_.check(es)) {
317  myMap_->setEcalElectronicsMapping(ecalmapping.product());
318  }
319  }
320 
321  // Get list of FEDS :
322  std::vector<int> FEDS_to_unpack;
323  if (REGIONAL_) {
324  edm::Handle<EcalListOfFEDS> listoffeds;
325  e.getByToken(fedsToken_, listoffeds);
326  FEDS_to_unpack = listoffeds->GetList();
327  }
328 
329  // Step A: Get Inputs
330 
332  e.getByToken(dataToken_, rawdata);
333 
334  // Step B: encapsulate vectors in actual collections and set unpacker pointers
335 
336  // create the collection of Ecal Digis
337  auto productDigisEB = std::make_unique<EBDigiCollection>();
338  productDigisEB->reserve(1700);
339  theUnpacker_->setEBDigisCollection(&productDigisEB);
340 
341  // create the collection of Ecal Digis
342  auto productDigisEE = std::make_unique<EEDigiCollection>();
343  theUnpacker_->setEEDigisCollection(&productDigisEE);
344 
345  // create the collection for headers
346  auto productDccHeaders = std::make_unique<EcalRawDataCollection>();
347  theUnpacker_->setDccHeadersCollection(&productDccHeaders);
348 
349  // create the collection for invalid gains
350  auto productInvalidGains = std::make_unique<EBDetIdCollection>();
351  theUnpacker_->setInvalidGainsCollection(&productInvalidGains);
352 
353  // create the collection for invalid gain Switch
354  auto productInvalidGainsSwitch = std::make_unique<EBDetIdCollection>();
355  theUnpacker_->setInvalidGainsSwitchCollection(&productInvalidGainsSwitch);
356 
357  // create the collection for invalid chids
358  auto productInvalidChIds = std::make_unique<EBDetIdCollection>();
359  theUnpacker_->setInvalidChIdsCollection(&productInvalidChIds);
360 
362 
363  // create the collection for invalid gains
364  auto productInvalidEEGains = std::make_unique<EEDetIdCollection>();
365  theUnpacker_->setInvalidEEGainsCollection(&productInvalidEEGains);
366 
367  // create the collection for invalid gain Switch
368  auto productInvalidEEGainsSwitch = std::make_unique<EEDetIdCollection>();
369  theUnpacker_->setInvalidEEGainsSwitchCollection(&productInvalidEEGainsSwitch);
370 
371  // create the collection for invalid chids
372  auto productInvalidEEChIds = std::make_unique<EEDetIdCollection>();
373  theUnpacker_->setInvalidEEChIdsCollection(&productInvalidEEChIds);
374 
376 
377  // create the collection for EB srflags
378  auto productEBSrFlags = std::make_unique<EBSrFlagCollection>();
379  theUnpacker_->setEBSrFlagsCollection(&productEBSrFlags);
380 
381  // create the collection for EB srflags
382  auto productEESrFlags = std::make_unique<EESrFlagCollection>();
383  theUnpacker_->setEESrFlagsCollection(&productEESrFlags);
384 
385  // create the collection for ecal trigger primitives
386  auto productEcalTps = std::make_unique<EcalTrigPrimDigiCollection>();
387  theUnpacker_->setEcalTpsCollection(&productEcalTps);
389 
390  // create the collection for ecal trigger primitives
391  auto productEcalPSs = std::make_unique<EcalPSInputDigiCollection>();
392  theUnpacker_->setEcalPSsCollection(&productEcalPSs);
394 
395  // create the collection for invalid TTIds
396  auto productInvalidTTIds = std::make_unique<EcalElectronicsIdCollection>();
397  theUnpacker_->setInvalidTTIdsCollection(&productInvalidTTIds);
398 
399  // create the collection for invalid TTIds
400  auto productInvalidZSXtalIds = std::make_unique<EcalElectronicsIdCollection>();
401  theUnpacker_->setInvalidZSXtalIdsCollection(&productInvalidZSXtalIds);
402 
403  // create the collection for invalid BlockLengths
404  auto productInvalidBlockLengths = std::make_unique<EcalElectronicsIdCollection>();
405  theUnpacker_->setInvalidBlockLengthsCollection(&productInvalidBlockLengths);
406 
407  // MEMs Collections
408  // create the collection for the Pn Diode Digis
409  auto productPnDiodeDigis = std::make_unique<EcalPnDiodeDigiCollection>();
410  theUnpacker_->setPnDiodeDigisCollection(&productPnDiodeDigis);
411 
412  // create the collection for invalid Mem Tt id
413  auto productInvalidMemTtIds = std::make_unique<EcalElectronicsIdCollection>();
414  theUnpacker_->setInvalidMemTtIdsCollection(&productInvalidMemTtIds);
415 
416  // create the collection for invalid Mem Block Size
417  auto productInvalidMemBlockSizes = std::make_unique<EcalElectronicsIdCollection>();
418  theUnpacker_->setInvalidMemBlockSizesCollection(&productInvalidMemBlockSizes);
419 
420  // create the collection for invalid Mem Block Size
421  auto productInvalidMemChIds = std::make_unique<EcalElectronicsIdCollection>();
422  theUnpacker_->setInvalidMemChIdsCollection(&productInvalidMemChIds);
423 
424  // create the collection for invalid Mem Gain Errors
425  auto productInvalidMemGains = std::make_unique<EcalElectronicsIdCollection>();
426  theUnpacker_->setInvalidMemGainsCollection(&productInvalidMemGains);
427  // double TIME_START = clock();
428 
429  // Step C: unpack all requested FEDs
430  for (std::vector<int>::const_iterator i = fedUnpackList_.begin(); i != fedUnpackList_.end(); i++) {
431  if (REGIONAL_) {
432  std::vector<int>::const_iterator fed_it = find(FEDS_to_unpack.begin(), FEDS_to_unpack.end(), *i);
433  if (fed_it == FEDS_to_unpack.end())
434  continue;
435  }
436 
437  // get fed raw data and SM id
438  const FEDRawData& fedData = rawdata->FEDData(*i);
439  const size_t length = fedData.size();
440 
441  LogDebug("EcalRawToDigi") << "raw data length: " << length;
442  //if data size is not null interpret data
443  if (length >= EMPTYEVENTSIZE) {
444  if (myMap_->setActiveDCC(*i)) {
445  const int smId = myMap_->getActiveSM();
446  LogDebug("EcalRawToDigi") << "Getting FED = " << *i << "(SM = " << smId << ")"
447  << " data size is: " << length;
448 
449  const uint64_t* data = (uint64_t*)fedData.data();
450  theUnpacker_->unpack(data, length, smId, *i);
451 
452  LogDebug("EcalRawToDigi") << " in EE :" << productDigisEE->size() << " in EB :" << productDigisEB->size();
453  }
454  }
455 
456  } // loop on FEDs
457 
458  //if(nevts_>1){ //NUNO
459  // double TIME_END = clock(); //NUNO
460  // RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
461  // }
462 
463  // Add collections to the event
464 
465  if (put_) {
466  if (headerUnpacking_) {
467  e.put(std::move(productDccHeaders));
468  }
469 
470  if (feUnpacking_) {
471  productDigisEB->sort();
472  e.put(std::move(productDigisEB), "ebDigis");
473  productDigisEE->sort();
474  e.put(std::move(productDigisEE), "eeDigis");
475  e.put(std::move(productInvalidGains), "EcalIntegrityGainErrors");
476  e.put(std::move(productInvalidGainsSwitch), "EcalIntegrityGainSwitchErrors");
477  e.put(std::move(productInvalidChIds), "EcalIntegrityChIdErrors");
478  // EE (leaving for now the same names as in EB)
479  e.put(std::move(productInvalidEEGains), "EcalIntegrityGainErrors");
480  e.put(std::move(productInvalidEEGainsSwitch), "EcalIntegrityGainSwitchErrors");
481  e.put(std::move(productInvalidEEChIds), "EcalIntegrityChIdErrors");
482  // EE
483  e.put(std::move(productInvalidTTIds), "EcalIntegrityTTIdErrors");
484  e.put(std::move(productInvalidZSXtalIds), "EcalIntegrityZSXtalIdErrors");
485  e.put(std::move(productInvalidBlockLengths), "EcalIntegrityBlockSizeErrors");
486  e.put(std::move(productPnDiodeDigis));
487  }
488  if (memUnpacking_) {
489  e.put(std::move(productInvalidMemTtIds), "EcalIntegrityMemTtIdErrors");
490  e.put(std::move(productInvalidMemBlockSizes), "EcalIntegrityMemBlockSizeErrors");
491  e.put(std::move(productInvalidMemChIds), "EcalIntegrityMemChIdErrors");
492  e.put(std::move(productInvalidMemGains), "EcalIntegrityMemGainErrors");
493  }
494  if (srpUnpacking_) {
495  e.put(std::move(productEBSrFlags));
496  e.put(std::move(productEESrFlags));
497  }
498  if (tccUnpacking_) {
499  e.put(std::move(productEcalTps), "EcalTriggerPrimitives");
500  e.put(std::move(productEcalPSs), "EcalPseudoStripInputs");
501  }
502  }
503 
504  //if(nevts_>1){ //NUNO
505  // double TIME_END = clock(); //NUNO
506  // RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
507  //}
508 }
509 
511  //cout << "EcalDCCUnpackingModule " << "N events " << (nevts_-1)<<endl;
512  //cout << "EcalDCCUnpackingModule " << " --- SETUP time " << endl;
513  //cout << "EcalDCCUnpackingModule " << "Time (sys) " << SETUP_TIME_ << endl;
514  //cout << "EcalDCCUnpackingModule " << "Time in sec. " << SETUP_TIME_/ CLOCKS_PER_SEC << endl;
515  //cout << "EcalDCCUnpackingModule " << " --- Per event " << endl;
516 
517  //RUNNING_TIME_ = RUNNING_TIME_ / (nevts_-1);
518 
519  //cout << "EcalDCCUnpackingModule "<< "Time (sys) " << RUNNING_TIME_ << endl;
520  //cout << "EcalDCCUnpackingModule "<< "Time in sec. " << RUNNING_TIME_ / CLOCKS_PER_SEC << endl;
521 
522  if (myMap_)
523  delete myMap_;
524  if (theUnpacker_)
525  delete theUnpacker_;
526 }
ConfigurationDescriptions.h
EcalElectronicsMapper::setEcalElectronicsMapping
void setEcalElectronicsMapping(const EcalElectronicsMapping *)
Definition: EcalElectronicsMapper.cc:247
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
DCCDataUnpacker::setChannelStatusDB
void setChannelStatusDB(const EcalChannelStatusMap *chdb)
Definition: DCCDataUnpacker.h:170
EcalRawToDigi::myMap_
EcalElectronicsMapper * myMap_
Definition: EcalRawToDigi.h:98
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
DCCDataUnpacker::setInvalidEEGainsSwitchCollection
void setInvalidEEGainsSwitchCollection(std::unique_ptr< EEDetIdCollection > *x)
Definition: DCCDataUnpacker.h:93
DCCDataUnpacker.h
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
DCCDataUnpacker::setInvalidZSXtalIdsCollection
void setInvalidZSXtalIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:100
EcalElectronicsMapper::resetPointers
void resetPointers()
Definition: EcalElectronicsMapper.cc:17
EcalElectronicsMapper::getDCCId
unsigned int getDCCId(unsigned int aSMId) const
Definition: EcalElectronicsMapper.cc:400
ESHandle.h
EcalRawToDigi::fedsToken_
edm::EDGetTokenT< EcalListOfFEDS > fedsToken_
Definition: EcalRawToDigi.h:90
EcalRawToDigi::theUnpacker_
DCCDataUnpacker * theUnpacker_
Definition: EcalRawToDigi.h:101
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm::Run
Definition: Run.h:45
EcalListOfFEDS::GetList
std::vector< int > GetList() const
Definition: EcalListOfFEDS.h:10
EBDetId
Definition: EBDetId.h:17
EcalRawToDigi::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
Definition: EcalRawToDigi.cc:289
EcalElectronicsMapper::makeMapFromVectors
bool makeMapFromVectors(std::vector< int > &, std::vector< int > &)
Definition: EcalElectronicsMapper.cc:314
EEDetId::unhashIndex
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
EBDetId::unhashIndex
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalElectronicsMapper::getActiveSM
unsigned int getActiveSM()
Definition: EcalElectronicsMapper.h:128
EcalRawToDigi::orderedDCCIdList_
std::vector< int > orderedDCCIdList_
Definition: EcalRawToDigi.h:73
EcalElectronicsMapper::setActiveDCC
bool setActiveDCC(unsigned int dccId)
Definition: EcalElectronicsMapper.cc:252
DCCDataUnpacker
Definition: DCCDataUnpacker.h:49
DCCDataUnpacker::silentMode_
static std::atomic< bool > silentMode_
Definition: DCCDataUnpacker.h:185
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
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
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle
Definition: AssociativeIterator.h:50
EcalRawToDigi::chStatusToken_
edm::ESGetToken< EcalChannelStatusMap, EcalChannelStatusRcd > chStatusToken_
Definition: EcalRawToDigi.h:91
EcalRawToDigi::ecalMappingToken_
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
Definition: EcalRawToDigi.h:92
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalElectronicsMapper.h
EcalRawToDigi::tccUnpacking_
bool tccUnpacking_
Definition: EcalRawToDigi.h:80
EcalRawToDigi::dataToken_
edm::EDGetTokenT< FEDRawDataCollection > dataToken_
Definition: EcalRawToDigi.h:89
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
EcalRawToDigi::srpUnpacking_
bool srpUnpacking_
Definition: EcalRawToDigi.h:79
FEDRawData
Definition: FEDRawData.h:19
EcalRawToDigi::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EcalRawToDigi.cc:245
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
EcalRawToDigi::forceToKeepFRdata_
bool forceToKeepFRdata_
Definition: EcalRawToDigi.h:85
EMPTYEVENTSIZE
Definition: DCCRawDataDefinitions.h:13
DCCDataUnpacker::setInvalidGainsCollection
void setInvalidGainsCollection(std::unique_ptr< EBDetIdCollection > *x)
Definition: DCCDataUnpacker.h:84
EcalRawToDigi::orderedFedUnpackList_
std::vector< int > orderedFedUnpackList_
Definition: EcalRawToDigi.h:72
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
DCCDataUnpacker::setInvalidEEChIdsCollection
void setInvalidEEChIdsCollection(std::unique_ptr< EEDetIdCollection > *x)
Definition: DCCDataUnpacker.h:95
DCCDataUnpacker::setEEDigisCollection
void setEEDigisCollection(std::unique_ptr< EEDigiCollection > *x)
Definition: DCCDataUnpacker.h:72
EEDetId::kSizeForDenseIndexing
Definition: EEDetId.h:329
edm::ESHandle
Definition: DTSurvey.h:22
EcalRawToDigi::EcalRawToDigi
EcalRawToDigi(const edm::ParameterSet &ps)
Definition: EcalRawToDigi.cc:14
DCCDataUnpacker::setInvalidMemChIdsCollection
void setInvalidMemChIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:110
DCCDataUnpacker::setEESrFlagsCollection
void setEESrFlagsCollection(std::unique_ptr< EESrFlagCollection > *x)
Definition: DCCDataUnpacker.h:78
DCCDataUnpacker::setEBDigisCollection
void setEBDigisCollection(std::unique_ptr< EBDigiCollection > *x)
Definition: DCCDataUnpacker.h:70
ParameterSetDescription.h
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
DCCDataUnpacker::setInvalidGainsSwitchCollection
void setInvalidGainsSwitchCollection(std::unique_ptr< EBDetIdCollection > *x)
Definition: DCCDataUnpacker.h:86
EEDetId
Definition: EEDetId.h:14
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
EcalRawToDigi::put_
bool put_
Definition: EcalRawToDigi.h:87
EcalRawToDigi::numbXtalTSamples_
unsigned int numbXtalTSamples_
Definition: EcalRawToDigi.h:75
EcalRawToDigi::headerUnpacking_
bool headerUnpacking_
Definition: EcalRawToDigi.h:78
DCCDataUnpacker::setInvalidMemGainsCollection
void setInvalidMemGainsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:112
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
printStatusRecords
void printStatusRecords(const DCCDataUnpacker *unpacker, const EcalElectronicsMapping *mapping)
Definition: EcalRawToDigi.cc:198
edm::ParameterSet
Definition: ParameterSet.h:47
DCCDataUnpacker::setDccHeadersCollection
void setDccHeadersCollection(std::unique_ptr< EcalRawDataCollection > *x)
Definition: DCCDataUnpacker.h:74
DCCDataUnpacker::unpack
void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int smId, unsigned int fedId)
Definition: DCCDataUnpacker.cc:33
DCCDataUnpacker::setInvalidBlockLengthsCollection
void setInvalidBlockLengthsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:102
DCCDataUnpacker::setInvalidEEGainsCollection
void setInvalidEEGainsCollection(std::unique_ptr< EEDetIdCollection > *x)
Definition: DCCDataUnpacker.h:91
EcalRawToDigi.h
DCCDataUnpacker::setInvalidTTIdsCollection
void setInvalidTTIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:98
createfilelist.int
int
Definition: createfilelist.py:10
EcalRawToDigi::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: EcalRawToDigi.cc:301
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
DCCDataUnpacker::setInvalidMemBlockSizesCollection
void setInvalidMemBlockSizesCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:108
edm::EventSetup
Definition: EventSetup.h:58
EcalRawToDigi::REGIONAL_
bool REGIONAL_
Definition: EcalRawToDigi.h:95
DCCDataUnpacker::setInvalidMemTtIdsCollection
void setInvalidMemTtIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:106
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
EcalRawToDigi::feUnpacking_
bool feUnpacking_
Definition: EcalRawToDigi.h:81
EcalElectronicsMapper
Definition: EcalElectronicsMapper.h:36
EcalRawToDigi::memUnpacking_
bool memUnpacking_
Definition: EcalRawToDigi.h:82
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
EcalRawToDigi::fedUnpackList_
std::vector< int > fedUnpackList_
Definition: EcalRawToDigi.h:70
EcalRawToDigi::syncCheck_
bool syncCheck_
Definition: EcalRawToDigi.h:83
DCCDataUnpacker::setInvalidChIdsCollection
void setInvalidChIdsCollection(std::unique_ptr< EBDetIdCollection > *x)
Definition: DCCDataUnpacker.h:88
DCCDataUnpacker::setPnDiodeDigisCollection
void setPnDiodeDigisCollection(std::unique_ptr< EcalPnDiodeDigiCollection > *x)
Definition: DCCDataUnpacker.h:104
EBDetId::kSizeForDenseIndexing
Definition: EBDetId.h:155
DCCDataUnpacker::getChannelValue
uint16_t getChannelValue(const DetId &id) const
Definition: DCCDataUnpacker.cc:76
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
EcalRawToDigi::~EcalRawToDigi
~EcalRawToDigi() override
Definition: EcalRawToDigi.cc:510
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DCCDataUnpacker::setEcalPSsCollection
void setEcalPSsCollection(std::unique_ptr< EcalPSInputDigiCollection > *x)
Definition: DCCDataUnpacker.h:82
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
DCCDataUnpacker::electronicsMapper
const EcalElectronicsMapper * electronicsMapper() const
Definition: DCCDataUnpacker.h:165
EcalElectronicsId::stripId
int stripId() const
get the tower id
Definition: EcalElectronicsId.h:35
EcalRawToDigi::watcher_
edm::ESWatcher< EcalMappingRcd > watcher_
Definition: EcalRawToDigi.h:66
EcalRawToDigi::first_
bool first_
Definition: EcalRawToDigi.h:86
EcalElectronicsMapper::deletePointers
void deletePointers()
Definition: EcalElectronicsMapper.cc:198
edm::Event
Definition: Event.h:73
EcalRawToDigi::feIdCheck_
bool feIdCheck_
Definition: EcalRawToDigi.h:84
EcalElectronicsId::xtalId
int xtalId() const
get the channel id
Definition: EcalElectronicsId.h:37
DCCDataUnpacker::setEBSrFlagsCollection
void setEBSrFlagsCollection(std::unique_ptr< EBSrFlagCollection > *x)
Definition: DCCDataUnpacker.h:76
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:29
edm::InputTag
Definition: InputTag.h:15
EcalRawToDigi::numbTriggerTSamples_
unsigned int numbTriggerTSamples_
Definition: EcalRawToDigi.h:76
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DCCDataUnpacker::setEcalTpsCollection
void setEcalTpsCollection(std::unique_ptr< EcalTrigPrimDigiCollection > *x)
Definition: DCCDataUnpacker.h:80