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
CSCSegmentProducer Class Reference

#include <CSCSegmentProducer.h>

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

Public Member Functions

 CSCSegmentProducer (const edm::ParameterSet &)
 Constructor. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 Produce the CSCSegment collection. More...
 
 ~CSCSegmentProducer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

int iev
 
edm::InputTag inputObjectsTag
 
CSCSegmentBuildersegmentBuilder_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

Produces a collection of CSCSegment's in endcap muon CSCs.

Date:
2010/03/11 23:48:11
Revision:
1.7
Author
M. Sani

Definition at line 20 of file CSCSegmentProducer.h.

Constructor & Destructor Documentation

CSCSegmentProducer::CSCSegmentProducer ( const edm::ParameterSet pas)
explicit

Constructor.

Definition at line 18 of file CSCSegmentProducer.cc.

References edm::ParameterSet::getParameter(), inputObjectsTag, and segmentBuilder_.

18  : iev(0) {
19 
20  inputObjectsTag = pas.getParameter<edm::InputTag>("inputObjects");
21  segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS
22 
23  // register what this produces
24  produces<CSCSegmentCollection>();
25 }
T getParameter(std::string const &) const
CSCSegmentBuilder * segmentBuilder_
edm::InputTag inputObjectsTag
CSCSegmentProducer::~CSCSegmentProducer ( )

Destructor.

Definition at line 27 of file CSCSegmentProducer.cc.

References iev, LogDebug, and segmentBuilder_.

27  {
28 
29  LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data.";
30  delete segmentBuilder_;
31 }
#define LogDebug(id)
CSCSegmentBuilder * segmentBuilder_

Member Function Documentation

void CSCSegmentProducer::produce ( edm::Event ev,
const edm::EventSetup setup 
)
virtual

Produce the CSCSegment collection.

Implements edm::EDProducer.

Definition at line 33 of file CSCSegmentProducer.cc.

References CSCSegmentBuilder::build(), edm::EventSetup::get(), edm::Event::getByLabel(), h, iev, inputObjectsTag, LogDebug, edm::Handle< T >::product(), edm::Event::put(), segmentBuilder_, and CSCSegmentBuilder::setGeometry().

33  {
34 
35  LogDebug("CSCSegment|CSC") << "start producing segments for " << ++iev << "th event with csc data";
36 
37  // find the geometry (& conditions?) for this event & cache it in the builder
38 
40  setup.get<MuonGeometryRecord>().get(h);
41  const CSCGeometry* pgeom = &*h;
43 
44  // get the collection of CSCRecHit2D
46  ev.getByLabel(inputObjectsTag, cscRecHits);
47 
48  // create empty collection of Segments
49  std::auto_ptr<CSCSegmentCollection> oc( new CSCSegmentCollection );
50 
51  // fill the collection
52  segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
53 
54  // put collection in event
55  ev.put(oc);
56 }
#define LogDebug(id)
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
CSCSegmentBuilder * segmentBuilder_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
edm::InputTag inputObjectsTag
void setGeometry(const CSCGeometry *geom)

Member Data Documentation

int CSCSegmentProducer::iev
private

Definition at line 30 of file CSCSegmentProducer.h.

Referenced by produce(), and ~CSCSegmentProducer().

edm::InputTag CSCSegmentProducer::inputObjectsTag
private

Definition at line 31 of file CSCSegmentProducer.h.

Referenced by CSCSegmentProducer(), and produce().

CSCSegmentBuilder* CSCSegmentProducer::segmentBuilder_
private

Definition at line 32 of file CSCSegmentProducer.h.

Referenced by CSCSegmentProducer(), produce(), and ~CSCSegmentProducer().