CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Attributes

NavigationSchoolESProducer Class Reference

#include <NavigationSchoolESProducer.h>

Inheritance diagram for NavigationSchoolESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider CfgNavigationSchoolESProducer SkippingLayerCosmicNavigationSchoolESProducer

List of all members.

Public Types

typedef boost::shared_ptr
< NavigationSchool
ReturnType

Public Member Functions

 NavigationSchoolESProducer (const edm::ParameterSet &)
virtual ReturnType produce (const NavigationSchoolRecord &)
 ~NavigationSchoolESProducer ()

Protected Attributes

edm::ParameterSet theNavigationPSet
boost::shared_ptr
< NavigationSchool
theNavigationSchool
std::string theNavigationSchoolName

Detailed Description

Definition at line 20 of file NavigationSchoolESProducer.h.


Member Typedef Documentation

Definition at line 25 of file NavigationSchoolESProducer.h.


Constructor & Destructor Documentation

NavigationSchoolESProducer::NavigationSchoolESProducer ( const edm::ParameterSet iConfig)

Definition at line 8 of file NavigationSchoolESProducer.cc.

References edm::ParameterSet::getParameter(), edm::ESProducer::setWhatProduced(), AlCaHLTBitMon_QueryRunRegistry::string, theNavigationPSet, and theNavigationSchoolName.

{
  theNavigationPSet = iConfig;
  theNavigationSchoolName = theNavigationPSet.getParameter<std::string>("ComponentName");
  //the following line is needed to tell the framework what
  // data is being produced
  setWhatProduced(this, theNavigationSchoolName);
  
  //now do what ever other initialization is needed
}
NavigationSchoolESProducer::~NavigationSchoolESProducer ( )

Definition at line 20 of file NavigationSchoolESProducer.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

NavigationSchoolESProducer::ReturnType NavigationSchoolESProducer::produce ( const NavigationSchoolRecord iRecord) [virtual]

Reimplemented in CfgNavigationSchoolESProducer, and SkippingLayerCosmicNavigationSchoolESProducer.

Definition at line 35 of file NavigationSchoolESProducer.cc.

References SurfaceDeformationFactory::create(), reco::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), theNavigationSchool, and theNavigationSchoolName.

{
   using namespace edm::es;

   // get the field
   edm::ESHandle<MagneticField>                field;
   iRecord.getRecord<IdealMagneticFieldRecord>().get(field);

   //get the geometricsearch tracker geometry
   edm::ESHandle<GeometricSearchTracker>         geometricSearchTracker;
   iRecord.getRecord<TrackerRecoGeometryRecord>().get(geometricSearchTracker);
   
   theNavigationSchool.reset(NavigationSchoolFactory::get()->create(theNavigationSchoolName,
                                                                    geometricSearchTracker.product(),
                                                                    field.product()));
   return theNavigationSchool ;
}

Member Data Documentation

Definition at line 31 of file NavigationSchoolESProducer.h.

Referenced by NavigationSchoolESProducer(), and produce().