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 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
29 
31 
35 
36 
37 //
38 // class declaration
39 //
40 
42  public:
43  explicit BeamProfile2DB(const edm::ParameterSet&);
44  ~BeamProfile2DB() override;
45 
46  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
47 
48 
49  private:
50  void beginJob() override ;
51  void analyze(const edm::Event&, const edm::EventSetup&) override;
52  void endJob() override ;
53 
54  // ----------member data ---------------------------
56 };
57 
58 //
59 // constants, enums and typedefs
60 //
61 
62 //
63 // static data member definitions
64 //
65 
66 //
67 // constructors and destructor
68 //
70 
71 {
72  config_=iConfig;
73 }
74 
75 
77 {
78 
79  // do anything here that needs to be done at desctruction time
80  // (e.g. close files, deallocate resources etc.)
81 
82 }
83 
84 
85 //
86 // member functions
87 //
88 
89 // ------------ method called for each event ------------
90 void
92 {
93 }
94 
95 
96 // ------------ method called once each job just before starting event loop ------------
97 void
99 {
100 }
101 
102 // ------------ method called once each job just after ending the event loop ------------
103 void
105 {
107  SimBeamSpotObjects * beam = new SimBeamSpotObjects();
108 
109  beam->read(config_);
110 
111  poolDbService->createNewIOV<SimBeamSpotObjects>(beam,
112  poolDbService->beginOfTime(),poolDbService->endOfTime(),
113  "SimBeamSpotObjectsRcd" );
114 
115 }
116 
117 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
118 void
120  //The following says we do not know what parameters are allowed so do no validation
121  // Please change this to state exactly what you do use, even if it is no parameters
123  desc.setUnknown();
124  descriptions.addDefault(desc);
125 }
126 
127 //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_