CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
RoadMapMakerESProducer Class Reference

#include <RoadMapMakerESProducer.h>

Inheritance diagram for RoadMapMakerESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::auto_ptr< RoadsReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

ReturnType produce (const RoadMapRecord &)
 
 RoadMapMakerESProducer (const edm::ParameterSet &)
 
 ~RoadMapMakerESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

std::string fileName_
 
RoadMaker::GeometryStructure geometryStructure_
 
std::string ringsLabel_
 
Roadsroads_
 
RoadMaker::SeedingType seedingType_
 
bool writeOut_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 33 of file RoadMapMakerESProducer.h.

Member Typedef Documentation

typedef std::auto_ptr<Roads> RoadMapMakerESProducer::ReturnType

Definition at line 40 of file RoadMapMakerESProducer.h.

Constructor & Destructor Documentation

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_.

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 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
RoadMaker::GeometryStructure geometryStructure_
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
RoadMaker::SeedingType seedingType_
RoadMapMakerESProducer::~RoadMapMakerESProducer ( )

Definition at line 71 of file RoadMapMakerESProducer.cc.

72 {
73 }

Member Function Documentation

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< class >::product(), RingESSource_cfi::rings, ringsLabel_, roads_, seedingType_, and writeOut_.

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 }
RoadMaker::GeometryStructure geometryStructure_
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
void dump(std::string ascii_filename="roads.dat") const
Definition: Roads.cc:173

Member Data Documentation

std::string RoadMapMakerESProducer::fileName_
private

Definition at line 47 of file RoadMapMakerESProducer.h.

Referenced by produce(), and RoadMapMakerESProducer().

RoadMaker::GeometryStructure RoadMapMakerESProducer::geometryStructure_
private

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().

RoadMaker::SeedingType RoadMapMakerESProducer::seedingType_
private

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().