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
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)
 
virtual ~CSCTFCandidateProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- 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

edm::EDGetTokenT
< L1CSCTrackCollection
input_module
 
CSCTFCandidateBuildermy_builder
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer 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::EDProducer
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 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 ( )
virtual

Definition at line 19 of file CSCTFCandidateProducer.cc.

References my_builder, and NULL.

20 {
21  delete my_builder;
22  my_builder = NULL;
23 }
#define NULL
Definition: scimark2.h:8
CSCTFCandidateBuilder * my_builder

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 25 of file CSCTFCandidateProducer.cc.

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

26 {
28  std::auto_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(cand_product,"CSC");
35 }
edm::EDGetTokenT< L1CSCTrackCollection > input_module
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
CSCTFCandidateBuilder * my_builder
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
void buildCandidates(const L1CSCTrackCollection *, std::vector< L1MuRegionalCand > *) const
T const * product() const
Definition: Handle.h:81
tuple tracks
Definition: testEve_cfg.py:39

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