Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-03 23:51:41

0001 // system include files
0002 #include <memory>
0003 
0004 // user include files
0005 #include "FWCore/Framework/interface/Frameworkfwd.h"
0006 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0007 
0008 #include "FWCore/Framework/interface/Event.h"
0009 #include "FWCore/Framework/interface/MakerMacros.h"
0010 
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 
0013 using namespace std;
0014 
0015 class EcalTPGParamReaderFromDB : public edm::one::EDAnalyzer<> {
0016 public:
0017   explicit EcalTPGParamReaderFromDB(const edm::ParameterSet&);
0018   ~EcalTPGParamReaderFromDB() override;
0019 
0020 private:
0021   void beginJob() override;
0022   void analyze(const edm::Event&, const edm::EventSetup&) override;
0023   void endJob() override;
0024 
0025   std::string host;
0026   std::string sid;
0027   std::string user;
0028   std::string pass;
0029   int port;
0030   int min_run;
0031   int n_run;
0032 };
0033 
0034 #include "CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBApp.h"
0035 
0036 EcalTPGParamReaderFromDB::EcalTPGParamReaderFromDB(const edm::ParameterSet& ps) {
0037   host = ps.getParameter<std::string>("host");
0038   sid = ps.getParameter<std::string>("sid");
0039   user = ps.getParameter<std::string>("user");
0040   pass = ps.getParameter<std::string>("pass");
0041   port = ps.getParameter<int>("port");
0042   min_run = ps.getParameter<int>("min_run");
0043   n_run = ps.getParameter<int>("n_run");
0044 }
0045 
0046 EcalTPGParamReaderFromDB::~EcalTPGParamReaderFromDB() {}
0047 
0048 void EcalTPGParamReaderFromDB::analyze(const edm::Event& ev, const edm::EventSetup& es) {
0049   EcalTPGDBApp app(sid, user, pass);
0050 }
0051 
0052 void EcalTPGParamReaderFromDB::beginJob() {}
0053 
0054 void EcalTPGParamReaderFromDB::endJob() {}
0055 
0056 //define this as a plug-in
0057 DEFINE_FWK_MODULE(EcalTPGParamReaderFromDB);