CMS 3D CMS Logo

SiStripRawToClusters Class Reference

#include <EventFilter/SiStripRawToDigi/plugins/SiStripRawToClusters.h>

Inheritance diagram for SiStripRawToClusters:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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 SiStripRegionCablingcabling_
uint32_t cacheId_
SiStripClusterizerFactoryclusterizer_
std::string productInstance_
std::string productLabel_


Detailed Description

Definition at line 20 of file SiStripRawToClusters.h.


Member Typedef Documentation

typedef edm::LazyGetter<SiStripCluster> SiStripRawToClusters::LazyGetter

Definition at line 24 of file SiStripRawToClusters.h.

typedef SiStripRawToClustersLazyUnpacker SiStripRawToClusters::LazyUnpacker

Definition at line 26 of file SiStripRawToClusters.h.

typedef edm::RefGetter<SiStripCluster> SiStripRawToClusters::RefGetter

Definition at line 25 of file SiStripRawToClusters.h.

typedef SiStripRegionCabling::SubDet SiStripRawToClusters::SubDet

Definition at line 27 of file SiStripRawToClusters.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

const SiStripRegionCabling* SiStripRawToClusters::cabling_ [private]

Definition at line 43 of file SiStripRawToClusters.h.

Referenced by produce(), and updateCabling().

uint32_t SiStripRawToClusters::cacheId_ [private]

Definition at line 45 of file SiStripRawToClusters.h.

Referenced by updateCabling().

SiStripClusterizerFactory* SiStripRawToClusters::clusterizer_ [private]

Definition at line 47 of file SiStripRawToClusters.h.

Referenced by beginRun(), produce(), SiStripRawToClusters(), and ~SiStripRawToClusters().

std::string SiStripRawToClusters::productInstance_ [private]

Definition at line 41 of file SiStripRawToClusters.h.

Referenced by produce().

std::string SiStripRawToClusters::productLabel_ [private]

Definition at line 40 of file SiStripRawToClusters.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:31 2009 for CMSSW by  doxygen 1.5.4