![]() |
![]() |
#include <EventFilter/EcalRawToDigi/interface/EcalRawToRecHitLazyUnpacker.h>
Public Types | |
typedef edm::LazyUnpacker < EcalRecHit > | Base |
typedef edm::DetSet< EcalRecHit > | DetSet |
Public Member Functions | |
EcalRawToRecHitLazyUnpacker (const EcalRegionCabling &cable, const EcalUnpackerWorker &worker, const FEDRawDataCollection &fedcollection) | |
virtual void | fill (const uint32_t &, record_type &) |
virtual | ~EcalRawToRecHitLazyUnpacker () |
Private Attributes | |
const EcalRegionCabling * | cabling_ |
std::map< uint32_t, std::auto_ptr < EcalRecHitCollection > > | cachedRecHits |
const FEDRawDataCollection * | raw_ |
const EcalUnpackerWorker * | worker_ |
Definition at line 12 of file EcalRawToRecHitLazyUnpacker.h.
Definition at line 16 of file EcalRawToRecHitLazyUnpacker.h.
Definition at line 15 of file EcalRawToRecHitLazyUnpacker.h.
EcalRawToRecHitLazyUnpacker::EcalRawToRecHitLazyUnpacker | ( | const EcalRegionCabling & | cable, | |
const EcalUnpackerWorker & | worker, | |||
const FEDRawDataCollection & | fedcollection | |||
) |
Definition at line 5 of file EcalRawToRecHitLazyUnpacker.cc.
References FEDNumbering::getEcalFEDIds(), and LogDebug.
00007 : 00008 raw_(&fedcollection), cabling_(&cable), worker_(&worker) 00009 { 00010 LogDebug("EcalRawToRecHit|LazyUnpacker")<<"lazy unpacker created with a max of: " 00011 <<FEDNumbering::getEcalFEDIds().second-FEDNumbering::getEcalFEDIds().first+1 00012 <<" regions"; 00013 }
EcalRawToRecHitLazyUnpacker::~EcalRawToRecHitLazyUnpacker | ( | ) | [virtual] |
void EcalRawToRecHitLazyUnpacker::fill | ( | const uint32_t & | i, | |
record_type & | rec | |||
) | [virtual] |
Definition at line 18 of file EcalRawToRecHitLazyUnpacker.cc.
References cachedRecHits, f, LogDebug, raw_, EcalUnpackerWorker::work(), and worker_.
00018 { 00019 LogDebug("EcalRawToRecHit|LazyUnpacker")<<"filling for index: "<<i; 00020 00021 std::map<uint32_t, std::auto_ptr<EcalRecHitCollection> > ::iterator f= cachedRecHits.find(i); 00022 if (f==cachedRecHits.end()){ 00023 LogDebug("EcalRawToRecHit|LazyUnpacker")<<"needs to be unpacked."; 00024 //need to unpack 00025 00026 LogDebug("EcalRawToRecHit|LazyUnpacker")<<"calling the worker to work on that index: "<<i; 00027 std::auto_ptr< EcalRecHitCollection > rechits = worker_->work(i, *raw_); 00028 00029 LogDebug("EcalRawToRecHit|LazyUnpacker")<<"inserting: "<<rechits->size() <<" rechit(s) in the record."; 00030 rec.insert(rec.end(), rechits->begin(), rechits->end()); 00031 } 00032 }
const EcalRegionCabling* EcalRawToRecHitLazyUnpacker::cabling_ [private] |
Definition at line 31 of file EcalRawToRecHitLazyUnpacker.h.
std::map<uint32_t, std::auto_ptr<EcalRecHitCollection> > EcalRawToRecHitLazyUnpacker::cachedRecHits [private] |
const FEDRawDataCollection* EcalRawToRecHitLazyUnpacker::raw_ [private] |
const EcalUnpackerWorker* EcalRawToRecHitLazyUnpacker::worker_ [private] |