CMS 3D CMS Logo

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

#include <SiStripClusterizer.h>

Inheritance diagram for SiStripClusterizer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 
 SiStripClusterizer (const edm::ParameterSet &conf)
 
- 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

template<class T >
bool findInput (const edm::InputTag &, edm::Handle< T > &, const edm::Event &)
 

Private Attributes

std::auto_ptr
< StripClusterizerAlgorithm
algorithm
 
const std::vector< edm::InputTaginputTags
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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 13 of file SiStripClusterizer.h.

Constructor & Destructor Documentation

SiStripClusterizer::SiStripClusterizer ( const edm::ParameterSet conf)
explicit

Definition at line 8 of file SiStripClusterizer.cc.

9  : inputTags( conf.getParameter<std::vector<edm::InputTag> >("DigiProducersList") ),
11  produces< edmNew::DetSetVector<SiStripCluster> > ();
12 }
T getParameter(std::string const &) const
const std::vector< edm::InputTag > inputTags
static std::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
std::auto_ptr< StripClusterizerAlgorithm > algorithm

Member Function Documentation

template<class T >
bool SiStripClusterizer::findInput ( const edm::InputTag tag,
edm::Handle< T > &  handle,
const edm::Event e 
)
inlineprivate

Definition at line 39 of file SiStripClusterizer.cc.

References edm::Event::getByLabel(), and edm::HandleBase::isValid().

Referenced by produce().

39  {
40  e.getByLabel( tag, handle);
41  return handle.isValid();
42 }
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
void SiStripClusterizer::produce ( edm::Event event,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 15 of file SiStripClusterizer.cc.

References algorithm, findInput(), inputTags, LogDebug, convertSQLitetoXML_cfg::output, and GlobalPosition_Frontier_DevDB_cff::tag.

15  {
16 
17  std::auto_ptr< edmNew::DetSetVector<SiStripCluster> > output(new edmNew::DetSetVector<SiStripCluster>());
18  output->reserve(10000,4*10000);
19 
22 
23  algorithm->initialize(es);
24 
25  BOOST_FOREACH( const edm::InputTag& tag, inputTags) {
26  if( findInput( tag, inputOld, event) ) algorithm->clusterize(*inputOld, *output);
27  else if( findInput( tag, inputNew, event) ) algorithm->clusterize(*inputNew, *output);
28  else edm::LogError("Input Not Found") << "[SiStripClusterizer::produce] " << tag;
29  }
30 
31  LogDebug("Output") << output->dataSize() << " clusters from "
32  << output->size() << " modules";
33  event.put(output);
34 }
#define LogDebug(id)
const std::vector< edm::InputTag > inputTags
std::auto_ptr< StripClusterizerAlgorithm > algorithm
bool findInput(const edm::InputTag &, edm::Handle< T > &, const edm::Event &)

Member Data Documentation

std::auto_ptr<StripClusterizerAlgorithm> SiStripClusterizer::algorithm
private

Definition at line 24 of file SiStripClusterizer.h.

Referenced by produce().

const std::vector<edm::InputTag> SiStripClusterizer::inputTags
private