CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RoadMapESSource.cc
Go to the documentation of this file.
1 //
2 // Package: RecoTracker/RoadMapESSource
3 // Class: RoadMapESSource
4 //
5 // Description: Reads in ASCII dump of Roads object
6 // and provides it to the event.
7 //
8 // Original Author: Oliver Gutsche, gutsche@fnal.gov
9 // Created: Thu Jan 12 21:00:00 UTC 2006
10 //
11 // $Author: gutsche $
12 // $Date: 2007/03/30 02:49:38 $
13 // $Revision: 1.7 $
14 //
15 
18 
21 
22 //
23 // constructors and destructor
24 //
26  fileName_((iConfig.getParameter<edm::FileInPath>("InputFileName")).fullPath())
27 {
28 
29  std::string componentName = iConfig.getParameter<std::string>("ComponentName");
30  setWhatProduced(this, componentName);
31 
32  ringsLabel_ = iConfig.getParameter<std::string>("RingsLabel");
33 
34  findingRecord<RoadMapRecord>();
35 
36  roads_ = 0;
37 }
38 
39 
41 {
42 }
43 
46 {
47 
48  // get rings
49  edm::ESHandle<Rings> ringHandle;
50  iRecord.getRecord<RingRecord>().get(ringsLabel_, ringHandle);
51  const Rings *rings = ringHandle.product();
52 
53  roads_ = new Roads(fileName_,rings);
54 
55  std::auto_ptr<Roads> roads(roads_);
56 
57  return roads ;
58 }
59 
62 }
63 
64 //define this as a plug-in
66 
ReturnType produce(const RoadMapRecord &)
T getParameter(std::string const &) const
std::string fileName_
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::string ringsLabel_
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
std::auto_ptr< Roads > ReturnType
Definition: Roads.h:34
RoadMapESSource(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
static const IOVSyncValue & beginOfTime()
Definition: Rings.h:27
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
Definition: SourceFactory.h:82
T const * product() const
Definition: ESHandle.h:62
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)