CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/TrackingTools/PatternTools/plugins/TSCBLBuilderNoMaterialESProducer.cc

Go to the documentation of this file.
00001 //
00002 // Original Author:  Boris Mangano
00003 //         Created:  Sat Mar 28 20:13:08 CET 2009
00004 //
00005 //
00006 
00007 
00008 // system include files
00009 #include <memory>
00010 #include "boost/shared_ptr.hpp"
00011 
00012 // user include files
00013 #include "FWCore/Framework/interface/ModuleFactory.h"
00014 #include "FWCore/Framework/interface/ESProducer.h"
00015 #include "FWCore/Framework/interface/ESHandle.h"
00016 
00017 #include "TrackingTools/PatternTools/interface/TrajectoryStateClosestToBeamLineBuilder.h"
00018 #include "TrackingTools/PatternTools/interface/TSCBLBuilderNoMaterial.h"
00019 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
00020 
00021 
00022 //
00023 // class decleration
00024 //
00025 
00026 class TSCBLBuilderNoMaterialESProducer : public edm::ESProducer {
00027    public:
00028       TSCBLBuilderNoMaterialESProducer(const edm::ParameterSet&);
00029       ~TSCBLBuilderNoMaterialESProducer();
00030 
00031       typedef boost::shared_ptr<TrajectoryStateClosestToBeamLineBuilder> ReturnType;
00032 
00033       ReturnType produce(const TrackingComponentsRecord&);
00034    private:
00035       // ----------member data ---------------------------
00036 };
00037 
00038 //
00039 // constants, enums and typedefs
00040 //
00041 
00042 //
00043 // static data member definitions
00044 //
00045 
00046 //
00047 // constructors and destructor
00048 //
00049 TSCBLBuilderNoMaterialESProducer::TSCBLBuilderNoMaterialESProducer(const edm::ParameterSet& p)
00050 {
00051    //the following line is needed to tell the framework what
00052    // data is being produced
00053   std::string myName = p.getParameter<std::string>("ComponentName");
00054   setWhatProduced(this,myName);
00055 
00056    //now do what ever other initialization is needed
00057 }
00058 
00059 
00060 TSCBLBuilderNoMaterialESProducer::~TSCBLBuilderNoMaterialESProducer()
00061 {
00062  
00063    // do anything here that needs to be done at desctruction time
00064    // (e.g. close files, deallocate resources etc.)
00065 
00066 }
00067 
00068 
00069 //
00070 // member functions
00071 //
00072 
00073 // ------------ method called to produce the data  ------------
00074 TSCBLBuilderNoMaterialESProducer::ReturnType
00075 TSCBLBuilderNoMaterialESProducer::produce(const TrackingComponentsRecord& iRecord)
00076 {
00077    using namespace edm::es;
00078    TSCBLBuilderNoMaterialESProducer::ReturnType pTSCBLBuilderNoMaterial(new TSCBLBuilderNoMaterial()) ;
00079 
00080 
00081    return pTSCBLBuilderNoMaterial ;
00082 }
00083 
00084 //define this as a plug-in
00085 DEFINE_FWK_EVENTSETUP_MODULE(TSCBLBuilderNoMaterialESProducer);