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.2 2013/02/27 18:41:07 wmtan 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&) override;
53  virtual void endJob() ;
54 
55  // ----------member data ---------------------------
57 };
58 
59 //
60 // constants, enums and typedefs
61 //
62 
63 //
64 // static data member definitions
65 //
66 
67 //
68 // constructors and destructor
69 //
71 
72 {
73  config_=iConfig;
74 }
75 
76 
78 {
79 
80  // do anything here that needs to be done at desctruction time
81  // (e.g. close files, deallocate resources etc.)
82 
83 }
84 
85 
86 //
87 // member functions
88 //
89 
90 // ------------ method called for each event ------------
91 void
93 {
94 }
95 
96 
97 // ------------ method called once each job just before starting event loop ------------
98 void
100 {
101 }
102 
103 // ------------ method called once each job just after ending the event loop ------------
104 void
106 {
108  SimBeamSpotObjects * beam = new SimBeamSpotObjects();
109 
110  beam->read(config_);
111 
112  poolDbService->createNewIOV<SimBeamSpotObjects>(beam,
113  poolDbService->beginOfTime(),poolDbService->endOfTime(),
114  "SimBeamSpotObjectsRcd" );
115 
116 }
117 
118 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
119 void
121  //The following says we do not know what parameters are allowed so do no validation
122  // Please change this to state exactly what you do use, even if it is no parameters
124  desc.setUnknown();
125  descriptions.addDefault(desc);
126 }
127 
128 //define this as a plug-in
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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)
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_
virtual void endJob()