CMS 3D CMS Logo

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