CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/EventFilter/EcalRawToDigi/interface/EcalRawToRecHitLazyUnpacker.h

Go to the documentation of this file.
00001 #ifndef EcalRawToRecHitLazyUnpacker_H
00002 #define EcalRawToRecHitLazyUnpacker_H
00003 
00004 #include "DataFormats/Common/interface/LazyGetter.h"
00005 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
00006 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00007 #include "EventFilter/EcalRawToDigi/interface/EcalUnpackerWorkerBase.h"
00008 #include "EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h"
00009  
00010 #include "DataFormats/EcalRecHit/interface/EcalRecHitComparison.h"
00011 
00012 class EcalRawToRecHitLazyUnpacker : public edm::LazyUnpacker<EcalRecHit> {
00013  public:
00014 
00015   typedef edm::DetSet<EcalRecHit> DetSet;
00016   typedef edm::LazyUnpacker<EcalRecHit> Base;
00017 
00018   EcalRawToRecHitLazyUnpacker(const EcalRegionCabling & cable,
00019                               const EcalUnpackerWorkerBase & worker,
00020                               const FEDRawDataCollection& fedcollection);
00021   
00022   virtual ~EcalRawToRecHitLazyUnpacker();
00023 
00024   // mandatory for actual unpacking stuff
00025   virtual void fill(const uint32_t&, record_type &);
00026 
00027  private:
00028   
00029   const FEDRawDataCollection* raw_;
00030 
00031   const EcalRegionCabling* cabling_;
00032 
00033   const EcalUnpackerWorkerBase* worker_;
00034 
00035   //cache
00036   std::map<uint32_t, std::auto_ptr<EcalRecHitCollection> > cachedRecHits;
00037 };
00038 
00039 
00040 #endif