CMS 3D CMS Logo

NavigationSchoolESProducer.cc
Go to the documentation of this file.
2 
3 #include <memory>
4 
5 // user include files
8 
11 
14 
15 //
16 // class decleration
17 //
18 
20 public:
22 
23  typedef std::unique_ptr<NavigationSchool> ReturnType;
24 
25  virtual ReturnType produce(const NavigationSchoolRecord&);
26 
27  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
28 
29 private:
30  // ----------member data ---------------------------
34 };
35 
36 //
37 //
38 // constructors and destructor
39 //
41  : navigationSchoolName_(iConfig.getParameter<std::string>("ComponentName")) {
42  //the following line is needed to tell the framework what
43  // data is being produced
44 
45  auto cc = setWhatProduced(this, navigationSchoolName_);
46  magFieldToken_ = cc.consumes(edm::ESInputTag("", iConfig.getParameter<std::string>("SimpleMagneticField")));
47  geometricSearchTrackerToken_ = cc.consumes();
48 
49  //now do what ever other initialization is needed
50 }
51 
52 //
53 // member functions
54 //
55 
56 // ------------ method called to produce the data ------------
58  using namespace edm::es;
59 
60  //get the geometricsearch tracker geometry
63 }
64 
67  desc.add<std::string>("ComponentName");
68  desc.add<std::string>("SimpleMagneticField", "");
69  descriptions.addDefault(desc);
70 }
71 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
virtual ReturnType produce(const NavigationSchoolRecord &)
std::unique_ptr< NavigationSchool > ReturnType
void addDefault(ParameterSetDescription const &psetDescription)
#define dso_hidden
Definition: Visibility.h:12
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > geometricSearchTrackerToken_
#define get
NavigationSchoolESProducer(const edm::ParameterSet &)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const