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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Public Attributes

edm::ESWatcher< EcalMappingRcdwatcher_
 

Private Attributes

edm::EDGetTokenT< FEDRawDataCollectiondataToken_
 
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 41 of file EcalRawToDigi.h.

Constructor & Destructor Documentation

◆ EcalRawToDigi()

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

Class constructor

Definition at line 18 of file EcalRawToDigi.cc.

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 }

References dataToken_, 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 500 of file EcalRawToDigi.cc.

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

References myMap_, and theUnpacker_.

Member Function Documentation

◆ beginRun()

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

Definition at line 276 of file EcalRawToDigi.cc.

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

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

◆ fillDescriptions()

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

Definition at line 232 of file EcalRawToDigi.cc.

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

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), mps_fire::i, and HLT_2018_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 289 of file EcalRawToDigi.cc.

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

References edm::ESWatcher< T >::check(), FEDRawData::data(), data, dataToken_, EcalElectronicsMapper::deletePointers(), MillePedeFileConverter_cfg::e, EMPTYEVENTSIZE, FEDRawDataCollection::FEDData(), fedsToken_, fedUnpackList_, feUnpacking_, spr::find(), first_, edm::EventSetup::get(), get, EcalElectronicsMapper::getActiveSM(), 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

◆ dataToken_

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

Definition at line 85 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ fedsToken_

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

Definition at line 86 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ fedUnpackList_

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

Definition at line 66 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ feIdCheck_

bool EcalRawToDigi::feIdCheck_
private

Definition at line 80 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ feUnpacking_

bool EcalRawToDigi::feUnpacking_
private

Definition at line 77 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ first_

bool EcalRawToDigi::first_
private

Definition at line 82 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ forceToKeepFRdata_

bool EcalRawToDigi::forceToKeepFRdata_
private

Definition at line 81 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ headerUnpacking_

bool EcalRawToDigi::headerUnpacking_
private

Definition at line 74 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ memUnpacking_

bool EcalRawToDigi::memUnpacking_
private

Definition at line 78 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ myMap_

EcalElectronicsMapper* EcalRawToDigi::myMap_
private

Definition at line 92 of file EcalRawToDigi.h.

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

◆ nevts_

unsigned int EcalRawToDigi::nevts_
private

Definition at line 97 of file EcalRawToDigi.h.

◆ numbTriggerTSamples_

unsigned int EcalRawToDigi::numbTriggerTSamples_
private

Definition at line 72 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ numbXtalTSamples_

unsigned int EcalRawToDigi::numbXtalTSamples_
private

Definition at line 71 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ orderedDCCIdList_

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

Definition at line 69 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ orderedFedUnpackList_

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

Definition at line 68 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ put_

bool EcalRawToDigi::put_
private

Definition at line 83 of file EcalRawToDigi.h.

Referenced by produce().

◆ REGIONAL_

bool EcalRawToDigi::REGIONAL_
private

Definition at line 89 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ RUNNING_TIME_

double EcalRawToDigi::RUNNING_TIME_
private

Definition at line 98 of file EcalRawToDigi.h.

◆ SETUP_TIME_

double EcalRawToDigi::SETUP_TIME_
private

Definition at line 98 of file EcalRawToDigi.h.

◆ srpUnpacking_

bool EcalRawToDigi::srpUnpacking_
private

Definition at line 75 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ syncCheck_

bool EcalRawToDigi::syncCheck_
private

Definition at line 79 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

◆ tccUnpacking_

bool EcalRawToDigi::tccUnpacking_
private

Definition at line 76 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

◆ theUnpacker_

DCCDataUnpacker* EcalRawToDigi::theUnpacker_
private

Definition at line 95 of file EcalRawToDigi.h.

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

◆ watcher_

edm::ESWatcher<EcalMappingRcd> EcalRawToDigi::watcher_

Definition at line 62 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:92
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: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
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
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
edm::LogInfo
Definition: MessageLogger.h:254
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
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::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::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
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: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
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
DCCDataUnpacker::setInvalidTTIdsCollection
void setInvalidTTIdsCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:98
DCCDataUnpacker::setInvalidMemBlockSizesCollection
void setInvalidMemBlockSizesCollection(std::unique_ptr< EcalElectronicsIdCollection > *x)
Definition: DCCDataUnpacker.h:108
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
eostools.move
def move(src, dest)
Definition: eostools.py:511
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
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:62
EcalRawToDigi::first_
bool first_
Definition: EcalRawToDigi.h:82
EcalElectronicsMapper::deletePointers
void deletePointers()
Definition: EcalElectronicsMapper.cc:198
EcalRawToDigi::feIdCheck_
bool feIdCheck_
Definition: EcalRawToDigi.h:80
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:72
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DCCDataUnpacker::setEcalTpsCollection
void setEcalTpsCollection(std::unique_ptr< EcalTrigPrimDigiCollection > *x)
Definition: DCCDataUnpacker.h:80