CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
EcalRawToDigi Class Reference

#include <EcalRawToDigi.h>

Inheritance diagram for EcalRawToDigi:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &es) override
 
 EcalRawToDigi (const edm::ParameterSet &ps)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~EcalRawToDigi () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Public Attributes

edm::ESWatcher< EcalMappingRcdwatcher_
 

Private Attributes

edm::ESGetToken< EcalChannelStatusMap, EcalChannelStatusRcdchStatusToken_
 
edm::EDGetTokenT< FEDRawDataCollectiondataToken_
 
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdecalMappingToken_
 
edm::EDGetTokenT< EcalListOfFEDSfedsToken_
 
std::vector< int > fedUnpackList_
 
bool feIdCheck_
 
bool feUnpacking_
 
bool first_
 
bool forceToKeepFRdata_
 
bool headerUnpacking_
 
bool memUnpacking_
 
EcalElectronicsMappermyMap_
 
unsigned int nevts_
 
unsigned int numbTriggerTSamples_
 
unsigned int numbXtalTSamples_
 
std::vector< int > orderedDCCIdList_
 
std::vector< int > orderedFedUnpackList_
 
bool put_
 
bool REGIONAL_
 
double RUNNING_TIME_
 
double SETUP_TIME_
 
bool srpUnpacking_
 
bool syncCheck_
 
bool tccUnpacking_
 
DCCDataUnpackertheUnpacker_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 45 of file EcalRawToDigi.h.

Constructor & Destructor Documentation

◆ EcalRawToDigi()

EcalRawToDigi::EcalRawToDigi ( const edm::ParameterSet ps)
explicit

Class constructor

Definition at line 14 of file EcalRawToDigi.cc.

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 }

References chStatusToken_, dataToken_, ecalMappingToken_, fedsToken_, fedUnpackList_, feIdCheck_, feUnpacking_, first_, forceToKeepFRdata_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), headerUnpacking_, mps_fire::i, LogDebug, EcalElectronicsMapper::makeMapFromVectors(), FEDNumbering::MAXECALFEDID, memUnpacking_, FEDNumbering::MINECALFEDID, myMap_, numbTriggerTSamples_, numbXtalTSamples_, orderedDCCIdList_, orderedFedUnpackList_, convertSQLitetoXML_cfg::output, REGIONAL_, DCCDataUnpacker::silentMode_, srpUnpacking_, syncCheck_, tccUnpacking_, and theUnpacker_.

◆ ~EcalRawToDigi()

EcalRawToDigi::~EcalRawToDigi ( )
override

Class destructor

Definition at line 510 of file EcalRawToDigi.cc.

510  {
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 }

References myMap_, and theUnpacker_.

Member Function Documentation

◆ beginRun()

void EcalRawToDigi::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
override

Definition at line 289 of file EcalRawToDigi.cc.

289  {
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 }

References chStatusToken_, edm::EventSetup::getHandle(), edm::ESHandle< T >::product(), DCCDataUnpacker::setChannelStatusDB(), and theUnpacker_.

◆ fillDescriptions()

void EcalRawToDigi::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 245 of file EcalRawToDigi.cc.

245  {
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 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, mps_fire::i, and HLT_FULL_cff::InputTag.

◆ produce()

void EcalRawToDigi::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Functions that are called by framework at each event

Definition at line 301 of file EcalRawToDigi.cc.

301  {
302  //double TIME_START = clock();
303  //nevts_++; //NUNO
304 
305  if (first_) {
306  watcher_.check(es);
307  edm::ESHandle<EcalElectronicsMapping> ecalmapping = es.getHandle(ecalMappingToken_);
308  myMap_->setEcalElectronicsMapping(ecalmapping.product());
309 
310  first_ = false;
311 
312  } else {
313  if (watcher_.check(es)) {
314  edm::ESHandle<EcalElectronicsMapping> ecalmapping = es.getHandle(ecalMappingToken_);
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 }

References edm::ESWatcher< T >::check(), FEDRawData::data(), data, dataToken_, EcalElectronicsMapper::deletePointers(), MillePedeFileConverter_cfg::e, ecalMappingToken_, EMPTYEVENTSIZE, FEDRawDataCollection::FEDData(), fedsToken_, fedUnpackList_, feUnpacking_, spr::find(), first_, EcalElectronicsMapper::getActiveSM(), edm::EventSetup::getHandle(), EcalListOfFEDS::GetList(), headerUnpacking_, mps_fire::i, LogDebug, memUnpacking_, eostools::move(), myMap_, edm::ESHandle< T >::product(), put_, REGIONAL_, EcalElectronicsMapper::resetPointers(), EcalElectronicsMapper::setActiveDCC(), DCCDataUnpacker::setDccHeadersCollection(), DCCDataUnpacker::setEBDigisCollection(), DCCDataUnpacker::setEBSrFlagsCollection(), EcalElectronicsMapper::setEcalElectronicsMapping(), DCCDataUnpacker::setEcalPSsCollection(), DCCDataUnpacker::setEcalTpsCollection(), DCCDataUnpacker::setEEDigisCollection(), DCCDataUnpacker::setEESrFlagsCollection(), DCCDataUnpacker::setInvalidBlockLengthsCollection(), DCCDataUnpacker::setInvalidChIdsCollection(), DCCDataUnpacker::setInvalidEEChIdsCollection(), DCCDataUnpacker::setInvalidEEGainsCollection(), DCCDataUnpacker::setInvalidEEGainsSwitchCollection(), DCCDataUnpacker::setInvalidGainsCollection(), DCCDataUnpacker::setInvalidGainsSwitchCollection(), DCCDataUnpacker::setInvalidMemBlockSizesCollection(), DCCDataUnpacker::setInvalidMemChIdsCollection(), DCCDataUnpacker::setInvalidMemGainsCollection(), DCCDataUnpacker::setInvalidMemTtIdsCollection(), DCCDataUnpacker::setInvalidTTIdsCollection(), DCCDataUnpacker::setInvalidZSXtalIdsCollection(), DCCDataUnpacker::setPnDiodeDigisCollection(), FEDRawData::size(), srpUnpacking_, tccUnpacking_, theUnpacker_, DCCDataUnpacker::unpack(), and watcher_.

Member Data Documentation

◆ chStatusToken_

edm::ESGetToken<EcalChannelStatusMap, EcalChannelStatusRcd> EcalRawToDigi::chStatusToken_
private

Definition at line 91 of file EcalRawToDigi.h.

Referenced by beginRun(), and EcalRawToDigi().

◆ dataToken_

edm::EDGetTokenT<FEDRawDataCollection> EcalRawToDigi::dataToken_
private

Definition at line 89 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ ecalMappingToken_

edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> EcalRawToDigi::ecalMappingToken_
private

Definition at line 92 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ fedsToken_

edm::EDGetTokenT<EcalListOfFEDS> EcalRawToDigi::fedsToken_
private

Definition at line 90 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ fedUnpackList_

std::vector<int> EcalRawToDigi::fedUnpackList_
private

Definition at line 70 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ feIdCheck_

bool EcalRawToDigi::feIdCheck_
private

Definition at line 84 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ feUnpacking_

bool EcalRawToDigi::feUnpacking_
private

Definition at line 81 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ first_

bool EcalRawToDigi::first_
private

Definition at line 86 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ forceToKeepFRdata_

bool EcalRawToDigi::forceToKeepFRdata_
private

Definition at line 85 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ headerUnpacking_

bool EcalRawToDigi::headerUnpacking_
private

Definition at line 78 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ memUnpacking_

bool EcalRawToDigi::memUnpacking_
private

Definition at line 82 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ myMap_

EcalElectronicsMapper* EcalRawToDigi::myMap_
private

Definition at line 98 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), produce(), and ~EcalRawToDigi().

◆ nevts_

unsigned int EcalRawToDigi::nevts_
private

Definition at line 103 of file EcalRawToDigi.h.

◆ numbTriggerTSamples_

unsigned int EcalRawToDigi::numbTriggerTSamples_
private

Definition at line 76 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ numbXtalTSamples_

unsigned int EcalRawToDigi::numbXtalTSamples_
private

Definition at line 75 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ orderedDCCIdList_

std::vector<int> EcalRawToDigi::orderedDCCIdList_
private

Definition at line 73 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ orderedFedUnpackList_

std::vector<int> EcalRawToDigi::orderedFedUnpackList_
private

Definition at line 72 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ put_

bool EcalRawToDigi::put_
private

Definition at line 87 of file EcalRawToDigi.h.

Referenced by produce().

◆ REGIONAL_

bool EcalRawToDigi::REGIONAL_
private

Definition at line 95 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ RUNNING_TIME_

double EcalRawToDigi::RUNNING_TIME_
private

Definition at line 104 of file EcalRawToDigi.h.

◆ SETUP_TIME_

double EcalRawToDigi::SETUP_TIME_
private

Definition at line 104 of file EcalRawToDigi.h.

◆ srpUnpacking_

bool EcalRawToDigi::srpUnpacking_
private

Definition at line 79 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ syncCheck_

bool EcalRawToDigi::syncCheck_
private

Definition at line 83 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ tccUnpacking_

bool EcalRawToDigi::tccUnpacking_
private

Definition at line 80 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ theUnpacker_

DCCDataUnpacker* EcalRawToDigi::theUnpacker_
private

Definition at line 101 of file EcalRawToDigi.h.

Referenced by beginRun(), EcalRawToDigi(), produce(), and ~EcalRawToDigi().

◆ watcher_

edm::ESWatcher<EcalMappingRcd> EcalRawToDigi::watcher_

Definition at line 66 of file EcalRawToDigi.h.

Referenced by produce().

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:98
DCCDataUnpacker::setInvalidEEGainsSwitchCollection
void setInvalidEEGainsSwitchCollection(std::unique_ptr< EEDetIdCollection > *x)
Definition: DCCDataUnpacker.h:93
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
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
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
EcalListOfFEDS::GetList
std::vector< int > GetList() const
Definition: EcalListOfFEDS.h:10
EcalElectronicsMapper::makeMapFromVectors
bool makeMapFromVectors(std::vector< int > &, std::vector< int > &)
Definition: EcalElectronicsMapper.cc:314
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
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
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
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
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::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
edm::ESHandle
Definition: DTSurvey.h:22
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
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
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
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
DCCDataUnpacker::setInvalidTTIdsCollection
void setInvalidTTIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:98
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
DCCDataUnpacker::setInvalidMemBlockSizesCollection
void setInvalidMemBlockSizesCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:108
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
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
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
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
EcalRawToDigi::feIdCheck_
bool feIdCheck_
Definition: EcalRawToDigi.h:84
DCCDataUnpacker::setEBSrFlagsCollection
void setEBSrFlagsCollection(std::unique_ptr< EBSrFlagCollection > *x)
Definition: DCCDataUnpacker.h:76
edm::InputTag
Definition: InputTag.h:15
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44
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