CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: BeamProfile2DB.cc,v 1.1 2012/01/17 11:59:18 vlimant Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
30 
32 
36 
37 
38 //
39 // class declaration
40 //
41 
43  public:
44  explicit BeamProfile2DB(const edm::ParameterSet&);
46 
47  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
48 
49 
50  private:
51  virtual void beginJob() ;
52  virtual void analyze(const edm::Event&, const edm::EventSetup&);
53  virtual void endJob() ;
54 
55  virtual void beginRun(edm::Run const&, edm::EventSetup const&);
56  virtual void endRun(edm::Run const&, edm::EventSetup const&);
57  virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&);
58  virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&);
59 
60  // ----------member data ---------------------------
62 };
63 
64 //
65 // constants, enums and typedefs
66 //
67 
68 //
69 // static data member definitions
70 //
71 
72 //
73 // constructors and destructor
74 //
76 
77 {
78  config_=iConfig;
79 }
80 
81 
83 {
84 
85  // do anything here that needs to be done at desctruction time
86  // (e.g. close files, deallocate resources etc.)
87 
88 }
89 
90 
91 //
92 // member functions
93 //
94 
95 // ------------ method called for each event ------------
96 void
98 {
99 }
100 
101 
102 // ------------ method called once each job just before starting event loop ------------
103 void
105 {
106 }
107 
108 // ------------ method called once each job just after ending the event loop ------------
109 void
111 {
113  SimBeamSpotObjects * beam = new SimBeamSpotObjects();
114 
115  beam->read(config_);
116 
117  poolDbService->createNewIOV<SimBeamSpotObjects>(beam,
118  poolDbService->beginOfTime(),poolDbService->endOfTime(),
119  "SimBeamSpotObjectsRcd" );
120 
121 }
122 
123 // ------------ method called when starting to processes a run ------------
124 void
126 {
127 }
128 
129 // ------------ method called when ending the processing of a run ------------
130 void
132 {
133 }
134 
135 // ------------ method called when starting to processes a luminosity block ------------
136 void
138 {
139 }
140 
141 // ------------ method called when ending the processing of a luminosity block ------------
142 void
144 {
145 }
146 
147 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
148 void
150  //The following says we do not know what parameters are allowed so do no validation
151  // Please change this to state exactly what you do use, even if it is no parameters
153  desc.setUnknown();
154  descriptions.addDefault(desc);
155 }
156 
157 //define this as a plug-in
virtual void endRun(edm::Run const &, edm::EventSetup const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
virtual void beginJob()
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void read(edm::ParameterSet &p)
int iEvent
Definition: GenABIO.cc:243
void addDefault(ParameterSetDescription const &psetDescription)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
BeamProfile2DB(const edm::ParameterSet &)
edm::ParameterSet config_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: Run.h:33
virtual void endJob()