CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CTPPSDiamondRecHitProducer Class Reference
Inheritance diagram for CTPPSDiamondRecHitProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CTPPSDiamondRecHitProducer (const edm::ParameterSet &)
 
 ~CTPPSDiamondRecHitProducer ()
 
- 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 ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

CTPPSDiamondRecHitProducerAlgorithm algo_
 A watcher to detect geometry changes. More...
 
edm::EDGetTokenT
< edm::DetSetVector
< CTPPSDiamondDigi > > 
digiToken_
 

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
 
- 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 33 of file CTPPSDiamondRecHitProducer.cc.

Constructor & Destructor Documentation

CTPPSDiamondRecHitProducer::CTPPSDiamondRecHitProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 52 of file CTPPSDiamondRecHitProducer.cc.

52  :
54  algo_( iConfig )
55 {
56  produces< edm::DetSetVector<CTPPSDiamondRecHit> >();
57 }
T getParameter(std::string const &) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
CTPPSDiamondRecHitProducerAlgorithm algo_
A watcher to detect geometry changes.
CTPPSDiamondRecHitProducer::~CTPPSDiamondRecHitProducer ( )

Definition at line 59 of file CTPPSDiamondRecHitProducer.cc.

60 {}

Member Function Documentation

void CTPPSDiamondRecHitProducer::fillDescriptions ( edm::ConfigurationDescriptions descr)
static

Definition at line 82 of file CTPPSDiamondRecHitProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

83 {
84  // The following says we do not know what parameters are allowed so do no validation
85  // Please change this to state exactly what you do use, even if it is no parameters
87  desc.setUnknown();
88  descr.addDefault( desc );
89 }
void addDefault(ParameterSetDescription const &psetDescription)
void CTPPSDiamondRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 63 of file CTPPSDiamondRecHitProducer.cc.

References algo_, CTPPSDiamondRecHitProducerAlgorithm::build(), digiToken_, geometry, edm::EventSetup::get(), edm::Event::getByToken(), eostools::move(), edm::ESHandle< class >::product(), and edm::Event::put().

64 {
65  std::unique_ptr< edm::DetSetVector<CTPPSDiamondRecHit> > pOut( new edm::DetSetVector<CTPPSDiamondRecHit> );
66 
67  // get the digi collection
69  iEvent.getByToken( digiToken_, digis );
70 
71  // get the geometry
73  iSetup.get<VeryForwardRealGeometryRecord>().get( geometry );
74 
75  // produce the rechits collection
76  algo_.build( geometry.product(), *( digis ), *( pOut ) );
77 
78  iEvent.put( std::move( pOut ) );
79 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void build(const TotemRPGeometry *, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
Event setup record containing the real (actual) geometry information.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
def move
Definition: eostools.py:510
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
ESHandle< TrackerGeometry > geometry
CTPPSDiamondRecHitProducerAlgorithm algo_
A watcher to detect geometry changes.

Member Data Documentation

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

A watcher to detect geometry changes.

Definition at line 49 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

edm::EDGetTokenT< edm::DetSetVector<CTPPSDiamondDigi> > CTPPSDiamondRecHitProducer::digiToken_
private

Definition at line 44 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().