CMS 3D CMS Logo

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 () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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

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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
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
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
CTPPSDiamondRecHitProducerAlgorithm algo_
A watcher to detect geometry changes.
CTPPSDiamondRecHitProducer::~CTPPSDiamondRecHitProducer ( )
override

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::add(), edm::ParameterSetDescription::add(), and DEFINE_FWK_MODULE.

83 {
85 
86  desc.add<edm::InputTag>( "digiTag", edm::InputTag( "ctppsDiamondRawToDigi", "TimingDiamond" ) )
87  ->setComment( "input digis collection to retrieve" );
88  desc.add<double>( "timeSliceNs", 25.0/1024.0 )
89  ->setComment( "conversion constant between HPTDC timing bin size and nanoseconds" );
90  desc.add<int>( "timeShift", 0 ) // to be determined at calibration level, will be replaced by a map channel id -> time shift
91  ->setComment( "overall time offset to apply on all hits in all channels" );
92 
93  descr.add( "ctppsDiamondRecHits", desc );
94 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void CTPPSDiamondRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 63 of file CTPPSDiamondRecHitProducer.cc.

References algo_, CTPPSDiamondRecHitProducerAlgorithm::build(), digiToken_, geometry, edm::EventSetup::get(), edm::Event::getByToken(), eostools::move(), edm::ESHandle< T >::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 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
Event setup record containing the real (actual) geometry information.
void build(const CTPPSGeometry *, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
const T & get() const
Definition: EventSetup.h:58
ESHandle< TrackerGeometry > geometry
CTPPSDiamondRecHitProducerAlgorithm algo_
A watcher to detect geometry changes.
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:510

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