CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
EcalRawToDigi Class Reference

#include <EcalRawToDigi.h>

Inheritance diagram for EcalRawToDigi:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginRun (edm::Run &run, const edm::EventSetup &es)
 
 EcalRawToDigi (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
virtual ~EcalRawToDigi ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Public Attributes

edm::ESWatcher< EcalMappingRcdwatcher_
 

Private Attributes

edm::InputTag dataLabel_
 
edm::InputTag fedsLabel_
 
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::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 42 of file EcalRawToDigi.h.

Constructor & Destructor Documentation

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

Class constructor

Definition at line 13 of file EcalRawToDigi.cc.

References fedUnpackList_, feIdCheck_, feUnpacking_, first_, forceToKeepFRdata_, edm::ParameterSet::getUntrackedParameter(), headerUnpacking_, i, LogDebug, FEDNumbering::MAXECALFEDID, memUnpacking_, FEDNumbering::MINECALFEDID, myMap_, numbTriggerTSamples_, numbXtalTSamples_, orderedDCCIdList_, orderedFedUnpackList_, convertSQLitetoXML_cfg::output, DCCDataUnpacker::silentMode_, srpUnpacking_, syncCheck_, tccUnpacking_, and theUnpacker_.

13  :
14 
15  //define the list of FED to be unpacked
16  fedUnpackList_(conf.getParameter<std::vector<int> >("FEDs")),
17 
18  //define the ordered FED list
19  orderedFedUnpackList_(conf.getParameter<std::vector<int> >("orderedFedList")),
20 
21  //define the ordered DCCId list
22  orderedDCCIdList_(conf.getParameter<std::vector<int> >("orderedDCCIdList")),
23 
24  //get number of Xtal Time Samples
25  numbXtalTSamples_(conf.getParameter<int>("numbXtalTSamples")),
26 
27  //Get number of Trigger Time Samples
28  numbTriggerTSamples_(conf.getParameter<int>("numbTriggerTSamples")),
29 
30  //See if header unpacking is enabled
31  headerUnpacking_(conf.getParameter<bool>("headerUnpacking")),
32 
33  //See if srp unpacking is enabled
34  srpUnpacking_(conf.getParameter<bool>("srpUnpacking")),
35 
36  //See if tcc unpacking is enabled
37  tccUnpacking_(conf.getParameter<bool>("tccUnpacking")),
38 
39  //See if fe unpacking is enabled
40  feUnpacking_(conf.getParameter<bool>("feUnpacking")),
41 
42  //See if fe unpacking is enabled for mem box
43  memUnpacking_(conf.getParameter<bool>("memUnpacking")),
44 
45  //See if syncCheck is enabled
46  syncCheck_(conf.getParameter<bool>("syncCheck")),
47 
48  //See if feIdCheck is enabled
49  feIdCheck_(conf.getParameter<bool>("feIdCheck")),
50 
51  // See if we want to keep data even if we have a mismatch between SR decision and block length
52  forceToKeepFRdata_(conf.getParameter<bool>("forceToKeepFRData")),
53 
54 
55  put_(conf.getParameter<bool>("eventPut")),
56 
57  dataLabel_(conf.getParameter<edm::InputTag>("InputLabel")),
58 
59  REGIONAL_(conf.getParameter<bool>("DoRegional")),
60 
61  fedsLabel_(conf.getParameter<edm::InputTag>("FedLabel")),
62 
63  myMap_(0),
64 
65  theUnpacker_(0)
66 
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_.size()!=0){
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")
108  <<"\n ECAL RawToDigi configuration:"
109  <<"\n Header unpacking is "<<headerUnpacking_
110  <<"\n SRP Bl. unpacking is "<<srpUnpacking_
111  <<"\n TCC Bl. unpacking is "<<tccUnpacking_
112  <<"\n FE Bl. unpacking is "<<feUnpacking_
113  <<"\n MEM Bl. unpacking is "<<memUnpacking_
114  <<"\n sync check is "<<syncCheck_
115  <<"\n feID check is "<<feIdCheck_
116  <<"\n force keep FR data is "<<forceToKeepFRdata_
117  <<"\n";
118 
119 
120  // Producer products :
121  produces<EBDigiCollection>("ebDigis");
122  produces<EEDigiCollection>("eeDigis");
123  produces<EBSrFlagCollection>();
124  produces<EESrFlagCollection>();
125  produces<EcalRawDataCollection>();
126  produces<EcalPnDiodeDigiCollection>();
127  produces<EcalTrigPrimDigiCollection>("EcalTriggerPrimitives");
128  produces<EcalPSInputDigiCollection>("EcalPseudoStripInputs");
129 
130  // Integrity for xtal data
131  produces<EBDetIdCollection>("EcalIntegrityGainErrors");
132  produces<EBDetIdCollection>("EcalIntegrityGainSwitchErrors");
133  produces<EBDetIdCollection>("EcalIntegrityChIdErrors");
134 
135  // Integrity for xtal data - EE specific (to be rivisited towards EB+EE common collection)
136  produces<EEDetIdCollection>("EcalIntegrityGainErrors");
137  produces<EEDetIdCollection>("EcalIntegrityGainSwitchErrors");
138  produces<EEDetIdCollection>("EcalIntegrityChIdErrors");
139 
140  // Integrity Errors
141  produces<EcalElectronicsIdCollection>("EcalIntegrityTTIdErrors");
142  produces<EcalElectronicsIdCollection>("EcalIntegrityZSXtalIdErrors");
143  produces<EcalElectronicsIdCollection>("EcalIntegrityBlockSizeErrors");
144 
145  // Mem channels' integrity
146  produces<EcalElectronicsIdCollection>("EcalIntegrityMemTtIdErrors");
147  produces<EcalElectronicsIdCollection>("EcalIntegrityMemBlockSizeErrors");
148  produces<EcalElectronicsIdCollection>("EcalIntegrityMemChIdErrors");
149  produces<EcalElectronicsIdCollection>("EcalIntegrityMemGainErrors");
150 
151 
152 
153  // Build a new Electronics mapper and parse default map file
154  myMap_ = new EcalElectronicsMapper(numbXtalTSamples_,numbTriggerTSamples_);
155 
156  // in case of external text 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
160  bool readResult = myMap_->makeMapFromVectors(orderedFedUnpackList_, orderedDCCIdList_);
161  // myMap::makeMapFromVectors() returns "true" always
162  // need to be fixed?
163 
164  if(!readResult){
165  edm::LogWarning("IncorrectConfiguration")
166  << "Arrays orderedFedList and orderedDCCIdList are emply. "
167  "Hard coded correspondence for DCCId:FedId will be used.";
168  // edm::LogError("EcalRawToDigi")<<"\n unable to read file : "
169  // <<conf.getParameter<std::string>("DCCMapFile");
170  }
171 
172  // Build a new ECAL DCC data unpacker
174 
175 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
unsigned int numbXtalTSamples_
Definition: EcalRawToDigi.h:75
bool forceToKeepFRdata_
Definition: EcalRawToDigi.h:85
std::vector< int > orderedFedUnpackList_
Definition: EcalRawToDigi.h:72
static bool silentMode_
std::vector< int > fedUnpackList_
Definition: EcalRawToDigi.h:70
DCCDataUnpacker * theUnpacker_
unsigned int numbTriggerTSamples_
Definition: EcalRawToDigi.h:76
std::vector< int > orderedDCCIdList_
Definition: EcalRawToDigi.h:73
tuple conf
Definition: dbtoconf.py:185
bool headerUnpacking_
Definition: EcalRawToDigi.h:78
EcalElectronicsMapper * myMap_
Definition: EcalRawToDigi.h:98
edm::InputTag fedsLabel_
Definition: EcalRawToDigi.h:95
edm::InputTag dataLabel_
Definition: EcalRawToDigi.h:91
EcalRawToDigi::~EcalRawToDigi ( )
virtual

Class destructor

Definition at line 476 of file EcalRawToDigi.cc.

References myMap_, and theUnpacker_.

477 {
478 
479  //cout << "EcalDCCUnpackingModule " << "N events " << (nevts_-1)<<endl;
480  //cout << "EcalDCCUnpackingModule " << " --- SETUP time " << endl;
481  //cout << "EcalDCCUnpackingModule " << "Time (sys) " << SETUP_TIME_ << endl;
482  //cout << "EcalDCCUnpackingModule " << "Time in sec. " << SETUP_TIME_/ CLOCKS_PER_SEC << endl;
483  //cout << "EcalDCCUnpackingModule " << " --- Per event " << endl;
484 
485  //RUNNING_TIME_ = RUNNING_TIME_ / (nevts_-1);
486 
487  //cout << "EcalDCCUnpackingModule "<< "Time (sys) " << RUNNING_TIME_ << endl;
488  //cout << "EcalDCCUnpackingModule "<< "Time in sec. " << RUNNING_TIME_ / CLOCKS_PER_SEC << endl;
489 
490 
491 
492  if(myMap_ ) delete myMap_;
493  if(theUnpacker_) delete theUnpacker_;
494 
495 }
DCCDataUnpacker * theUnpacker_
EcalElectronicsMapper * myMap_
Definition: EcalRawToDigi.h:98

Member Function Documentation

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

Reimplemented from edm::EDProducer.

Definition at line 233 of file EcalRawToDigi.cc.

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

234 {
235  // channel status database
237  es.get<EcalChannelStatusRcd>().get(pChStatus);
239 
240  // uncomment following line to print list of crystals with bad status
241  //edm::ESHandle<EcalElectronicsMapping> pEcalMapping;
242  //es.get<EcalMappingRcd>().get(pEcalMapping);
243  //const EcalElectronicsMapping* mapping = pEcalMapping.product();
244  //printStatusRecords(theUnpacker_, mapping);
245 }
void setChannelStatusDB(const EcalChannelStatusMap *chdb)
DCCDataUnpacker * theUnpacker_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void EcalRawToDigi::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Functions that are called by framework at each event

Implements edm::EDProducer.

Definition at line 248 of file EcalRawToDigi.cc.

References edm::ESWatcher< T >::check(), FEDRawData::data(), data, dataLabel_, EMPTYEVENTSIZE, fedsLabel_, fedUnpackList_, feUnpacking_, spr::find(), first_, edm::EventSetup::get(), EcalElectronicsMapper::getActiveSM(), edm::Event::getByLabel(), headerUnpacking_, i, LogDebug, memUnpacking_, myMap_, edm::ESHandle< class >::product(), edm::Event::put(), put_, lumiPlot::rawdata, REGIONAL_, EcalElectronicsMapper::setActiveDCC(), DCCDataUnpacker::setDccHeadersCollection(), DCCDataUnpacker::setEBDigisCollection(), DCCDataUnpacker::setEBSrFlagsCollection(), 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_.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

249 {
250 
251  //double TIME_START = clock();
252  //nevts_++; //NUNO
253 
254 
255  if (first_) {
256  watcher_.check(es);
258  es.get< EcalMappingRcd >().get(ecalmapping);
259  myMap_ -> setEcalElectronicsMapping(ecalmapping.product());
260 
261  first_ = false;
262 
263  }else{
264 
265  if ( watcher_.check(es) ) {
267  es.get< EcalMappingRcd >().get(ecalmapping);
268  myMap_ -> deletePointers();
269  myMap_ -> resetPointers();
270  myMap_ -> setEcalElectronicsMapping(ecalmapping.product());
271  }
272 
273  }
274 
275  // Get list of FEDS :
276  std::vector<int> FEDS_to_unpack;
277  if (REGIONAL_) {
278  edm::Handle<EcalListOfFEDS> listoffeds;
279  e.getByLabel(fedsLabel_, listoffeds);
280  FEDS_to_unpack = listoffeds -> GetList();
281  }
282 
283 
284 
285  // Step A: Get Inputs
286 
288  e.getByLabel(dataLabel_,rawdata);
289 
290 
291  // Step B: encapsulate vectors in actual collections and set unpacker pointers
292 
293  // create the collection of Ecal Digis
294  std::auto_ptr<EBDigiCollection> productDigisEB(new EBDigiCollection);
295  productDigisEB->reserve(1700);
296  theUnpacker_->setEBDigisCollection(&productDigisEB);
297 
298  // create the collection of Ecal Digis
299  std::auto_ptr<EEDigiCollection> productDigisEE(new EEDigiCollection);
300  theUnpacker_->setEEDigisCollection(&productDigisEE);
301 
302  // create the collection for headers
303  std::auto_ptr<EcalRawDataCollection> productDccHeaders(new EcalRawDataCollection);
304  theUnpacker_->setDccHeadersCollection(&productDccHeaders);
305 
306  // create the collection for invalid gains
307  std::auto_ptr< EBDetIdCollection> productInvalidGains(new EBDetIdCollection);
308  theUnpacker_->setInvalidGainsCollection(&productInvalidGains);
309 
310  // create the collection for invalid gain Switch
311  std::auto_ptr< EBDetIdCollection> productInvalidGainsSwitch(new EBDetIdCollection);
312  theUnpacker_->setInvalidGainsSwitchCollection(&productInvalidGainsSwitch);
313 
314  // create the collection for invalid chids
315  std::auto_ptr< EBDetIdCollection> productInvalidChIds(new EBDetIdCollection);
316  theUnpacker_->setInvalidChIdsCollection(&productInvalidChIds);
317 
319 
320  // create the collection for invalid gains
321  std::auto_ptr<EEDetIdCollection> productInvalidEEGains(new EEDetIdCollection);
322  theUnpacker_->setInvalidEEGainsCollection(&productInvalidEEGains);
323 
324  // create the collection for invalid gain Switch
325  std::auto_ptr<EEDetIdCollection> productInvalidEEGainsSwitch(new EEDetIdCollection);
326  theUnpacker_->setInvalidEEGainsSwitchCollection(&productInvalidEEGainsSwitch);
327 
328  // create the collection for invalid chids
329  std::auto_ptr<EEDetIdCollection> productInvalidEEChIds(new EEDetIdCollection);
330  theUnpacker_->setInvalidEEChIdsCollection(&productInvalidEEChIds);
331 
333 
334  // create the collection for EB srflags
335  std::auto_ptr<EBSrFlagCollection> productEBSrFlags(new EBSrFlagCollection);
336  theUnpacker_->setEBSrFlagsCollection(&productEBSrFlags);
337 
338  // create the collection for EB srflags
339  std::auto_ptr<EESrFlagCollection> productEESrFlags(new EESrFlagCollection);
340  theUnpacker_->setEESrFlagsCollection(&productEESrFlags);
341 
342  // create the collection for ecal trigger primitives
343  std::auto_ptr<EcalTrigPrimDigiCollection> productEcalTps(new EcalTrigPrimDigiCollection);
344  theUnpacker_->setEcalTpsCollection(&productEcalTps);
346 
347  // create the collection for ecal trigger primitives
348  std::auto_ptr<EcalPSInputDigiCollection> productEcalPSs(new EcalPSInputDigiCollection);
349  theUnpacker_->setEcalPSsCollection(&productEcalPSs);
351 
352  // create the collection for invalid TTIds
353  std::auto_ptr<EcalElectronicsIdCollection> productInvalidTTIds(new EcalElectronicsIdCollection);
354  theUnpacker_->setInvalidTTIdsCollection(&productInvalidTTIds);
355 
356  // create the collection for invalid TTIds
357  std::auto_ptr<EcalElectronicsIdCollection> productInvalidZSXtalIds(new EcalElectronicsIdCollection);
358  theUnpacker_->setInvalidZSXtalIdsCollection(&productInvalidZSXtalIds);
359 
360 
361 
362  // create the collection for invalid BlockLengths
363  std::auto_ptr<EcalElectronicsIdCollection> productInvalidBlockLengths(new EcalElectronicsIdCollection);
364  theUnpacker_->setInvalidBlockLengthsCollection(&productInvalidBlockLengths);
365 
366  // MEMs Collections
367  // create the collection for the Pn Diode Digis
368  std::auto_ptr<EcalPnDiodeDigiCollection> productPnDiodeDigis(new EcalPnDiodeDigiCollection);
369  theUnpacker_->setPnDiodeDigisCollection(&productPnDiodeDigis);
370 
371  // create the collection for invalid Mem Tt id
372  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemTtIds(new EcalElectronicsIdCollection);
373  theUnpacker_->setInvalidMemTtIdsCollection(& productInvalidMemTtIds);
374 
375  // create the collection for invalid Mem Block Size
376  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemBlockSizes(new EcalElectronicsIdCollection);
377  theUnpacker_->setInvalidMemBlockSizesCollection(& productInvalidMemBlockSizes);
378 
379  // create the collection for invalid Mem Block Size
380  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemChIds(new EcalElectronicsIdCollection);
381  theUnpacker_->setInvalidMemChIdsCollection(& productInvalidMemChIds);
382 
383  // create the collection for invalid Mem Gain Errors
384  std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemGains(new EcalElectronicsIdCollection);
385  theUnpacker_->setInvalidMemGainsCollection(& productInvalidMemGains);
386  // double TIME_START = clock();
387 
388 
389  // Step C: unpack all requested FEDs
390  for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++) {
391 
392  if (REGIONAL_) {
393  std::vector<int>::const_iterator fed_it = find(FEDS_to_unpack.begin(), FEDS_to_unpack.end(), *i);
394  if (fed_it == FEDS_to_unpack.end()) continue;
395  }
396 
397 
398  // get fed raw data and SM id
399  const FEDRawData& fedData = rawdata->FEDData(*i);
400  const size_t length = fedData.size();
401 
402  LogDebug("EcalRawToDigi") << "raw data length: " << length ;
403  //if data size is not null interpret data
404  if ( length >= EMPTYEVENTSIZE ){
405 
406  if(myMap_->setActiveDCC(*i)){
407 
408  const int smId = myMap_->getActiveSM();
409  LogDebug("EcalRawToDigi") << "Getting FED = " << *i <<"(SM = "<<smId<<")"<<" data size is: " << length;
410 
411  const uint64_t* data = (uint64_t*) fedData.data();
412  theUnpacker_->unpack(data, length, smId, *i);
413 
414  LogDebug("EcalRawToDigi") <<" in EE :"<<productDigisEE->size()
415  <<" in EB :"<<productDigisEB->size();
416  }
417  }
418 
419  }// loop on FEDs
420 
421  //if(nevts_>1){ //NUNO
422  // double TIME_END = clock(); //NUNO
423  // RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
424  // }
425 
426 
427  // Add collections to the event
428 
429  if(put_){
430 
431  if( headerUnpacking_){
432  e.put(productDccHeaders);
433  }
434 
435  if(feUnpacking_){
436  productDigisEB->sort();
437  e.put(productDigisEB,"ebDigis");
438  productDigisEE->sort();
439  e.put(productDigisEE,"eeDigis");
440  e.put(productInvalidGains,"EcalIntegrityGainErrors");
441  e.put(productInvalidGainsSwitch, "EcalIntegrityGainSwitchErrors");
442  e.put(productInvalidChIds, "EcalIntegrityChIdErrors");
443  // EE (leaving for now the same names as in EB)
444  e.put(productInvalidEEGains,"EcalIntegrityGainErrors");
445  e.put(productInvalidEEGainsSwitch, "EcalIntegrityGainSwitchErrors");
446  e.put(productInvalidEEChIds, "EcalIntegrityChIdErrors");
447  // EE
448  e.put(productInvalidTTIds,"EcalIntegrityTTIdErrors");
449  e.put(productInvalidZSXtalIds,"EcalIntegrityZSXtalIdErrors");
450  e.put(productInvalidBlockLengths,"EcalIntegrityBlockSizeErrors");
451  e.put(productPnDiodeDigis);
452  }
453  if(memUnpacking_){
454  e.put(productInvalidMemTtIds,"EcalIntegrityMemTtIdErrors");
455  e.put(productInvalidMemBlockSizes,"EcalIntegrityMemBlockSizeErrors");
456  e.put(productInvalidMemChIds,"EcalIntegrityMemChIdErrors");
457  e.put(productInvalidMemGains,"EcalIntegrityMemGainErrors");
458  }
459  if(srpUnpacking_){
460  e.put(productEBSrFlags);
461  e.put(productEESrFlags);
462  }
463  if(tccUnpacking_){
464  e.put(productEcalTps,"EcalTriggerPrimitives");
465  e.put(productEcalPSs,"EcalPseudoStripInputs");
466  }
467  }
468 
469 //if(nevts_>1){ //NUNO
470 // double TIME_END = clock(); //NUNO
471 // RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
472 //}
473 
474 }
#define LogDebug(id)
void setPnDiodeDigisCollection(std::auto_ptr< EcalPnDiodeDigiCollection > *x)
edm::ESWatcher< EcalMappingRcd > watcher_
Definition: EcalRawToDigi.h:64
int i
Definition: DBlmapReader.cc:9
void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int smId, unsigned int fedId)
void setInvalidZSXtalIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidMemBlockSizesCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setDccHeadersCollection(std::auto_ptr< EcalRawDataCollection > *x)
void setEcalPSsCollection(std::auto_ptr< EcalPSInputDigiCollection > *x)
void setInvalidEEGainsSwitchCollection(std::auto_ptr< EEDetIdCollection > *x)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void setEEDigisCollection(std::auto_ptr< EEDigiCollection > *x)
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
std::vector< int > fedUnpackList_
Definition: EcalRawToDigi.h:70
DCCDataUnpacker * theUnpacker_
void setInvalidMemTtIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setEBSrFlagsCollection(std::auto_ptr< EBSrFlagCollection > *x)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool setActiveDCC(unsigned int dccId)
void setEBDigisCollection(std::auto_ptr< EBDigiCollection > *x)
void setInvalidMemGainsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidGainsCollection(std::auto_ptr< EBDetIdCollection > *x)
void setInvalidEEChIdsCollection(std::auto_ptr< EEDetIdCollection > *x)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void setInvalidTTIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
bool headerUnpacking_
Definition: EcalRawToDigi.h:78
void setInvalidGainsSwitchCollection(std::auto_ptr< EBDetIdCollection > *x)
unsigned long long uint64_t
Definition: Time.h:15
void setEESrFlagsCollection(std::auto_ptr< EESrFlagCollection > *x)
T const * product() const
Definition: ESHandle.h:62
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:59
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
void setEcalTpsCollection(std::auto_ptr< EcalTrigPrimDigiCollection > *x)
void setInvalidMemChIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidBlockLengthsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
dictionary rawdata
Definition: lumiPlot.py:393
void setInvalidEEGainsCollection(std::auto_ptr< EEDetIdCollection > *x)
EcalElectronicsMapper * myMap_
Definition: EcalRawToDigi.h:98
edm::InputTag fedsLabel_
Definition: EcalRawToDigi.h:95
edm::InputTag dataLabel_
Definition: EcalRawToDigi.h:91
void setInvalidChIdsCollection(std::auto_ptr< EBDetIdCollection > *x)

Member Data Documentation

edm::InputTag EcalRawToDigi::dataLabel_
private

Definition at line 91 of file EcalRawToDigi.h.

Referenced by produce().

edm::InputTag EcalRawToDigi::fedsLabel_
private

Definition at line 95 of file EcalRawToDigi.h.

Referenced by produce().

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

Definition at line 70 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

bool EcalRawToDigi::feIdCheck_
private

Definition at line 84 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

bool EcalRawToDigi::feUnpacking_
private

Definition at line 81 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

bool EcalRawToDigi::first_
private

Definition at line 86 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

bool EcalRawToDigi::forceToKeepFRdata_
private

Definition at line 85 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

bool EcalRawToDigi::headerUnpacking_
private

Definition at line 78 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

bool EcalRawToDigi::memUnpacking_
private

Definition at line 82 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

EcalElectronicsMapper* EcalRawToDigi::myMap_
private

Definition at line 98 of file EcalRawToDigi.h.

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

unsigned int EcalRawToDigi::nevts_
private

Definition at line 103 of file EcalRawToDigi.h.

unsigned int EcalRawToDigi::numbTriggerTSamples_
private

Definition at line 76 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

unsigned int EcalRawToDigi::numbXtalTSamples_
private

Definition at line 75 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

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

Definition at line 73 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

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

Definition at line 72 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

bool EcalRawToDigi::put_
private

Definition at line 87 of file EcalRawToDigi.h.

Referenced by produce().

bool EcalRawToDigi::REGIONAL_
private

Definition at line 94 of file EcalRawToDigi.h.

Referenced by produce().

double EcalRawToDigi::RUNNING_TIME_
private

Definition at line 104 of file EcalRawToDigi.h.

double EcalRawToDigi::SETUP_TIME_
private

Definition at line 104 of file EcalRawToDigi.h.

bool EcalRawToDigi::srpUnpacking_
private

Definition at line 79 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

bool EcalRawToDigi::syncCheck_
private

Definition at line 83 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi().

bool EcalRawToDigi::tccUnpacking_
private

Definition at line 80 of file EcalRawToDigi.h.

Referenced by EcalRawToDigi(), and produce().

DCCDataUnpacker* EcalRawToDigi::theUnpacker_
private

Definition at line 101 of file EcalRawToDigi.h.

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

edm::ESWatcher<EcalMappingRcd> EcalRawToDigi::watcher_

Definition at line 64 of file EcalRawToDigi.h.

Referenced by produce().