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 Attributes
TotemRPRecHitProducer Class Reference
Inheritance diagram for TotemRPRecHitProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &e, const edm::EventSetup &c) override
 
 TotemRPRecHitProducer (const edm::ParameterSet &conf)
 
virtual ~TotemRPRecHitProducer ()
 
- 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 Attributes

TotemRPRecHitProducerAlgorithm algorithm_
 
const edm::ParameterSet conf_
 
edm::InputTag tagCluster_
 
edm::EDGetTokenT
< edm::DetSetVector
< TotemRPCluster > > 
tokenCluster_
 
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, 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 26 of file TotemRPRecHitProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 54 of file TotemRPRecHitProducer.cc.

References edm::ParameterSet::getParameter(), tagCluster_, tokenCluster_, and verbosity_.

54  :
55  conf_(conf), algorithm_(conf)
56 {
57  verbosity_ = conf.getParameter<int>("verbosity");
58 
59  tagCluster_ = conf.getParameter<edm::InputTag>("tagCluster");
60  tokenCluster_ = consumes<edm::DetSetVector<TotemRPCluster> >(tagCluster_);
61 
62  produces<edm::DetSetVector<TotemRPRecHit>>();
63 }
T getParameter(std::string const &) const
const edm::ParameterSet conf_
TotemRPRecHitProducerAlgorithm algorithm_
edm::EDGetTokenT< edm::DetSetVector< TotemRPCluster > > tokenCluster_
virtual TotemRPRecHitProducer::~TotemRPRecHitProducer ( )
inlinevirtual

Definition at line 32 of file TotemRPRecHitProducer.cc.

32 {}

Member Function Documentation

void TotemRPRecHitProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::stream::EDProducerBase.

Definition at line 67 of file TotemRPRecHitProducer.cc.

References algorithm_, TotemRPRecHitProducerAlgorithm::buildRecoHits(), edm::DetSetVector< T >::find_or_insert(), edm::Event::getByToken(), input, convertSQLitetoXML_cfg::output, edm::Event::put(), and tokenCluster_.

68 {
69  // get input
71  e.getByToken(tokenCluster_, input);
72 
73  // prepare output
75 
76  // build reco hits
77  for (auto &ids : *input)
78  {
79  DetSet<TotemRPRecHit> &ods = output.find_or_insert(ids.detId());
80  algorithm_.buildRecoHits(ids, ods);
81  }
82 
83  // save output
84  e.put(make_unique<DetSetVector<TotemRPRecHit>>(output));
85 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void buildRecoHits(const edm::DetSet< TotemRPCluster > &input, edm::DetSet< TotemRPRecHit > &output)
static std::string const input
Definition: EdmProvDump.cc:44
reference find_or_insert(det_id_type id)
Definition: DetSetVector.h:254
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
TotemRPRecHitProducerAlgorithm algorithm_
edm::EDGetTokenT< edm::DetSetVector< TotemRPCluster > > tokenCluster_

Member Data Documentation

TotemRPRecHitProducerAlgorithm TotemRPRecHitProducer::algorithm_
private

Definition at line 40 of file TotemRPRecHitProducer.cc.

Referenced by produce().

const edm::ParameterSet TotemRPRecHitProducer::conf_
private

Definition at line 37 of file TotemRPRecHitProducer.cc.

edm::InputTag TotemRPRecHitProducer::tagCluster_
private

Definition at line 42 of file TotemRPRecHitProducer.cc.

Referenced by TotemRPRecHitProducer().

edm::EDGetTokenT<edm::DetSetVector<TotemRPCluster> > TotemRPRecHitProducer::tokenCluster_
private

Definition at line 43 of file TotemRPRecHitProducer.cc.

Referenced by produce(), and TotemRPRecHitProducer().

int TotemRPRecHitProducer::verbosity_
private

Definition at line 38 of file TotemRPRecHitProducer.cc.

Referenced by TotemRPRecHitProducer().