CMS 3D CMS Logo

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

#include <CSCTFCandidateProducer.h>

Inheritance diagram for CSCTFCandidateProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCTFCandidateProducer (const edm::ParameterSet &)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~CSCTFCandidateProducer () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () 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)
 
 ~ProducerBase () noexcept(false) override
 
- 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)
 

Private Attributes

edm::EDGetTokenT< L1CSCTrackCollectioninput_module
 
CSCTFCandidateBuildermy_builder
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer 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
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 13 of file CSCTFCandidateProducer.h.

Constructor & Destructor Documentation

CSCTFCandidateProducer::CSCTFCandidateProducer ( const edm::ParameterSet pset)

Definition at line 11 of file CSCTFCandidateProducer.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), input_module, and my_builder.

12 {
13  edm::ParameterSet mu_sorter_pset = pset.getParameter<edm::ParameterSet>("MuonSorter");
14  my_builder = new CSCTFCandidateBuilder(mu_sorter_pset);
15  input_module = consumes<L1CSCTrackCollection>(pset.getUntrackedParameter<edm::InputTag>("CSCTrackProducer"));
16  produces<std::vector<L1MuRegionalCand> >("CSC");
17 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< L1CSCTrackCollection > input_module
CSCTFCandidateBuilder * my_builder
CSCTFCandidateProducer::~CSCTFCandidateProducer ( )
override

Definition at line 19 of file CSCTFCandidateProducer.cc.

References my_builder.

20 {
21  delete my_builder;
22  my_builder = nullptr;
23 }
CSCTFCandidateBuilder * my_builder

Member Function Documentation

void CSCTFCandidateProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 25 of file CSCTFCandidateProducer.cc.

References CSCTFCandidateBuilder::buildCandidates(), edm::Event::getByToken(), input_module, eostools::move(), my_builder, edm::Handle< T >::product(), edm::Event::put(), and l1t::tracks.

26 {
28  std::unique_ptr<std::vector<L1MuRegionalCand> > cand_product(new std::vector<L1MuRegionalCand>);
29 
30  e.getByToken(input_module, tracks);
31 
32  my_builder->buildCandidates(tracks.product(), cand_product.get());
33 
34  e.put(std::move(cand_product),"CSC");
35 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
edm::EDGetTokenT< L1CSCTrackCollection > input_module
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
CSCTFCandidateBuilder * my_builder
void buildCandidates(const L1CSCTrackCollection *, std::vector< L1MuRegionalCand > *) const
T const * product() const
Definition: Handle.h:81
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

edm::EDGetTokenT<L1CSCTrackCollection> CSCTFCandidateProducer::input_module
private

Definition at line 24 of file CSCTFCandidateProducer.h.

Referenced by CSCTFCandidateProducer(), and produce().

CSCTFCandidateBuilder* CSCTFCandidateProducer::my_builder
private