CMS 3D CMS Logo

CSCSegmentProducer.cc
Go to the documentation of this file.
1 
7 
12 
14 
17 
19  m_token = consumes<CSCRecHit2DCollection>(pas.getParameter<edm::InputTag>("inputObjects"));
20  segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS
21 
22  // register what this produces
23  produces<CSCSegmentCollection>();
24 }
25 
27  LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data.";
28  delete segmentBuilder_;
29 }
30 
32  LogDebug("CSCSegment|CSC") << "start producing segments for " << ++iev << "th event with csc data";
33 
34  // find the geometry (& conditions?) for this event & cache it in the builder
35 
37  setup.get<MuonGeometryRecord>().get(h);
38  const CSCGeometry* pgeom = &*h;
40 
41  // get the collection of CSCRecHit2D
43  ev.getByToken(m_token, cscRecHits);
44 
45  // create empty collection of Segments
46  auto oc = std::make_unique<CSCSegmentCollection>();
47 
48  // fill the collection
49  segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
50 
51  // put collection in event
52  ev.put(std::move(oc));
53 }
#define LogDebug(id)
void produce(edm::Event &, const edm::EventSetup &) override
Produce the CSCSegment collection.
T getParameter(std::string const &) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool ev
edm::EDGetTokenT< CSCRecHit2DCollection > m_token
CSCSegmentBuilder * segmentBuilder_
T const * product() const
Definition: Handle.h:69
CSCSegmentProducer(const edm::ParameterSet &)
Constructor.
T get() const
Definition: EventSetup.h:73
~CSCSegmentProducer() override
Destructor.
void setGeometry(const CSCGeometry *geom)
def move(src, dest)
Definition: eostools.py:511