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::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 &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

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

Date:
2010/02/11 00:14:04
Revision:
1.5
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:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
CSCSegmentBuilder * segmentBuilder_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
edm::InputTag inputObjectsTag
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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().