CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCSegmentProducer.cc
Go to the documentation of this file.
1 
7 
11 
13 
17 
19 
20  inputObjectsTag = 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.getByLabel(inputObjectsTag, cscRecHits);
47 
48  // create empty collection of Segments
49  std::auto_ptr<CSCSegmentCollection> oc( new CSCSegmentCollection );
50 
51  // fill the collection
52  segmentBuilder_->build(cscRecHits.product(), *oc); //@@ FILL oc
53 
54  // put collection in event
55  ev.put(oc);
56 }
#define LogDebug(id)
T getParameter(std::string const &) const
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
virtual void produce(edm::Event &, const edm::EventSetup &)
Produce the CSCSegment collection.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
CSCSegmentBuilder * segmentBuilder_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
CSCSegmentProducer(const edm::ParameterSet &)
Constructor.
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
~CSCSegmentProducer()
Destructor.
edm::InputTag inputObjectsTag
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void setGeometry(const CSCGeometry *geom)