CMS 3D CMS Logo

CSCSegmentProducer Class Reference

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

#include <RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h>

Inheritance diagram for CSCSegmentProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 CSCSegmentProducer (const edm::ParameterSet &)
 Constructor.
virtual void produce (edm::Event &, const edm::EventSetup &)
 Produce the CSCSegment collection.
 ~CSCSegmentProducer ()
 Destructor.

Private Attributes

int iev
edm::InputTag inputObjectsTag
CSCSegmentBuildersegmentBuilder_


Detailed Description

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

Date
2006/08/01 15:26:03
Revision
1.4
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 21 of file CSCSegmentProducer.cc.

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

00021                                                                  : iev(0) {
00022         
00023     inputObjectsTag = pas.getParameter<edm::InputTag>("inputObjects");
00024     segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS
00025 
00026         // register what this produces
00027     produces<CSCSegmentCollection>();
00028 }

CSCSegmentProducer::~CSCSegmentProducer (  ) 

Destructor.

Definition at line 30 of file CSCSegmentProducer.cc.

References iev, LogDebug, and segmentBuilder_.

00030                                         {
00031 
00032     LogDebug("CSC") << "deleting segmentBuilder_ after " << iev << " events.\n";
00033     delete segmentBuilder_;
00034 }


Member Function Documentation

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

Produce the CSCSegment collection.

Implements edm::EDProducer.

Definition at line 36 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().

00036                                                                          {
00037 
00038     LogDebug("CSC") << "Start producing segments for event " << ++iev << "\n";
00039         
00040     // find the geometry (& conditions?) for this event & cache it in the builder
00041   
00042     edm::ESHandle<CSCGeometry> h;
00043     setup.get<MuonGeometryRecord>().get(h);
00044     const CSCGeometry* pgeom = &*h;
00045     segmentBuilder_->setGeometry(pgeom);
00046         
00047     // get the collection of CSCRecHit2D
00048     edm::Handle<CSCRecHit2DCollection> cscRecHits;
00049     ev.getByLabel(inputObjectsTag, cscRecHits);  
00050 
00051     // create empty collection of Segments
00052     std::auto_ptr<CSCSegmentCollection> oc( new CSCSegmentCollection );
00053 
00054         // fill the collection
00055     segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
00056 
00057     // put collection in event
00058     ev.put(oc);
00059 }


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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:27 2009 for CMSSW by  doxygen 1.5.4