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
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
176  feUnpacking_,
178  syncCheck_,
179  feIdCheck_,
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 }
ConfigurationDescriptions.h
EcalElectronicsMapper::setEcalElectronicsMapping
void setEcalElectronicsMapping(const EcalElectronicsMapping *)
Definition: EcalElectronicsMapper.cc:247
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
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:92
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:372
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
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:86
EcalRawToDigi::theUnpacker_
DCCDataUnpacker * theUnpacker_
Definition: EcalRawToDigi.h:95
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
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:276
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
edm::LogInfo
Definition: MessageLogger.h:254
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:69
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
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
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
EcalElectronicsMapper.h
EcalRawToDigi::tccUnpacking_
bool tccUnpacking_
Definition: EcalRawToDigi.h:76
EcalRawToDigi::dataToken_
edm::EDGetTokenT< FEDRawDataCollection > dataToken_
Definition: EcalRawToDigi.h:85
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:75
FEDRawData
Definition: FEDRawData.h:19
EcalRawToDigi::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EcalRawToDigi.cc:232
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
EcalRawToDigi::forceToKeepFRdata_
bool forceToKeepFRdata_
Definition: EcalRawToDigi.h:81
EMPTYEVENTSIZE
Definition: DCCRawDataDefinitions.h:13
DCCDataUnpacker::setInvalidGainsCollection
void setInvalidGainsCollection(std::unique_ptr< EBDetIdCollection > *x)
Definition: DCCDataUnpacker.h:84
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalRawToDigi::orderedFedUnpackList_
std::vector< int > orderedFedUnpackList_
Definition: EcalRawToDigi.h:68
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EEDetId::kSizeForDenseIndexing
Definition: EEDetId.h:329
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
edm::ESHandle
Definition: DTSurvey.h:22
EcalRawToDigi::EcalRawToDigi
EcalRawToDigi(const edm::ParameterSet &ps)
Definition: EcalRawToDigi.cc:18
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:83
EcalRawToDigi::numbXtalTSamples_
unsigned int numbXtalTSamples_
Definition: EcalRawToDigi.h:71
EcalRawToDigi::headerUnpacking_
bool headerUnpacking_
Definition: EcalRawToDigi.h:74
edm::LogWarning
Definition: MessageLogger.h:141
DCCDataUnpacker::setInvalidMemGainsCollection
void setInvalidMemGainsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:112
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
printStatusRecords
void printStatusRecords(const DCCDataUnpacker *unpacker, const EcalElectronicsMapping *mapping)
Definition: EcalRawToDigi.cc:185
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
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
EcalChannelStatusRcd
Definition: EcalChannelStatusRcd.h:5
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
EcalElectronicsMapping.h
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:289
DCCDataUnpacker::setInvalidMemBlockSizesCollection
void setInvalidMemBlockSizesCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:108
edm::EventSetup
Definition: EventSetup.h:57
EcalRawToDigi::REGIONAL_
bool REGIONAL_
Definition: EcalRawToDigi.h:89
DCCDataUnpacker::setInvalidMemTtIdsCollection
void setInvalidMemTtIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:106
get
#define get
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
EcalRawToDigi::feUnpacking_
bool feUnpacking_
Definition: EcalRawToDigi.h:77
EcalElectronicsMapper
Definition: EcalElectronicsMapper.h:36
EcalRawToDigi::memUnpacking_
bool memUnpacking_
Definition: EcalRawToDigi.h:78
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalRawToDigi::fedUnpackList_
std::vector< int > fedUnpackList_
Definition: EcalRawToDigi.h:66
EcalRawToDigi::syncCheck_
bool syncCheck_
Definition: EcalRawToDigi.h:79
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
DCCDataUnpacker::getChannelValue
uint16_t getChannelValue(const DetId &id) const
Definition: DCCDataUnpacker.cc:76
EventSetup.h
EBDetId::kSizeForDenseIndexing
Definition: EBDetId.h:155
EcalRawToDigi::~EcalRawToDigi
~EcalRawToDigi() override
Definition: EcalRawToDigi.cc:500
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:62
EcalRawToDigi::first_
bool first_
Definition: EcalRawToDigi.h:82
EcalElectronicsMapper::deletePointers
void deletePointers()
Definition: EcalElectronicsMapper.cc:198
edm::Event
Definition: Event.h:73
EcalRawToDigi::feIdCheck_
bool feIdCheck_
Definition: EcalRawToDigi.h:80
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:28
EcalChannelStatus.h
edm::InputTag
Definition: InputTag.h:15
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44
EcalChannelStatusRcd.h
EcalRawToDigi::numbTriggerTSamples_
unsigned int numbTriggerTSamples_
Definition: EcalRawToDigi.h:72
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DCCDataUnpacker::setEcalTpsCollection
void setEcalTpsCollection(std::unique_ptr< EcalTrigPrimDigiCollection > *x)
Definition: DCCDataUnpacker.h:80