CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TotemRPClusterProducer Class Reference
Inheritance diagram for TotemRPClusterProducer:
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
 
 TotemRPClusterProducer (const edm::ParameterSet &conf)
 
virtual ~TotemRPClusterProducer ()
 
- 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
 
 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 & itemsToGetFromEvent () 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)
 

Private Member Functions

void run (const edm::DetSetVector< TotemRPDigi > &input, edm::DetSetVector< TotemRPCluster > &output)
 

Private Attributes

TotemRPClusterProducerAlgorithm algorithm_
 
edm::ParameterSet conf_
 
edm::InputTag digiInputTag_
 
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > digiInputTagToken_
 
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
 
- 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

Merges neighbouring active TOTEM RP strips into clusters.

Definition at line 28 of file TotemRPClusterProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 57 of file TotemRPClusterProducer.cc.

References digiInputTag_, digiInputTagToken_, edm::ParameterSet::getParameter(), and verbosity_.

57  :
58  conf_(conf), algorithm_(conf)
59 {
60  verbosity_ = conf.getParameter<int>("verbosity");
61 
62  digiInputTag_ = conf.getParameter<edm::InputTag>("tagDigi");
63  digiInputTagToken_ = consumes<edm::DetSetVector<TotemRPDigi> >(digiInputTag_);
64 
65  produces< edm::DetSetVector<TotemRPCluster> > ();
66 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > digiInputTagToken_
TotemRPClusterProducerAlgorithm algorithm_
virtual TotemRPClusterProducer::~TotemRPClusterProducer ( )
inlinevirtual

Definition at line 34 of file TotemRPClusterProducer.cc.

References EnergyCorrector::c, MillePedeFileConverter_cfg::e, and produce().

34 {}

Member Function Documentation

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

Definition at line 70 of file TotemRPClusterProducer.cc.

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

Referenced by ~TotemRPClusterProducer().

71 {
72  // get input
75 
76  // prepare output
78 
79  // run clusterisation
80  if (input->size())
81  run(*input, output);
82 
83  // save output to event
84  e.put(make_unique<DetSetVector<TotemRPCluster>>(output));
85 }
void run(const edm::DetSetVector< TotemRPDigi > &input, edm::DetSetVector< TotemRPCluster > &output)
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:457
edm::EDGetTokenT< edm::DetSetVector< TotemRPDigi > > digiInputTagToken_
static std::string const input
Definition: EdmProvDump.cc:44
void TotemRPClusterProducer::run ( const edm::DetSetVector< TotemRPDigi > &  input,
edm::DetSetVector< TotemRPCluster > &  output 
)
private

Definition at line 89 of file TotemRPClusterProducer.cc.

References algorithm_, TotemRPClusterProducerAlgorithm::buildClusters(), edm::DetSet< T >::data, DEFINE_FWK_MODULE, and edm::DetSetVector< T >::find_or_insert().

Referenced by produce().

90 {
91  for (const auto &ds_digi : input)
92  {
93  edm::DetSet<TotemRPCluster> &ds_cluster = output.find_or_insert(ds_digi.id);
94 
95  algorithm_.buildClusters(ds_digi.id, ds_digi.data, ds_cluster.data);
96  }
97 }
TotemRPClusterProducerAlgorithm algorithm_
reference find_or_insert(det_id_type id)
Definition: DetSetVector.h:254
int buildClusters(unsigned int detId, const std::vector< TotemRPDigi > &digi, std::vector< TotemRPCluster > &clusters)
collection_type data
Definition: DetSet.h:78

Member Data Documentation

TotemRPClusterProducerAlgorithm TotemRPClusterProducer::algorithm_
private

Definition at line 44 of file TotemRPClusterProducer.cc.

Referenced by run().

edm::ParameterSet TotemRPClusterProducer::conf_
private

Definition at line 39 of file TotemRPClusterProducer.cc.

edm::InputTag TotemRPClusterProducer::digiInputTag_
private

Definition at line 41 of file TotemRPClusterProducer.cc.

Referenced by TotemRPClusterProducer().

edm::EDGetTokenT<edm::DetSetVector<TotemRPDigi> > TotemRPClusterProducer::digiInputTagToken_
private

Definition at line 42 of file TotemRPClusterProducer.cc.

Referenced by produce(), and TotemRPClusterProducer().

int TotemRPClusterProducer::verbosity_
private

Definition at line 40 of file TotemRPClusterProducer.cc.

Referenced by TotemRPClusterProducer().