test
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 Types | Private Member Functions | Private Attributes
SiStripClusterizer Class Reference

#include <SiStripClusterizer.h>

Inheritance diagram for SiStripClusterizer:
edm::stream::EDProducer<> edm::stream::EDProducerBase 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::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef edm::EDGetTokenT
< edm::DetSetVector
< SiStripDigi > > 
token_t
 
typedef std::vector< token_ttoken_v
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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.

Member Typedef Documentation

Definition at line 25 of file SiStripClusterizer.h.

typedef std::vector<token_t> SiStripClusterizer::token_v
private

Definition at line 26 of file SiStripClusterizer.h.

Constructor & Destructor Documentation

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

Definition at line 10 of file SiStripClusterizer.cc.

References inputTags, inputTokens, GlobalPosition_Frontier_DevDB_cff::tag, and edm::vector_transform().

11  : inputTags( conf.getParameter<std::vector<edm::InputTag> >("DigiProducersList") ),
13  produces< edmNew::DetSetVector<SiStripCluster> > ();
14  inputTokens = edm::vector_transform( inputTags, [this](edm::InputTag const & tag) { return consumes< edm::DetSetVector<SiStripDigi> >(tag);} );
15 }
T getParameter(std::string const &) const
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
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::EDGetTokenT< T > &  tag,
edm::Handle< T > &  handle,
const edm::Event e 
)
inlineprivate

Definition at line 43 of file SiStripClusterizer.cc.

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

Referenced by produce().

43  {
44  e.getByToken( tag, handle);
45  return handle.isValid();
46 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
bool isValid() const
Definition: HandleBase.h:75
void SiStripClusterizer::produce ( edm::Event event,
const edm::EventSetup es 
)
virtual

Implements edm::stream::EDProducerBase.

Definition at line 18 of file SiStripClusterizer.cc.

References algorithm, findInput(), inputTokens, LogDebug, convertSQLitetoXML_cfg::output, and unpackBuffers-CaloStage2::token.

18  {
19 
20  std::auto_ptr< edmNew::DetSetVector<SiStripCluster> > output(new edmNew::DetSetVector<SiStripCluster>());
21  output->reserve(10000,4*10000);
22 
24 // edm::Handle< edmNew::DetSetVector<SiStripDigi> > inputNew;
25 
26  algorithm->initialize(es);
27 
29  if( findInput( token, inputOld, event) ) algorithm->clusterize(*inputOld, *output);
30 // else if( findInput( tag, inputNew, event) ) algorithm->clusterize(*inputNew, *output);
31  else edm::LogError("Input Not Found") << "[SiStripClusterizer::produce] ";// << tag;
32  }
33 
34  LogDebug("Output") << output->dataSize() << " clusters from "
35  << output->size() << " modules";
36  output->shrink_to_fit();
37  event.put(output);
38 }
#define LogDebug(id)
bool findInput(const edm::EDGetTokenT< T > &, edm::Handle< T > &, const edm::Event &)
std::auto_ptr< StripClusterizerAlgorithm > algorithm

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
token_v SiStripClusterizer::inputTokens
private

Definition at line 27 of file SiStripClusterizer.h.

Referenced by produce(), and SiStripClusterizer().