test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME0SegmentProducer.cc
Go to the documentation of this file.
1 
7 
11 
13 
17 
19 
20  theME0RecHitToken = consumes<ME0RecHitCollection>(ps.getParameter<edm::InputTag>("me0RecHitLabel"));
21  segmentBuilder_ = std::unique_ptr<ME0SegmentBuilder>(new ME0SegmentBuilder(ps)); // pass on the Parameter Set
22 
23  // register what this produces
24  produces<ME0SegmentCollection>();
25 }
26 
28 
30 
31  LogDebug("ME0SegmentProducer") << "start producing segments for " << ++iev << "th event with csc data";
32 
33  // find the geometry (& conditions?) for this event & cache it in the builder
35  setup.get<MuonGeometryRecord>().get(me0g);
36  const ME0Geometry* mgeom = &*me0g;
37  segmentBuilder_->setGeometry(mgeom);
38 
39 
40  // get the collection of ME0RecHit
42  ev.getByToken(theME0RecHitToken,me0RecHits);
43 
44  // create empty collection of Segments
45  std::auto_ptr<ME0SegmentCollection> oc( new ME0SegmentCollection );
46 
47  // fill the collection
48  segmentBuilder_->build(me0RecHits.product(), *oc); //@@ FILL oc
49 
50  // put collection in event
51  ev.put(oc);
52 }
#define LogDebug(id)
T getParameter(std::string const &) const
std::unique_ptr< ME0SegmentBuilder > segmentBuilder_
~ME0SegmentProducer()
Destructor.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
bool ev
ME0SegmentProducer(const edm::ParameterSet &)
Constructor.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
edm::EDGetTokenT< ME0RecHitCollection > theME0RecHitToken
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:56
virtual void produce(edm::Event &, const edm::EventSetup &)
Produce the ME0Segment collection.