#include <EventFilter/SiStripRawToDigi/plugins/SiStripRawToClusters.h>
Public Types | |
typedef edm::LazyGetter < SiStripCluster > | LazyGetter |
typedef SiStripRawToClustersLazyUnpacker | LazyUnpacker |
typedef edm::RefGetter < SiStripCluster > | RefGetter |
typedef SiStripRegionCabling::SubDet | SubDet |
Public Member Functions | |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | beginRun (edm::Run &, const edm::EventSetup &) |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
SiStripRawToClusters (const edm::ParameterSet &) | |
~SiStripRawToClusters () | |
Private Member Functions | |
void | updateCabling (const edm::EventSetup &setup) |
Private Attributes | |
const SiStripRegionCabling * | cabling_ |
uint32_t | cacheId_ |
SiStripClusterizerFactory * | clusterizer_ |
std::string | productInstance_ |
std::string | productLabel_ |
Definition at line 20 of file SiStripRawToClusters.h.
Definition at line 24 of file SiStripRawToClusters.h.
Definition at line 26 of file SiStripRawToClusters.h.
Definition at line 25 of file SiStripRawToClusters.h.
Definition at line 27 of file SiStripRawToClusters.h.
SiStripRawToClusters::SiStripRawToClusters | ( | const edm::ParameterSet & | conf | ) |
Definition at line 14 of file SiStripRawToClusters.cc.
References clusterizer_, edm::isDebugEnabled(), LogTrace, and sistrip::mlRawToDigi_.
00014 : 00015 00016 productLabel_(conf.getUntrackedParameter<string>("ProductLabel","source")), 00017 productInstance_(conf.getUntrackedParameter<string>("ProductInstance","")), 00018 cabling_(0), 00019 cacheId_(0), 00020 clusterizer_(0) 00021 { 00022 if ( edm::isDebugEnabled() ) { 00023 LogTrace(mlRawToDigi_) 00024 << "[SiStripRawToClusters::" << __func__ << "]" 00025 << " Constructing object..."; 00026 } 00027 clusterizer_ = new SiStripClusterizerFactory(conf); 00028 produces<LazyGetter>(); 00029 }
SiStripRawToClusters::~SiStripRawToClusters | ( | ) |
Definition at line 31 of file SiStripRawToClusters.cc.
References clusterizer_, edm::isDebugEnabled(), LogTrace, and sistrip::mlRawToDigi_.
00031 { 00032 if (clusterizer_) { delete clusterizer_; } 00033 if ( edm::isDebugEnabled() ) { 00034 LogTrace(mlRawToDigi_) 00035 << "[SiStripRawToClusters::" << __func__ << "]" 00036 << " Destructing object..."; 00037 } 00038 }
void SiStripRawToClusters::beginJob | ( | const edm::EventSetup & | setup | ) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 40 of file SiStripRawToClusters.cc.
00040 { 00041 //@@ unstable behaviour if uncommented! 00042 //updateCabling( setup ); 00043 //clusterizer_->eventSetup(setup); 00044 }
void SiStripRawToClusters::beginRun | ( | edm::Run & | , | |
const edm::EventSetup & | setup | |||
) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 46 of file SiStripRawToClusters.cc.
References clusterizer_, SiStripClusterizerFactory::eventSetup(), and updateCabling().
00046 { 00047 updateCabling( setup ); 00048 clusterizer_->eventSetup(setup); 00049 }
void SiStripRawToClusters::produce | ( | edm::Event & | event, | |
const edm::EventSetup & | setup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 51 of file SiStripRawToClusters.cc.
References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, cabling_, clusterizer_, collection, SiStripClusterizerFactory::eventSetup(), SiStripRegionCabling::getRegionCabling(), productInstance_, productLabel_, and updateCabling().
00051 { 00052 00053 updateCabling( setup ); 00054 clusterizer_->eventSetup( setup ); 00055 00056 edm::Handle<FEDRawDataCollection> buffers; 00057 event.getByLabel( productLabel_, productInstance_, buffers ); 00058 boost::shared_ptr<LazyUnpacker> unpacker( new LazyUnpacker( *cabling_, *clusterizer_, *buffers ) ); 00059 std::auto_ptr<LazyGetter> collection( new LazyGetter( cabling_->getRegionCabling().size() * 00060 SiStripRegionCabling::ALLSUBDETS * 00061 SiStripRegionCabling::ALLLAYERS, 00062 unpacker ) ); 00063 00064 event.put( collection ); 00065 00066 }
void SiStripRawToClusters::updateCabling | ( | const edm::EventSetup & | setup | ) | [private] |
Definition at line 70 of file SiStripRawToClusters.cc.
References c, cabling_, cacheId_, edm::EventSetup::get(), and edm::ESHandle< T >::product().
Referenced by beginRun(), and produce().
00070 { 00071 uint32_t cache_id = setup.get<SiStripRegionCablingRcd>().cacheIdentifier(); 00072 if ( cacheId_ != cache_id ) { 00073 edm::ESHandle<SiStripRegionCabling> c; 00074 setup.get<SiStripRegionCablingRcd>().get( c ); 00075 cabling_ = c.product(); 00076 cacheId_ = cache_id; 00077 } 00078 }
const SiStripRegionCabling* SiStripRawToClusters::cabling_ [private] |
uint32_t SiStripRawToClusters::cacheId_ [private] |
Definition at line 47 of file SiStripRawToClusters.h.
Referenced by beginRun(), produce(), SiStripRawToClusters(), and ~SiStripRawToClusters().
std::string SiStripRawToClusters::productInstance_ [private] |
std::string SiStripRawToClusters::productLabel_ [private] |