CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTPGParamReaderFromDB.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 
4 // user include files
7 
10 
12 
13 using namespace std;
14 
16  public:
19 
20  private:
21  virtual void beginJob() override ;
22  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
23  virtual void endJob() override ;
24 
29  int port;
30  int min_run;
31  int n_run;
32 };
33 
34 
36 
37 
39 {
40  host = ps.getParameter<std::string>("host");
41  sid = ps.getParameter<std::string>("sid");
42  user = ps.getParameter<std::string>("user");
43  pass = ps.getParameter<std::string>("pass");
44  port = ps.getParameter<int>("port");
45  min_run = ps.getParameter<int>("min_run");
46  n_run = ps.getParameter<int>("n_run");
47 }
48 
49 
50 
52 {
53 }
54 
55 
56 
58 {
59  try {
60  EcalTPGDBApp app( sid, user, pass);
61 
62  //int i ;
63  //app.readTPGPedestals(i);
64  //app.writeTPGLUT();
65  //app.writeTPGWeights();
66 
67  } catch (exception &e) {
68  cout << "ERROR: " << e.what() << endl;
69  } catch (...) {
70  cout << "Unknown error caught" << endl;
71  }
72 
73  cout << "All Done." << endl;
74 }
75 
76 
77 
79 {
80 }
81 
82 
83 
85 }
86 
87 //define this as a plug-in
T getParameter(std::string const &) const
EcalTPGParamReaderFromDB(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool ev
int port
Definition: query.py:115
void beginJob()
Definition: Breakpoints.cc:15
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
string host
Definition: query.py:114
virtual void beginJob() override
virtual void endJob() override
tuple cout
Definition: gather_cfg.py:121