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::EDConsumerBase 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
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
 RawToClusters (const edm::ParameterSet &)
 
 ~RawToClusters ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void updateCabling (const edm::EventSetup &setup)
 

Private Attributes

const SiStripRegionCablingcabling_
 
uint32_t cacheId_
 
std::auto_ptr
< StripClusterizerAlgorithm
clusterizer_
 
bool doAPVEmulatorCheck_
 
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)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
24 {
25  if ( edm::isDebugEnabled() ) {
26  LogTrace("SiStripRawToCluster")
27  << "[RawToClusters::" << __func__ << "]"
28  << " Constructing object...";
29  }
30  produces<LazyGetter>();
31 
32 }
T getParameter(std::string const &) const
bool isDebugEnabled()
const SiStripRegionCabling * cabling_
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
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 34 of file SiStripRawToClusters.cc.

References edm::isDebugEnabled(), and LogTrace.

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

Member Function Documentation

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

Reimplemented from edm::EDProducer.

Definition at line 42 of file SiStripRawToClusters.cc.

References clusterizer_, rawAlgos_, and updateCabling().

42  {
43  updateCabling( setup );
44  clusterizer_->initialize(setup);
45  rawAlgos_->initialize(setup);
46  }
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 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 48 of file SiStripRawToClusters.cc.

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

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

48  {
49 
50  // update cabling
51  updateCabling( setup );
52  clusterizer_->initialize( setup );
53  rawAlgos_->initialize( setup );
54 
55  // get raw data
57  event.getByLabel( productLabel_, buffers );
58 
59  // create lazy unpacker
60  boost::shared_ptr<LazyUnpacker> unpacker( new LazyUnpacker( *cabling_, *clusterizer_, *rawAlgos_, *buffers ) );
61 
62  // propagate the parameter doAPVEmulatorCheck_ to the unpacker.
63  unpacker->doAPVEmulatorCheck(doAPVEmulatorCheck_);
64 
65  // create lazy getter
66  std::auto_ptr<LazyGetter> collection( new LazyGetter( cabling_->getRegionCabling().size() * SiStripRegionCabling::ALLSUBDETS * SiStripRegionCabling::ALLLAYERS, unpacker ) );
67 
68  // add collection to the event
69  event.put( collection );
70 
71  }
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 73 of file SiStripRawToClusters.cc.

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

Referenced by beginRun(), and produce().

73  {
74 
75  uint32_t cache_id = setup.get<SiStripRegionCablingRcd>().cacheIdentifier();
76  if ( cacheId_ != cache_id ) {
78  setup.get<SiStripRegionCablingRcd>().get( c );
79  cabling_ = c.product();
80  cacheId_ = cache_id;
81  }
82  }
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().

bool sistrip::RawToClusters::doAPVEmulatorCheck_
private

Definition at line 48 of file SiStripRawToClusters.h.

Referenced by 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().