CMS 3D CMS Logo

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

Public Member Functions

void produce (edm::Event &e, const edm::EventSetup &c) override
 
 TotemRPRecHitProducer (const edm::ParameterSet &conf)
 
 ~TotemRPRecHitProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 

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<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 26 of file TotemRPRecHitProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 53 of file TotemRPRecHitProducer.cc.

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

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

Definition at line 30 of file TotemRPRecHitProducer.cc.

30 {}

Member Function Documentation

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

Definition at line 84 of file TotemRPRecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

84  {
86 
87  desc.add<edm::InputTag>("tagCluster", edm::InputTag("totemRPClusterProducer"))
88  ->setComment("input clusters collection to retrieve");
89  desc.add<int>("verbosity", 0);
90 
91  descr.add("totemRPRecHitProducer", desc);
92 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TotemRPRecHitProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 64 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_.

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

Member Data Documentation

TotemRPRecHitProducerAlgorithm TotemRPRecHitProducer::algorithm_
private

Definition at line 39 of file TotemRPRecHitProducer.cc.

Referenced by produce().

const edm::ParameterSet TotemRPRecHitProducer::conf_
private

Definition at line 36 of file TotemRPRecHitProducer.cc.

edm::InputTag TotemRPRecHitProducer::tagCluster_
private

Definition at line 41 of file TotemRPRecHitProducer.cc.

Referenced by TotemRPRecHitProducer().

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

Definition at line 42 of file TotemRPRecHitProducer.cc.

Referenced by produce(), and TotemRPRecHitProducer().

int TotemRPRecHitProducer::verbosity_
private

Definition at line 37 of file TotemRPRecHitProducer.cc.

Referenced by TotemRPRecHitProducer().