#include <RoadMapMakerESProducer.h>
Public Types | |
typedef std::auto_ptr< Roads > | ReturnType |
Public Member Functions | |
ReturnType | produce (const RoadMapRecord &) |
RoadMapMakerESProducer (const edm::ParameterSet &) | |
~RoadMapMakerESProducer () | |
Private Attributes | |
std::string | fileName_ |
RoadMaker::GeometryStructure | geometryStructure_ |
std::string | ringsLabel_ |
Roads * | roads_ |
RoadMaker::SeedingType | seedingType_ |
bool | writeOut_ |
Definition at line 33 of file RoadMapMakerESProducer.h.
typedef std::auto_ptr<Roads> RoadMapMakerESProducer::ReturnType |
Definition at line 40 of file RoadMapMakerESProducer.h.
RoadMapMakerESProducer::RoadMapMakerESProducer | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 21 of file RoadMapMakerESProducer.cc.
References fileName_, RoadMaker::FourRingSeeds, RoadMaker::FullDetector, RoadMaker::FullDetectorII, geometryStructure_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), RoadMaker::MTCC, RoadMaker::P5, ringsLabel_, roads_, seedingType_, edm::ESProducer::setWhatProduced(), RoadMaker::TIF, RoadMaker::TIFTIB, RoadMaker::TIFTIBTOB, RoadMaker::TIFTOB, RoadMaker::TIFTOBTEC, RoadMaker::TwoRingSeeds, and writeOut_.
{ std::string componentName = iConfig.getParameter<std::string>("ComponentName"); setWhatProduced(this, componentName); ringsLabel_ = iConfig.getParameter<std::string>("RingsLabel"); writeOut_ = iConfig.getUntrackedParameter<bool>("WriteOutRoadMapToAsciiFile",false); fileName_ = iConfig.getUntrackedParameter<std::string>("RoadMapAsciiFile",""); std::string tmp_string = iConfig.getParameter<std::string>("GeometryStructure"); if ( tmp_string == "MTCC" ) { geometryStructure_ = RoadMaker::MTCC; } else if ( tmp_string == "TIF" ) { geometryStructure_ = RoadMaker::TIF; } else if ( tmp_string == "TIFTOB" ) { geometryStructure_ = RoadMaker::TIFTOB; } else if ( tmp_string == "TIFTIB" ) { geometryStructure_ = RoadMaker::TIFTIB; }else if ( tmp_string == "TIFTIBTOB" ) { geometryStructure_ = RoadMaker::TIFTIBTOB; }else if ( tmp_string == "TIFTOBTEC" ) { geometryStructure_ = RoadMaker::TIFTOBTEC; } else if ( tmp_string == "P5" ) { geometryStructure_ = RoadMaker::P5; } else if ( tmp_string == "FullDetector" ) { geometryStructure_ = RoadMaker::FullDetector; } else if ( tmp_string == "FullDetectorII" ) { geometryStructure_ = RoadMaker::FullDetectorII; } else { geometryStructure_ = RoadMaker::FullDetector; } tmp_string = iConfig.getParameter<std::string>("SeedingType"); if ( tmp_string == "TwoRingSeeds" ) { seedingType_ = RoadMaker::TwoRingSeeds; } else if ( tmp_string == "FourRingSeeds" ) { seedingType_ = RoadMaker::FourRingSeeds; } else { seedingType_ = RoadMaker::FourRingSeeds; } roads_ = 0; }
RoadMapMakerESProducer::~RoadMapMakerESProducer | ( | ) |
Definition at line 71 of file RoadMapMakerESProducer.cc.
{ }
RoadMapMakerESProducer::ReturnType RoadMapMakerESProducer::produce | ( | const RoadMapRecord & | iRecord | ) |
Definition at line 77 of file RoadMapMakerESProducer.cc.
References Roads::dump(), fileName_, geometryStructure_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), RoadMaker::getRoads(), edm::ESHandle< T >::product(), RingESSource_cfi::rings, ringsLabel_, roads_, seedingType_, and writeOut_.
{ // get rings edm::ESHandle<Rings> ringHandle; iRecord.getRecord<RingRecord>().get(ringsLabel_, ringHandle); const Rings *rings = ringHandle.product(); RoadMaker maker(rings, geometryStructure_, seedingType_); roads_ = maker.getRoads(); ReturnType pRoads(roads_) ; if ( writeOut_ ) { roads_->dump(fileName_); } return pRoads ; }
std::string RoadMapMakerESProducer::fileName_ [private] |
Definition at line 47 of file RoadMapMakerESProducer.h.
Referenced by produce(), and RoadMapMakerESProducer().
Definition at line 49 of file RoadMapMakerESProducer.h.
Referenced by produce(), and RoadMapMakerESProducer().
std::string RoadMapMakerESProducer::ringsLabel_ [private] |
Definition at line 52 of file RoadMapMakerESProducer.h.
Referenced by produce(), and RoadMapMakerESProducer().
Roads* RoadMapMakerESProducer::roads_ [private] |
Definition at line 54 of file RoadMapMakerESProducer.h.
Referenced by produce(), and RoadMapMakerESProducer().
Definition at line 50 of file RoadMapMakerESProducer.h.
Referenced by produce(), and RoadMapMakerESProducer().
bool RoadMapMakerESProducer::writeOut_ [private] |
Definition at line 46 of file RoadMapMakerESProducer.h.
Referenced by produce(), and RoadMapMakerESProducer().