1 |
econte |
1.1 |
//
|
2 |
|
|
// Original Author: Boris Mangano
|
3 |
|
|
// Created: Sat Mar 28 20:13:08 CET 2009
|
4 |
|
|
//
|
5 |
|
|
//
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
// system include files
|
9 |
|
|
#include <memory>
|
10 |
|
|
#include "boost/shared_ptr.hpp"
|
11 |
|
|
|
12 |
|
|
// user include files
|
13 |
|
|
#include "FWCore/Framework/interface/ModuleFactory.h"
|
14 |
|
|
#include "FWCore/Framework/interface/ESProducer.h"
|
15 |
|
|
#include "FWCore/Framework/interface/ESHandle.h"
|
16 |
|
|
|
17 |
|
|
#include "TrackingTools/PatternTools/interface/TrajectoryStateClosestToBeamLineBuilder.h"
|
18 |
|
|
#include "TrackingTools/PatternTools/interface/TSCBLBuilderNoMaterial.h"
|
19 |
|
|
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
//
|
23 |
|
|
// class decleration
|
24 |
|
|
//
|
25 |
|
|
|
26 |
|
|
class TSCBLBuilderNoMaterialESProducer : public edm::ESProducer {
|
27 |
|
|
public:
|
28 |
|
|
TSCBLBuilderNoMaterialESProducer(const edm::ParameterSet&);
|
29 |
|
|
~TSCBLBuilderNoMaterialESProducer();
|
30 |
|
|
|
31 |
|
|
typedef boost::shared_ptr<TrajectoryStateClosestToBeamLineBuilder> ReturnType;
|
32 |
|
|
|
33 |
|
|
ReturnType produce(const TrackingComponentsRecord&);
|
34 |
|
|
private:
|
35 |
|
|
// ----------member data ---------------------------
|
36 |
|
|
};
|
37 |
|
|
|
38 |
|
|
//
|
39 |
|
|
// constants, enums and typedefs
|
40 |
|
|
//
|
41 |
|
|
|
42 |
|
|
//
|
43 |
|
|
// static data member definitions
|
44 |
|
|
//
|
45 |
|
|
|
46 |
|
|
//
|
47 |
|
|
// constructors and destructor
|
48 |
|
|
//
|
49 |
|
|
TSCBLBuilderNoMaterialESProducer::TSCBLBuilderNoMaterialESProducer(const edm::ParameterSet& p)
|
50 |
|
|
{
|
51 |
|
|
//the following line is needed to tell the framework what
|
52 |
|
|
// data is being produced
|
53 |
|
|
std::string myName = p.getParameter<std::string>("ComponentName");
|
54 |
|
|
setWhatProduced(this,myName);
|
55 |
|
|
|
56 |
|
|
//now do what ever other initialization is needed
|
57 |
|
|
}
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
TSCBLBuilderNoMaterialESProducer::~TSCBLBuilderNoMaterialESProducer()
|
61 |
|
|
{
|
62 |
|
|
|
63 |
|
|
// do anything here that needs to be done at desctruction time
|
64 |
|
|
// (e.g. close files, deallocate resources etc.)
|
65 |
|
|
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
//
|
70 |
|
|
// member functions
|
71 |
|
|
//
|
72 |
|
|
|
73 |
|
|
// ------------ method called to produce the data ------------
|
74 |
|
|
TSCBLBuilderNoMaterialESProducer::ReturnType
|
75 |
|
|
TSCBLBuilderNoMaterialESProducer::produce(const TrackingComponentsRecord& iRecord)
|
76 |
|
|
{
|
77 |
|
|
using namespace edm::es;
|
78 |
|
|
TSCBLBuilderNoMaterialESProducer::ReturnType pTSCBLBuilderNoMaterial(new TSCBLBuilderNoMaterial()) ;
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
return pTSCBLBuilderNoMaterial ;
|
82 |
|
|
}
|
83 |
|
|
|
84 |
|
|
//define this as a plug-in
|
85 |
|
|
DEFINE_FWK_EVENTSETUP_MODULE(TSCBLBuilderNoMaterialESProducer);
|