#include <CSCSegmentProducer.h>
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 |
CSCSegmentBuilder * | segmentBuilder_ |
Produces a collection of CSCSegment's in endcap muon CSCs.
Definition at line 20 of file CSCSegmentProducer.h.
CSCSegmentProducer::CSCSegmentProducer | ( | const edm::ParameterSet & | pas | ) | [explicit] |
Constructor.
Definition at line 18 of file CSCSegmentProducer.cc.
References edm::ParameterSet::getParameter(), inputObjectsTag, and segmentBuilder_.
: iev(0) { inputObjectsTag = pas.getParameter<edm::InputTag>("inputObjects"); segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS // register what this produces produces<CSCSegmentCollection>(); }
CSCSegmentProducer::~CSCSegmentProducer | ( | ) |
Destructor.
Definition at line 27 of file CSCSegmentProducer.cc.
References iev, LogDebug, and segmentBuilder_.
{ LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data."; delete segmentBuilder_; }
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().
{ LogDebug("CSCSegment|CSC") << "start producing segments for " << ++iev << "th event with csc data"; // find the geometry (& conditions?) for this event & cache it in the builder edm::ESHandle<CSCGeometry> h; setup.get<MuonGeometryRecord>().get(h); const CSCGeometry* pgeom = &*h; segmentBuilder_->setGeometry(pgeom); // get the collection of CSCRecHit2D edm::Handle<CSCRecHit2DCollection> cscRecHits; ev.getByLabel(inputObjectsTag, cscRecHits); // create empty collection of Segments std::auto_ptr<CSCSegmentCollection> oc( new CSCSegmentCollection ); // fill the collection segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc // put collection in event ev.put(oc); }
int CSCSegmentProducer::iev [private] |
Definition at line 30 of file CSCSegmentProducer.h.
Referenced by produce(), and ~CSCSegmentProducer().
Definition at line 31 of file CSCSegmentProducer.h.
Referenced by CSCSegmentProducer(), and produce().
Definition at line 32 of file CSCSegmentProducer.h.
Referenced by CSCSegmentProducer(), produce(), and ~CSCSegmentProducer().