CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
sistrip::RawToClusters Class Reference

#include <SiStripRawToClusters.h>

Inheritance diagram for sistrip::RawToClusters:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Types

typedef edm::LazyGetter
< SiStripCluster
LazyGetter
 
typedef RawToClustersLazyUnpacker LazyUnpacker
 
typedef edm::RefGetter
< SiStripCluster
RefGetter
 
typedef
SiStripRegionCabling::SubDet 
SubDet
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

virtual void beginRun (edm::Run &, const edm::EventSetup &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 RawToClusters (const edm::ParameterSet &)
 
 ~RawToClusters ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

void updateCabling (const edm::EventSetup &setup)
 

Private Attributes

const SiStripRegionCablingcabling_
 
uint32_t cacheId_
 
std::auto_ptr
< StripClusterizerAlgorithm
clusterizer_
 
edm::InputTag productLabel_
 
std::auto_ptr
< SiStripRawProcessingAlgorithms
rawAlgos_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 22 of file SiStripRawToClusters.h.

Member Typedef Documentation

Definition at line 26 of file SiStripRawToClusters.h.

Definition at line 28 of file SiStripRawToClusters.h.

Definition at line 27 of file SiStripRawToClusters.h.

Definition at line 29 of file SiStripRawToClusters.h.

Constructor & Destructor Documentation

sistrip::RawToClusters::RawToClusters ( const edm::ParameterSet conf)

Definition at line 17 of file SiStripRawToClusters.cc.

References edm::isDebugEnabled(), and LogTrace.

17  :
18  productLabel_(conf.getParameter<edm::InputTag>("ProductLabel")),
19  cabling_(0),
20  cacheId_(0),
23 {
24  if ( edm::isDebugEnabled() ) {
25  LogTrace("SiStripRawToCluster")
26  << "[RawToClusters::" << __func__ << "]"
27  << " Constructing object...";
28  }
29  produces<LazyGetter>();
30 }
T getParameter(std::string const &) const
bool isDebugEnabled()
const SiStripRegionCabling * cabling_
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
static std::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
static std::auto_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &)
#define LogTrace(id)
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_
sistrip::RawToClusters::~RawToClusters ( )

Definition at line 32 of file SiStripRawToClusters.cc.

References edm::isDebugEnabled(), and LogTrace.

32  {
33  if ( edm::isDebugEnabled() ) {
34  LogTrace("SiStripRawToCluster")
35  << "[RawToClusters::" << __func__ << "]"
36  << " Destructing object...";
37  }
38  }
bool isDebugEnabled()
#define LogTrace(id)

Member Function Documentation

void sistrip::RawToClusters::beginRun ( edm::Run ,
const edm::EventSetup setup 
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 40 of file SiStripRawToClusters.cc.

References clusterizer_, rawAlgos_, and updateCabling().

40  {
41  updateCabling( setup );
42  clusterizer_->initialize(setup);
43  rawAlgos_->initialize(setup);
44  }
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
void updateCabling(const edm::EventSetup &setup)
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_
void sistrip::RawToClusters::produce ( edm::Event event,
const edm::EventSetup setup 
)
virtual

Implements edm::EDProducer.

Definition at line 46 of file SiStripRawToClusters.cc.

References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, cabling_, clusterizer_, runEdmFileComparison::collection, SiStripRegionCabling::getRegionCabling(), productLabel_, rawAlgos_, and updateCabling().

Referenced by python.JSONExport.JsonExport::export(), and python.HTMLExport.HTMLExport::export().

46  {
47 
48  // update cabling
49  updateCabling( setup );
50  clusterizer_->initialize( setup );
51  rawAlgos_->initialize( setup );
52 
53  // get raw data
55  event.getByLabel( productLabel_, buffers );
56 
57  // create lazy unpacker
58  boost::shared_ptr<LazyUnpacker> unpacker( new LazyUnpacker( *cabling_, *clusterizer_, *rawAlgos_, *buffers ) );
59 
60  // create lazy getter
61  std::auto_ptr<LazyGetter> collection( new LazyGetter( cabling_->getRegionCabling().size() * SiStripRegionCabling::ALLSUBDETS * SiStripRegionCabling::ALLLAYERS, unpacker ) );
62 
63  // add collection to the event
64  event.put( collection );
65 
66  }
const SiStripRegionCabling * cabling_
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
RawToClustersLazyUnpacker LazyUnpacker
void updateCabling(const edm::EventSetup &setup)
const Cabling & getRegionCabling() const
edm::LazyGetter< SiStripCluster > LazyGetter
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_
void sistrip::RawToClusters::updateCabling ( const edm::EventSetup setup)
private

Definition at line 68 of file SiStripRawToClusters.cc.

References trackerHits::c, cabling_, cacheId_, edm::EventSetup::get(), and edm::ESHandle< class >::product().

Referenced by beginRun(), and produce().

68  {
69 
70  uint32_t cache_id = setup.get<SiStripRegionCablingRcd>().cacheIdentifier();
71  if ( cacheId_ != cache_id ) {
73  setup.get<SiStripRegionCablingRcd>().get( c );
74  cabling_ = c.product();
75  cacheId_ = cache_id;
76  }
77  }
const SiStripRegionCabling * cabling_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62

Member Data Documentation

const SiStripRegionCabling* sistrip::RawToClusters::cabling_
private

Definition at line 42 of file SiStripRawToClusters.h.

Referenced by produce(), and updateCabling().

uint32_t sistrip::RawToClusters::cacheId_
private

Definition at line 43 of file SiStripRawToClusters.h.

Referenced by updateCabling().

std::auto_ptr<StripClusterizerAlgorithm> sistrip::RawToClusters::clusterizer_
private

Definition at line 44 of file SiStripRawToClusters.h.

Referenced by beginRun(), and produce().

edm::InputTag sistrip::RawToClusters::productLabel_
private

Definition at line 41 of file SiStripRawToClusters.h.

Referenced by produce().

std::auto_ptr<SiStripRawProcessingAlgorithms> sistrip::RawToClusters::rawAlgos_
private

Definition at line 45 of file SiStripRawToClusters.h.

Referenced by beginRun(), and produce().