CMS 3D CMS Logo

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