Main Page
Namespaces
Classes
Package Documentation
CalibCalorimetry
EcalTPGTools
plugins
EcalTPGParamReaderFromDB.cc
Go to the documentation of this file.
1
// system include files
2
#include <memory>
3
4
// user include files
5
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
6
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
7
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/MakerMacros.h
"
10
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
13
using namespace
std
;
14
15
class
EcalTPGParamReaderFromDB
:
public
edm::EDAnalyzer
{
16
public
:
17
explicit
EcalTPGParamReaderFromDB
(
const
edm::ParameterSet
&);
18
~
EcalTPGParamReaderFromDB
()
override
;
19
20
private
:
21
void
beginJob
()
override
;
22
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
23
void
endJob()
override
;
24
25
std::string
host
;
26
std::string
sid
;
27
std::string
user
;
28
std::string
pass
;
29
int
port
;
30
int
min_run
;
31
int
n_run
;
32
};
33
34
35
#include "
CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBApp.h
"
36
37
38
EcalTPGParamReaderFromDB::EcalTPGParamReaderFromDB
(
const
edm::ParameterSet
& ps)
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
51
EcalTPGParamReaderFromDB::~EcalTPGParamReaderFromDB
()
52
{
53
}
54
55
56
57
void
EcalTPGParamReaderFromDB::analyze
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& es)
58
{
59
EcalTPGDBApp
app( sid,
user
, pass);
60
61
//int i ;
62
//app.readTPGPedestals(i);
63
//app.writeTPGLUT();
64
//app.writeTPGWeights();
65
66
}
67
68
69
70
void
EcalTPGParamReaderFromDB::beginJob
()
71
{
72
}
73
74
75
76
void
EcalTPGParamReaderFromDB::endJob
() {
77
}
78
79
//define this as a plug-in
80
DEFINE_FWK_MODULE
(
EcalTPGParamReaderFromDB
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
query.host
host
Definition:
query.py:114
EcalTPGParamReaderFromDB::EcalTPGParamReaderFromDB
EcalTPGParamReaderFromDB(const edm::ParameterSet &)
Definition:
EcalTPGParamReaderFromDB.cc:38
EcalTPGParamReaderFromDB::sid
std::string sid
Definition:
EcalTPGParamReaderFromDB.cc:26
analyze
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
EcalTPGParamReaderFromDB::port
int port
Definition:
EcalTPGParamReaderFromDB.cc:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
std
Definition:
JetResolutionObject.h:76
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
EcalTPGDBApp
Definition:
EcalTPGDBApp.h:16
Frameworkfwd.h
query.port
port
Definition:
query.py:115
EcalTPGParamReaderFromDB::host
std::string host
Definition:
EcalTPGParamReaderFromDB.cc:25
bk::beginJob
void beginJob()
Definition:
Breakpoints.cc:15
ParameterSet.h
EcalTPGParamReaderFromDB::user
std::string user
Definition:
EcalTPGParamReaderFromDB.cc:27
EcalTPGParamReaderFromDB
Definition:
EcalTPGParamReaderFromDB.cc:15
EcalTPGParamReaderFromDB::pass
std::string pass
Definition:
EcalTPGParamReaderFromDB.cc:28
EcalTPGParamReaderFromDB::n_run
int n_run
Definition:
EcalTPGParamReaderFromDB.cc:31
edm::EventSetup
Definition:
EventSetup.h:48
dataset.user
user
Definition:
dataset.py:44
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
EDAnalyzer.h
EcalTPGParamReaderFromDB::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
EcalTPGParamReaderFromDB.cc:57
EcalTPGParamReaderFromDB::beginJob
void beginJob() override
Definition:
EcalTPGParamReaderFromDB.cc:70
EcalTPGDBApp.h
EcalTPGParamReaderFromDB::~EcalTPGParamReaderFromDB
~EcalTPGParamReaderFromDB() override
Definition:
EcalTPGParamReaderFromDB.cc:51
EcalTPGParamReaderFromDB::endJob
void endJob() override
Definition:
EcalTPGParamReaderFromDB.cc:76
edm::ParameterSet
Definition:
ParameterSet.h:36
EcalTPGParamReaderFromDB::min_run
int min_run
Definition:
EcalTPGParamReaderFromDB.cc:30
edm::Event
Definition:
Event.h:69
Generated for CMSSW Reference Manual by
1.8.11