CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/EventFilter/EcalRawToDigi/src/EcalRawToRecHitLazyUnpacker.cc

Go to the documentation of this file.
00001 #include "EventFilter/EcalRawToDigi/interface/EcalRawToRecHitLazyUnpacker.h"
00002 
00003 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00004 
00005 EcalRawToRecHitLazyUnpacker::EcalRawToRecHitLazyUnpacker(const EcalRegionCabling & cable,
00006                                                          const EcalUnpackerWorkerBase & worker,
00007                                                          const FEDRawDataCollection& fedcollection):
00008   raw_(&fedcollection), cabling_(&cable), worker_(&worker)
00009 {
00010   LogDebug("EcalRawToRecHit|LazyUnpacker")<<"lazy unpacker created with a max of: "
00011                                           <<FEDNumbering::MAXECALFEDID-FEDNumbering::MINECALFEDID+1
00012                                           <<" regions";
00013 }
00014 
00015 EcalRawToRecHitLazyUnpacker::~EcalRawToRecHitLazyUnpacker(){
00016 }
00017 
00018 
00019 void EcalRawToRecHitLazyUnpacker::fill(const uint32_t & i, record_type & rec){
00020   LogDebug("EcalRawToRecHit|LazyUnpacker")<<"filling for index: "<<i;
00021 
00022   std::auto_ptr< EcalRecHitCollection > rechits = worker_->work(i, *raw_);
00023 
00024   LogDebug("EcalRawToRecHit|LazyUnpacker")<<"inserting: "<<rechits->size() <<" rechit(s) in the record.";
00025 
00026   rec.insert(rec.end(), rechits->begin(), rechits->end());
00027 }
00028