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  produces<EBDigiCollection>("ebDigis");
115  produces<EEDigiCollection>("eeDigis");
116  produces<EBSrFlagCollection>();
117  produces<EESrFlagCollection>();
118  produces<EcalRawDataCollection>();
119  produces<EcalPnDiodeDigiCollection>();
120  produces<EcalTrigPrimDigiCollection>("EcalTriggerPrimitives");
121  produces<EcalPSInputDigiCollection>("EcalPseudoStripInputs");
122 
123  // Integrity for xtal data
124  produces<EBDetIdCollection>("EcalIntegrityGainErrors");
125  produces<EBDetIdCollection>("EcalIntegrityGainSwitchErrors");
126  produces<EBDetIdCollection>("EcalIntegrityChIdErrors");
127 
128  // Integrity for xtal data - EE specific (to be rivisited towards EB+EE common collection)
129  produces<EEDetIdCollection>("EcalIntegrityGainErrors");
130  produces<EEDetIdCollection>("EcalIntegrityGainSwitchErrors");
131  produces<EEDetIdCollection>("EcalIntegrityChIdErrors");
132 
133  // Integrity Errors
134  produces<EcalElectronicsIdCollection>("EcalIntegrityTTIdErrors");
135  produces<EcalElectronicsIdCollection>("EcalIntegrityZSXtalIdErrors");
136  produces<EcalElectronicsIdCollection>("EcalIntegrityBlockSizeErrors");
137 
138  // Mem channels' integrity
139  produces<EcalElectronicsIdCollection>("EcalIntegrityMemTtIdErrors");
140  produces<EcalElectronicsIdCollection>("EcalIntegrityMemBlockSizeErrors");
141  produces<EcalElectronicsIdCollection>("EcalIntegrityMemChIdErrors");
142  produces<EcalElectronicsIdCollection>("EcalIntegrityMemGainErrors");
143 
144  dataToken_ = consumes<FEDRawDataCollection>(dataLabel);
145  if (REGIONAL_) {
146  fedsToken_ = consumes<EcalListOfFEDS>(fedsLabel);
147  }
148  chStatusToken_ = esConsumes<EcalChannelStatusMap, EcalChannelStatusRcd, edm::Transition::BeginRun>();
149  ecalMappingToken_ = esConsumes<EcalElectronicsMapping, EcalMappingRcd>();
150 
151  // Build a new Electronics mapper and parse default map file
153 
154  // in case of external tsext file (deprecated by HLT environment)
155  // bool readResult = myMap_->readDCCMapFile(conf.getParameter<std::string>("DCCMapFile",""));
156 
157  // use two arrays from cfg to establish DCCId:FedId. If they are empy, than use hard coded correspondence
159  // myMap::makeMapFromVectors() returns "true" always
160  // need to be fixed?
161 
162  if (!readResult) {
163  edm::LogWarning("IncorrectConfiguration") << "Arrays orderedFedList and orderedDCCIdList are emply. "
164  "Hard coded correspondence for DCCId:FedId will be used.";
165  // edm::LogError("EcalRawToDigi")<<"\n unable to read file : "
166  // <<conf.getParameter<std::string>("DCCMapFile");
167  }
168 
169  // Build a new ECAL DCC data unpacker
174  feUnpacking_,
176  syncCheck_,
177  feIdCheck_,
179 }

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 495 of file EcalRawToDigi.cc.

495  {
496  //cout << "EcalDCCUnpackingModule " << "N events " << (nevts_-1)<<endl;
497  //cout << "EcalDCCUnpackingModule " << " --- SETUP time " << endl;
498  //cout << "EcalDCCUnpackingModule " << "Time (sys) " << SETUP_TIME_ << endl;
499  //cout << "EcalDCCUnpackingModule " << "Time in sec. " << SETUP_TIME_/ CLOCKS_PER_SEC << endl;
500  //cout << "EcalDCCUnpackingModule " << " --- Per event " << endl;
501 
502  //RUNNING_TIME_ = RUNNING_TIME_ / (nevts_-1);
503 
504  //cout << "EcalDCCUnpackingModule "<< "Time (sys) " << RUNNING_TIME_ << endl;
505  //cout << "EcalDCCUnpackingModule "<< "Time in sec. " << RUNNING_TIME_ / CLOCKS_PER_SEC << endl;
506 
507  if (myMap_)
508  delete myMap_;
509  if (theUnpacker_)
510  delete theUnpacker_;
511 }

References myMap_, and theUnpacker_.

Member Function Documentation

◆ beginRun()

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

Definition at line 274 of file EcalRawToDigi.cc.

274  {
275  // channel status database
278 
279  // uncomment following line to print list of crystals with bad status
280  //edm::ESHandle<EcalElectronicsMapping> pEcalMapping;
281  //es.get<EcalMappingRcd>().get(pEcalMapping);
282  //const EcalElectronicsMapping* mapping = pEcalMapping.product();
283  //printStatusRecords(theUnpacker_, mapping);
284 }

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

◆ fillDescriptions()

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

Definition at line 230 of file EcalRawToDigi.cc.

230  {
232  desc.add<bool>("tccUnpacking", true);
233  desc.add<edm::InputTag>("FedLabel", edm::InputTag("listfeds"));
234  desc.add<bool>("srpUnpacking", true);
235  desc.add<bool>("syncCheck", true);
236  desc.add<bool>("feIdCheck", true);
237  desc.addUntracked<bool>("silentMode", true);
238  desc.add<edm::InputTag>("InputLabel", edm::InputTag("rawDataCollector"));
239  {
240  std::vector<int> temp1;
241  unsigned int nvec = 54;
242  temp1.reserve(nvec);
243  for (unsigned int i = 0; i < nvec; i++)
244  temp1.push_back(601 + i);
245  desc.add<std::vector<int> >("orderedFedList", temp1);
246  }
247  desc.add<bool>("eventPut", true);
248  desc.add<int>("numbTriggerTSamples", 1);
249  desc.add<int>("numbXtalTSamples", 10);
250  {
251  std::vector<int> temp1;
252  unsigned int nvec = 54;
253  temp1.reserve(nvec);
254  for (unsigned int i = 0; i < nvec; i++)
255  temp1.push_back(1 + i);
256  desc.add<std::vector<int> >("orderedDCCIdList", temp1);
257  }
258  {
259  std::vector<int> temp1;
260  unsigned int nvec = 54;
261  temp1.reserve(nvec);
262  for (unsigned int i = 0; i < nvec; i++)
263  temp1.push_back(601 + i);
264  desc.add<std::vector<int> >("FEDs", temp1);
265  }
266  desc.add<bool>("DoRegional", false);
267  desc.add<bool>("feUnpacking", true);
268  desc.add<bool>("forceToKeepFRData", false);
269  desc.add<bool>("headerUnpacking", true);
270  desc.add<bool>("memUnpacking", true);
271  descriptions.add("ecalRawToDigi", desc);
272 }

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 286 of file EcalRawToDigi.cc.

286  {
287  //double TIME_START = clock();
288  //nevts_++; //NUNO
289 
290  if (first_) {
291  watcher_.check(es);
292  edm::ESHandle<EcalElectronicsMapping> ecalmapping = es.getHandle(ecalMappingToken_);
293  myMap_->setEcalElectronicsMapping(ecalmapping.product());
294 
295  first_ = false;
296 
297  } else {
298  if (watcher_.check(es)) {
299  edm::ESHandle<EcalElectronicsMapping> ecalmapping = es.getHandle(ecalMappingToken_);
302  myMap_->setEcalElectronicsMapping(ecalmapping.product());
303  }
304  }
305 
306  // Get list of FEDS :
307  std::vector<int> FEDS_to_unpack;
308  if (REGIONAL_) {
309  edm::Handle<EcalListOfFEDS> listoffeds;
310  e.getByToken(fedsToken_, listoffeds);
311  FEDS_to_unpack = listoffeds->GetList();
312  }
313 
314  // Step A: Get Inputs
315 
317  e.getByToken(dataToken_, rawdata);
318 
319  // Step B: encapsulate vectors in actual collections and set unpacker pointers
320 
321  // create the collection of Ecal Digis
322  auto productDigisEB = std::make_unique<EBDigiCollection>();
323  productDigisEB->reserve(1700);
324  theUnpacker_->setEBDigisCollection(&productDigisEB);
325 
326  // create the collection of Ecal Digis
327  auto productDigisEE = std::make_unique<EEDigiCollection>();
328  theUnpacker_->setEEDigisCollection(&productDigisEE);
329 
330  // create the collection for headers
331  auto productDccHeaders = std::make_unique<EcalRawDataCollection>();
332  theUnpacker_->setDccHeadersCollection(&productDccHeaders);
333 
334  // create the collection for invalid gains
335  auto productInvalidGains = std::make_unique<EBDetIdCollection>();
336  theUnpacker_->setInvalidGainsCollection(&productInvalidGains);
337 
338  // create the collection for invalid gain Switch
339  auto productInvalidGainsSwitch = std::make_unique<EBDetIdCollection>();
340  theUnpacker_->setInvalidGainsSwitchCollection(&productInvalidGainsSwitch);
341 
342  // create the collection for invalid chids
343  auto productInvalidChIds = std::make_unique<EBDetIdCollection>();
344  theUnpacker_->setInvalidChIdsCollection(&productInvalidChIds);
345 
347 
348  // create the collection for invalid gains
349  auto productInvalidEEGains = std::make_unique<EEDetIdCollection>();
350  theUnpacker_->setInvalidEEGainsCollection(&productInvalidEEGains);
351 
352  // create the collection for invalid gain Switch
353  auto productInvalidEEGainsSwitch = std::make_unique<EEDetIdCollection>();
354  theUnpacker_->setInvalidEEGainsSwitchCollection(&productInvalidEEGainsSwitch);
355 
356  // create the collection for invalid chids
357  auto productInvalidEEChIds = std::make_unique<EEDetIdCollection>();
358  theUnpacker_->setInvalidEEChIdsCollection(&productInvalidEEChIds);
359 
361 
362  // create the collection for EB srflags
363  auto productEBSrFlags = std::make_unique<EBSrFlagCollection>();
364  theUnpacker_->setEBSrFlagsCollection(&productEBSrFlags);
365 
366  // create the collection for EB srflags
367  auto productEESrFlags = std::make_unique<EESrFlagCollection>();
368  theUnpacker_->setEESrFlagsCollection(&productEESrFlags);
369 
370  // create the collection for ecal trigger primitives
371  auto productEcalTps = std::make_unique<EcalTrigPrimDigiCollection>();
372  theUnpacker_->setEcalTpsCollection(&productEcalTps);
374 
375  // create the collection for ecal trigger primitives
376  auto productEcalPSs = std::make_unique<EcalPSInputDigiCollection>();
377  theUnpacker_->setEcalPSsCollection(&productEcalPSs);
379 
380  // create the collection for invalid TTIds
381  auto productInvalidTTIds = std::make_unique<EcalElectronicsIdCollection>();
382  theUnpacker_->setInvalidTTIdsCollection(&productInvalidTTIds);
383 
384  // create the collection for invalid TTIds
385  auto productInvalidZSXtalIds = std::make_unique<EcalElectronicsIdCollection>();
386  theUnpacker_->setInvalidZSXtalIdsCollection(&productInvalidZSXtalIds);
387 
388  // create the collection for invalid BlockLengths
389  auto productInvalidBlockLengths = std::make_unique<EcalElectronicsIdCollection>();
390  theUnpacker_->setInvalidBlockLengthsCollection(&productInvalidBlockLengths);
391 
392  // MEMs Collections
393  // create the collection for the Pn Diode Digis
394  auto productPnDiodeDigis = std::make_unique<EcalPnDiodeDigiCollection>();
395  theUnpacker_->setPnDiodeDigisCollection(&productPnDiodeDigis);
396 
397  // create the collection for invalid Mem Tt id
398  auto productInvalidMemTtIds = std::make_unique<EcalElectronicsIdCollection>();
399  theUnpacker_->setInvalidMemTtIdsCollection(&productInvalidMemTtIds);
400 
401  // create the collection for invalid Mem Block Size
402  auto productInvalidMemBlockSizes = std::make_unique<EcalElectronicsIdCollection>();
403  theUnpacker_->setInvalidMemBlockSizesCollection(&productInvalidMemBlockSizes);
404 
405  // create the collection for invalid Mem Block Size
406  auto productInvalidMemChIds = std::make_unique<EcalElectronicsIdCollection>();
407  theUnpacker_->setInvalidMemChIdsCollection(&productInvalidMemChIds);
408 
409  // create the collection for invalid Mem Gain Errors
410  auto productInvalidMemGains = std::make_unique<EcalElectronicsIdCollection>();
411  theUnpacker_->setInvalidMemGainsCollection(&productInvalidMemGains);
412  // double TIME_START = clock();
413 
414  // Step C: unpack all requested FEDs
415  for (std::vector<int>::const_iterator i = fedUnpackList_.begin(); i != fedUnpackList_.end(); i++) {
416  if (REGIONAL_) {
417  std::vector<int>::const_iterator fed_it = find(FEDS_to_unpack.begin(), FEDS_to_unpack.end(), *i);
418  if (fed_it == FEDS_to_unpack.end())
419  continue;
420  }
421 
422  // get fed raw data and SM id
423  const FEDRawData& fedData = rawdata->FEDData(*i);
424  const size_t length = fedData.size();
425 
426  LogDebug("EcalRawToDigi") << "raw data length: " << length;
427  //if data size is not null interpret data
428  if (length >= EMPTYEVENTSIZE) {
429  if (myMap_->setActiveDCC(*i)) {
430  const int smId = myMap_->getActiveSM();
431  LogDebug("EcalRawToDigi") << "Getting FED = " << *i << "(SM = " << smId << ")"
432  << " data size is: " << length;
433 
434  const uint64_t* data = (uint64_t*)fedData.data();
435  theUnpacker_->unpack(data, length, smId, *i);
436 
437  LogDebug("EcalRawToDigi") << " in EE :" << productDigisEE->size() << " in EB :" << productDigisEB->size();
438  }
439  }
440 
441  } // loop on FEDs
442 
443  //if(nevts_>1){ //NUNO
444  // double TIME_END = clock(); //NUNO
445  // RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
446  // }
447 
448  // Add collections to the event
449 
450  if (put_) {
451  if (headerUnpacking_) {
452  e.put(std::move(productDccHeaders));
453  }
454 
455  if (feUnpacking_) {
456  productDigisEB->sort();
457  e.put(std::move(productDigisEB), "ebDigis");
458  productDigisEE->sort();
459  e.put(std::move(productDigisEE), "eeDigis");
460  e.put(std::move(productInvalidGains), "EcalIntegrityGainErrors");
461  e.put(std::move(productInvalidGainsSwitch), "EcalIntegrityGainSwitchErrors");
462  e.put(std::move(productInvalidChIds), "EcalIntegrityChIdErrors");
463  // EE (leaving for now the same names as in EB)
464  e.put(std::move(productInvalidEEGains), "EcalIntegrityGainErrors");
465  e.put(std::move(productInvalidEEGainsSwitch), "EcalIntegrityGainSwitchErrors");
466  e.put(std::move(productInvalidEEChIds), "EcalIntegrityChIdErrors");
467  // EE
468  e.put(std::move(productInvalidTTIds), "EcalIntegrityTTIdErrors");
469  e.put(std::move(productInvalidZSXtalIds), "EcalIntegrityZSXtalIdErrors");
470  e.put(std::move(productInvalidBlockLengths), "EcalIntegrityBlockSizeErrors");
471  e.put(std::move(productPnDiodeDigis));
472  }
473  if (memUnpacking_) {
474  e.put(std::move(productInvalidMemTtIds), "EcalIntegrityMemTtIdErrors");
475  e.put(std::move(productInvalidMemBlockSizes), "EcalIntegrityMemBlockSizeErrors");
476  e.put(std::move(productInvalidMemChIds), "EcalIntegrityMemChIdErrors");
477  e.put(std::move(productInvalidMemGains), "EcalIntegrityMemGainErrors");
478  }
479  if (srpUnpacking_) {
480  e.put(std::move(productEBSrFlags));
481  e.put(std::move(productEESrFlags));
482  }
483  if (tccUnpacking_) {
484  e.put(std::move(productEcalTps), "EcalTriggerPrimitives");
485  e.put(std::move(productEcalPSs), "EcalPseudoStripInputs");
486  }
487  }
488 
489  //if(nevts_>1){ //NUNO
490  // double TIME_END = clock(); //NUNO
491  // RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
492  //}
493 }

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:89287
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:223
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:148
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