CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RoadMapMakerESProducer.cc
Go to the documentation of this file.
1 //
2 // Package: RecoTracker/RoadMapMakerESProducer
3 // Class: RoadMapMakerESProducer
4 //
5 // Description: Uses the RoadMaker object to construct
6 // and provide a Roads object.
7 //
8 // Original Author: Oliver Gutsche, gutsche@fnal.gov
9 // Created: Thu Jan 12 21:00:00 UTC 2006
10 //
11 // $Author: noeding $
12 // $Date: 2008/02/28 22:12:10 $
13 // $Revision: 1.12 $
14 //
15 
17 
20 
22 {
23 
24  std::string componentName = iConfig.getParameter<std::string>("ComponentName");
25  setWhatProduced(this, componentName);
26 
27  ringsLabel_ = iConfig.getParameter<std::string>("RingsLabel");
28 
29  writeOut_ = iConfig.getUntrackedParameter<bool>("WriteOutRoadMapToAsciiFile",false);
30  fileName_ = iConfig.getUntrackedParameter<std::string>("RoadMapAsciiFile","");
31 
32  std::string tmp_string = iConfig.getParameter<std::string>("GeometryStructure");
33 
34  if ( tmp_string == "MTCC" ) {
36  } else if ( tmp_string == "TIF" ) {
38  } else if ( tmp_string == "TIFTOB" ) {
40  } else if ( tmp_string == "TIFTIB" ) {
42  }else if ( tmp_string == "TIFTIBTOB" ) {
44  }else if ( tmp_string == "TIFTOBTEC" ) {
46  } else if ( tmp_string == "P5" ) {
48  } else if ( tmp_string == "FullDetector" ) {
50  } else if ( tmp_string == "FullDetectorII" ) {
52  } else {
54  }
55 
56  tmp_string = iConfig.getParameter<std::string>("SeedingType");
57 
58  if ( tmp_string == "TwoRingSeeds" ) {
60  } else if ( tmp_string == "FourRingSeeds" ) {
62  } else {
64  }
65 
66  roads_ = 0;
67 
68 }
69 
70 
72 {
73 }
74 
75 
78 {
79 
80  // get rings
81  edm::ESHandle<Rings> ringHandle;
82  iRecord.getRecord<RingRecord>().get(ringsLabel_, ringHandle);
83  const Rings *rings = ringHandle.product();
84 
85  RoadMaker maker(rings,
87  seedingType_);
88 
89  roads_ = maker.getRoads();
90 
91  ReturnType pRoads(roads_) ;
92 
93  if ( writeOut_ ) {
95  }
96 
97  return pRoads ;
98 }
99 
100 //define this as a plug-in
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
RoadMaker::GeometryStructure geometryStructure_
Roads * getRoads()
Definition: RoadMaker.h:86
RoadMapMakerESProducer(const edm::ParameterSet &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnType produce(const RoadMapRecord &)
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:73
std::auto_ptr< Roads > ReturnType
Definition: Rings.h:27
RoadMaker::SeedingType seedingType_
T const * product() const
Definition: ESHandle.h:62
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:56
void dump(std::string ascii_filename="roads.dat") const
Definition: Roads.cc:173