CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/EventFilter/ESRawToDigi/interface/ESUnpackerWorker.h

Go to the documentation of this file.
00001 #ifndef ESUnpackerWorker_H
00002 #define ESUnpackerWorker_H
00003 
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
00006 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 
00010 #include "EventFilter/EcalRawToDigi/interface/EcalUnpackerWorkerRecord.h"
00011 #include "EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h"
00012 
00013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00014 
00015 #include "EventFilter/EcalRawToDigi/interface/MyWatcher.h"
00016 #include "EventFilter/EcalRawToDigi/interface/EcalUnpackerWorkerBase.h"
00017 
00018 #include "EventFilter/ESRawToDigi/interface/ESUnpacker.h"
00019 #include "RecoLocalCalo/EcalRecProducers/plugins/ESRecHitWorker.h"
00020 
00021 //forward declaration. just to be friend
00022 class EcalRawToRecHitByproductProducer;
00023 
00024 class ESUnpackerWorker :public EcalUnpackerWorkerBase { 
00025  public:
00026 
00027   ESUnpackerWorker(const edm::ParameterSet & conf);
00028   
00029   ~ESUnpackerWorker();
00030   
00031   // the method that does it all
00032   std::auto_ptr<EcalRecHitCollection> work(const uint32_t & i, const FEDRawDataCollection&) const;
00033   
00034   // method to set things up once per event
00035   void update(const edm::Event & e) const;
00036   
00037   void write(edm::Event &e) const;
00038 
00039   void setHandles(const EcalUnpackerWorkerRecord & iRecord);
00040   void set(const edm::EventSetup & es) const;
00041 
00042   unsigned int maxElementIndex() const { return EcalRegionCabling::maxESElementIndex();}
00043   
00044  private:
00045   
00046   ESUnpacker* ESUnpacker_;
00047   ESRecHitWorkerBaseClass * RHWorker_;
00048 
00049 };
00050 
00051 
00052 #endif