CMS 3D CMS Logo

CSCSegmentProducer.cc
Go to the documentation of this file.
1 
7 
12 
14 
17 
19 
20  m_token = consumes<CSCRecHit2DCollection>( pas.getParameter<edm::InputTag>("inputObjects") );
21  segmentBuilder_ = new CSCSegmentBuilder(pas); // pass on the PS
22 
23  // register what this produces
24  produces<CSCSegmentCollection>();
25 }
26 
28 
29  LogDebug("CSCSegment|CSC") << "deleting CSCSegmentBuilder after " << iev << " events w/csc data.";
30  delete segmentBuilder_;
31 }
32 
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.getByToken( m_token, cscRecHits);
47 
48  // create empty collection of Segments
49  auto oc = std::make_unique<CSCSegmentCollection>();
50 
51  // fill the collection
52  segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
53 
54  // put collection in event
55  ev.put(std::move(oc));
56 }
#define LogDebug(id)
virtual void produce(edm::Event &, const edm::EventSetup &) override
Produce the CSCSegment collection.
T getParameter(std::string const &) const
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
bool ev
edm::EDGetTokenT< CSCRecHit2DCollection > m_token
CSCSegmentBuilder * segmentBuilder_
T const * product() const
Definition: Handle.h:81
CSCSegmentProducer(const edm::ParameterSet &)
Constructor.
const T & get() const
Definition: EventSetup.h:56
~CSCSegmentProducer()
Destructor.
void setGeometry(const CSCGeometry *geom)
def move(src, dest)
Definition: eostools.py:510