CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CTPPSPixelRecHitProducer Class Reference

#include <CTPPSPixelRecHitProducer.h>

Inheritance diagram for CTPPSPixelRecHitProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CTPPSPixelRecHitProducer (const edm::ParameterSet &param)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~CTPPSPixelRecHitProducer () override
 
- 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)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- 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 run (const edm::DetSetVector< CTPPSPixelCluster > &input, edm::DetSetVector< CTPPSPixelRecHit > &output)
 

Private Attributes

RPixClusterToHit cluster2hit_
 
edm::ParameterSet param_
 
edm::InputTag src_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
 
int verbosity_
 

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
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 30 of file CTPPSPixelRecHitProducer.h.

Constructor & Destructor Documentation

CTPPSPixelRecHitProducer::CTPPSPixelRecHitProducer ( const edm::ParameterSet param)
explicit

Definition at line 4 of file CTPPSPixelRecHitProducer.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), src_, tokenCTPPSPixelCluster_, and verbosity_.

4  :
5  param_(conf), cluster2hit_(conf)
6 {
7  src_ = conf.getParameter<edm::InputTag>("RPixClusterTag");
8  verbosity_ = conf.getUntrackedParameter<int> ("RPixVerbosity");
9  tokenCTPPSPixelCluster_ = consumes<edm::DetSetVector<CTPPSPixelCluster> >(src_);
10  produces<edm::DetSetVector<CTPPSPixelRecHit> > ();
11 }
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
CTPPSPixelRecHitProducer::~CTPPSPixelRecHitProducer ( )
override

Definition at line 13 of file CTPPSPixelRecHitProducer.cc.

13 {}

Member Function Documentation

void CTPPSPixelRecHitProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 15 of file CTPPSPixelRecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and edm::ParameterSetDescription::addUntracked().

15  {
17  desc.addUntracked<int>("RPixVerbosity",0);
18  desc.add<edm::InputTag>("RPixClusterTag",edm::InputTag("ctppsPixelClusters"));
19  descriptions.add("ctppsPixelRecHits", desc);
20 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void CTPPSPixelRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 22 of file CTPPSPixelRecHitProducer.cc.

References edm::Event::getByToken(), convertSQLitetoXML_cfg::output, edm::Event::put(), run(), and tokenCTPPSPixelCluster_.

22  {
23 
25  iEvent.getByToken(tokenCTPPSPixelCluster_, rpCl);
26 
28 
29 // run reconstruction
30  if (!rpCl->empty())
31  run(*rpCl, output);
32 
33  iEvent.put(std::make_unique<edm::DetSetVector<CTPPSPixelRecHit> >(output));
34 
35 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
void run(const edm::DetSetVector< CTPPSPixelCluster > &input, edm::DetSetVector< CTPPSPixelRecHit > &output)
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
void CTPPSPixelRecHitProducer::run ( const edm::DetSetVector< CTPPSPixelCluster > &  input,
edm::DetSetVector< CTPPSPixelRecHit > &  output 
)
private

Definition at line 37 of file CTPPSPixelRecHitProducer.cc.

References RPixClusterToHit::buildHits(), cluster2hit_, edm::DetSet< T >::data, DEFINE_FWK_MODULE, and edm::DetSetVector< T >::find_or_insert().

Referenced by produce().

37  {
38 
39  for (const auto &ds_cluster : input)
40  {
41  edm::DetSet<CTPPSPixelRecHit> &ds_rechit = output.find_or_insert(ds_cluster.id);
42 
43 //calculate the cluster parameters and convert it into a rechit
44  cluster2hit_.buildHits(ds_cluster.id, ds_cluster.data, ds_rechit.data);
45 
46  }
47 }
void buildHits(unsigned int detId, const std::vector< CTPPSPixelCluster > &clusters, std::vector< CTPPSPixelRecHit > &hits)
reference find_or_insert(det_id_type id)
Definition: DetSetVector.h:254
collection_type data
Definition: DetSet.h:78

Member Data Documentation

RPixClusterToHit CTPPSPixelRecHitProducer::cluster2hit_
private

Definition at line 48 of file CTPPSPixelRecHitProducer.h.

Referenced by run().

edm::ParameterSet CTPPSPixelRecHitProducer::param_
private

Definition at line 42 of file CTPPSPixelRecHitProducer.h.

edm::InputTag CTPPSPixelRecHitProducer::src_
private

Definition at line 45 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer().

edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelCluster> > CTPPSPixelRecHitProducer::tokenCTPPSPixelCluster_
private

Definition at line 46 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer(), and produce().

int CTPPSPixelRecHitProducer::verbosity_
private

Definition at line 43 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer().