#include <ESUnpackerWorker.h>
Public Member Functions | |
ESUnpackerWorker (const edm::ParameterSet &conf) | |
unsigned int | maxElementIndex () const |
void | set (const edm::EventSetup &es) const |
void | setHandles (const EcalUnpackerWorkerRecord &iRecord) |
void | update (const edm::Event &e) const |
std::auto_ptr < EcalRecHitCollection > | work (const uint32_t &i, const FEDRawDataCollection &) const |
void | write (edm::Event &e) const |
~ESUnpackerWorker () | |
Private Attributes | |
ESUnpacker * | ESUnpacker_ |
ESRecHitWorkerBaseClass * | RHWorker_ |
Definition at line 24 of file ESUnpackerWorker.h.
ESUnpackerWorker::ESUnpackerWorker | ( | const edm::ParameterSet & | conf | ) |
Definition at line 6 of file ESUnpackerWorker.cc.
References ESUnpacker_, reco::get(), edm::ParameterSet::getParameter(), and RHWorker_.
{ edm::ParameterSet DCCpset = conf.getParameter<edm::ParameterSet>("DCCDataUnpacker"); ESUnpacker_ = new ESUnpacker(DCCpset); edm::ParameterSet RH = conf.getParameter<edm::ParameterSet>("RHAlgo"); std::string componentType = RH.getParameter<std::string>("Type"); RHWorker_ = ESRecHitWorkerFactory::get()->create(componentType, RH); }
ESUnpackerWorker::~ESUnpackerWorker | ( | ) |
Definition at line 17 of file ESUnpackerWorker.cc.
References ESUnpacker_, and RHWorker_.
{ delete ESUnpacker_; delete RHWorker_; }
unsigned int ESUnpackerWorker::maxElementIndex | ( | ) | const [inline, virtual] |
Reimplemented from EcalUnpackerWorkerBase.
Definition at line 42 of file ESUnpackerWorker.h.
References EcalRegionCabling::maxESElementIndex().
{ return EcalRegionCabling::maxESElementIndex();}
void ESUnpackerWorker::set | ( | const edm::EventSetup & | es | ) | const [virtual] |
Reimplemented from EcalUnpackerWorkerBase.
Definition at line 26 of file ESUnpackerWorker.cc.
References RHWorker_, and ESRecHitWorkerBaseClass::set().
void ESUnpackerWorker::setHandles | ( | const EcalUnpackerWorkerRecord & | iRecord | ) | [virtual] |
void ESUnpackerWorker::update | ( | const edm::Event & | e | ) | const [virtual] |
keep the event
Reimplemented from EcalUnpackerWorkerBase.
Definition at line 34 of file ESUnpackerWorker.cc.
References EcalUnpackerWorkerBase::evt.
{ evt=&e; }
std::auto_ptr< EcalRecHitCollection > ESUnpackerWorker::work | ( | const uint32_t & | i, |
const FEDRawDataCollection & | rawdata | ||
) | const [virtual] |
Reimplemented from EcalUnpackerWorkerBase.
Definition at line 40 of file ESUnpackerWorker.cc.
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), EcalRegionCabling::esFedIndex(), ESUnpacker_, EcalUnpackerWorkerBase::evt, FEDRawDataCollection::FEDData(), ESUnpacker::interpretRawData(), MyWatcher::lap(), LogDebug, RHWorker_, ESRecHitWorkerBaseClass::run(), and edm::SortedCollection< T, SORT >::size().
{ MyWatcher watcher("Worker"); LogDebug("ESRawToRecHit|Worker")<<"is going to work on index: "<<index <<watcher.lap(); int fedIndex = EcalRegionCabling::esFedIndex(index); const FEDRawData & fedData = rawdata.FEDData(fedIndex); //###### get the digi ####### ESRawDataCollection productDCC; ESLocalRawDataCollection productKCHIP; ESDigiCollection productdigis; ESUnpacker_->interpretRawData(fedIndex, fedData, productDCC, productKCHIP, productdigis); LogDebug("ESRawToRecHit|Worker")<<"unpacked "<<productdigis.size()<<" digis" <<watcher.lap(); //then make rechits ESDigiCollection::const_iterator beginDigiES = productdigis.begin(); ESDigiCollection::const_iterator endDigiES = productdigis.end(); std::auto_ptr< EcalRecHitCollection > ecalrechits( new EcalRecHitCollection ); ecalrechits->reserve(productdigis.size()); ESDigiCollection::const_iterator esIt=beginDigiES; for (;esIt!=endDigiES;++esIt){ RHWorker_->run( *evt, esIt, *ecalrechits ); } LogDebug("ESRawToRecHit|Worker")<<" made : "<<ecalrechits->size()<<" es rechits" <<watcher.lap(); return ecalrechits; }
void ESUnpackerWorker::write | ( | edm::Event & | e | ) | const [virtual] |
ESUnpacker* ESUnpackerWorker::ESUnpacker_ [private] |
Definition at line 46 of file ESUnpackerWorker.h.
Referenced by ESUnpackerWorker(), work(), and ~ESUnpackerWorker().
Definition at line 47 of file ESUnpackerWorker.h.
Referenced by ESUnpackerWorker(), set(), work(), and ~ESUnpackerWorker().