CMS 3D CMS Logo

BeamProfile2DB.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: BeamProfile2DB
4 // Class: BeamProfile2DB
5 //
13 //
14 // Original Author: Jean-Roch Vlimant,40 3-A28,+41227671209,
15 // Created: Fri Jan 6 14:49:42 CET 2012
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
25 
28 
30 
34 
35 //
36 // class declaration
37 //
38 
40 public:
41  explicit BeamProfile2DB(const edm::ParameterSet&);
42  ~BeamProfile2DB() override;
43 
44  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
45 
46 private:
47  void beginJob() override;
48  void analyze(const edm::Event&, const edm::EventSetup&) override;
49  void endJob() override;
50 
51  // ----------member data ---------------------------
53 };
54 
55 //
56 // constants, enums and typedefs
57 //
58 
59 //
60 // static data member definitions
61 //
62 
63 //
64 // constructors and destructor
65 //
67 
68 {
69  config_ = iConfig;
70 }
71 
73  // do anything here that needs to be done at desctruction time
74  // (e.g. close files, deallocate resources etc.)
75 }
76 
77 //
78 // member functions
79 //
80 
81 // ------------ method called for each event ------------
83 
84 // ------------ method called once each job just before starting event loop ------------
86 
87 // ------------ method called once each job just after ending the event loop ------------
91 
92  beam->read(config_);
93 
94  poolDbService->createNewIOV<SimBeamSpotObjects>(
95  beam, poolDbService->beginOfTime(), poolDbService->endOfTime(), "SimBeamSpotObjectsRcd");
96 }
97 
98 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
100  //The following says we do not know what parameters are allowed so do no validation
101  // Please change this to state exactly what you do use, even if it is no parameters
103  desc.setUnknown();
104  descriptions.addDefault(desc);
105 }
106 
107 //define this as a plug-in
void analyze(const edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~BeamProfile2DB() override
void beginJob() override
void read(edm::ParameterSet &p)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void addDefault(ParameterSetDescription const &psetDescription)
void endJob() override
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
BeamProfile2DB(const edm::ParameterSet &)
edm::ParameterSet config_