Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:34

0001 //
0002 // Original Author:  Boris Mangano
0003 //         Created:  Sat Mar 28 20:13:08 CET 2009
0004 //
0005 //
0006 
0007 // system include files
0008 #include <memory>
0009 
0010 // user include files
0011 #include "FWCore/Framework/interface/ModuleFactory.h"
0012 #include "FWCore/Framework/interface/ESProducer.h"
0013 #include "FWCore/Framework/interface/ESHandle.h"
0014 
0015 #include "TrackingTools/PatternTools/interface/TrajectoryStateClosestToBeamLineBuilder.h"
0016 #include "TrackingTools/PatternTools/interface/TSCBLBuilderNoMaterial.h"
0017 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0018 
0019 //
0020 // class decleration
0021 //
0022 
0023 class TSCBLBuilderNoMaterialESProducer : public edm::ESProducer {
0024 public:
0025   TSCBLBuilderNoMaterialESProducer(const edm::ParameterSet&);
0026   ~TSCBLBuilderNoMaterialESProducer() override;
0027 
0028   typedef std::unique_ptr<TrajectoryStateClosestToBeamLineBuilder> ReturnType;
0029 
0030   ReturnType produce(const TrackingComponentsRecord&);
0031 
0032 private:
0033   // ----------member data ---------------------------
0034 };
0035 
0036 //
0037 // constants, enums and typedefs
0038 //
0039 
0040 //
0041 // static data member definitions
0042 //
0043 
0044 //
0045 // constructors and destructor
0046 //
0047 TSCBLBuilderNoMaterialESProducer::TSCBLBuilderNoMaterialESProducer(const edm::ParameterSet& p) {
0048   //the following line is needed to tell the framework what
0049   // data is being produced
0050   std::string myName = p.getParameter<std::string>("ComponentName");
0051   setWhatProduced(this, myName);
0052 
0053   //now do what ever other initialization is needed
0054 }
0055 
0056 TSCBLBuilderNoMaterialESProducer::~TSCBLBuilderNoMaterialESProducer() {
0057   // do anything here that needs to be done at desctruction time
0058   // (e.g. close files, deallocate resources etc.)
0059 }
0060 
0061 //
0062 // member functions
0063 //
0064 
0065 // ------------ method called to produce the data  ------------
0066 TSCBLBuilderNoMaterialESProducer::ReturnType TSCBLBuilderNoMaterialESProducer::produce(
0067     const TrackingComponentsRecord& iRecord) {
0068   using namespace edm::es;
0069   auto pTSCBLBuilderNoMaterial = std::make_unique<TSCBLBuilderNoMaterial>();
0070 
0071   return pTSCBLBuilderNoMaterial;
0072 }
0073 
0074 //define this as a plug-in
0075 DEFINE_FWK_EVENTSETUP_MODULE(TSCBLBuilderNoMaterialESProducer);