src
CalibCalorimetry
EcalTrivialCondModules
interface
EcalLaserCondTools.h
Go to the documentation of this file.
1
#ifndef CalibCalorimetry_EcalTrivialCondModules_EcaLaserCondTools_h
2
#define CalibCalorimetry_EcalTrivialCondModules_EcaLaserCondTools_h
3
4
/*
5
* $Id: EcalLaserCondTools.h,v 1.2 2010/06/14 10:45:16 pgras Exp $
6
*/
7
8
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
9
#include "
FWCore/Framework/interface/one/EDAnalyzer.h
"
10
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
11
#include "
FWCore/ServiceRegistry/interface/Service.h
"
12
#include "
CondCore/DBOutputService/interface/PoolDBOutputService.h
"
13
#include "
CondFormats/EcalObjects/interface/EcalLaserAPDPNRatios.h
"
14
#include "
CondFormats/DataRecord/interface/EcalLaserAPDPNRatiosRcd.h
"
15
16
#include "
DataFormats/DetId/interface/DetId.h
"
17
18
#include <cstdio>
19
#include <ctime>
20
#include <string>
21
#include <vector>
24
class
EcalLaserCondTools
:
public
edm::one::EDAnalyzer
<> {
25
//static fields
26
29
static
constexpr
int
nLmes
= 92;
30
31
//methods
32
public
:
36
EcalLaserCondTools
(
const
edm::ParameterSet
&);
37
40
~EcalLaserCondTools
()
override
;
41
46
void
analyze
(
const
edm::Event
& evt,
const
edm::EventSetup
& es)
override
;
47
void
from_hdf_to_db
();
48
49
private
:
50
static
std::string
toNth
(
int
n
);
51
static
std::string
timeToString
(time_t
t
);
52
class
CorrReader
{
53
public
:
54
CorrReader
() :
verb_
(0) {}
55
virtual
bool
readTime
(
int
&
t1
,
int
t2
[
nLmes
],
int
&
t3
) {
return
false
; }
56
virtual
bool
readPs
(
DetId
& rawdetid,
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
&
corr
) {
return
false
; }
57
virtual
~CorrReader
() {}
58
void
setVerbosity
(
int
verb) {
verb_
= verb; }
59
60
protected
:
61
int
verb_
;
62
};
63
64
class
FileReader
:
public
EcalLaserCondTools::CorrReader
{
65
public
:
66
FileReader
(
const
std::vector<std::string>&
fnames
) :
f_
(nullptr),
fnames_
(
fnames
),
ifile_
(-1),
iline_
(0) {}
67
bool
readTime
(
int
&
t1
,
int
t2
[
EcalLaserCondTools::nLmes
],
int
&
t3
)
override
;
68
bool
readPs
(
DetId
& rawdetid,
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
&
corr
)
override
;
69
~FileReader
()
override
{}
70
71
private
:
72
bool
nextFile
();
73
void
trim
();
74
FILE*
f_
;
75
std::vector<std::string>
fnames_
;
76
unsigned
ifile_
;
77
int
iline_
;
78
};
79
80
private
:
81
void
fillDb
(
CorrReader
&
r
);
82
void
dbToAscii
(
const
edm::EventSetup
& es);
83
void
processIov
(
CorrReader
&
r
,
int
t1
,
int
t2
[
nLmes
],
int
t3
);
84
85
//fields
86
private
:
87
edm::ESGetToken<EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd>
laserAPDPNRatiosToken_
;
88
FILE*
fout_
;
89
FILE*
eventList_
;
90
std::string
eventListFileName_
;
91
int
verb_
;
92
std::string
mode_
;
93
std::vector<std::string>
fnames_
;
94
edm::Service<cond::service::PoolDBOutputService>
db_
;
95
int
skipIov_
;
96
int
nIovs_
;
97
int
fromTime_
;
98
int
toTime_
;
99
double
minP_
,
maxP_
;
100
FILE*
ferr_
;
101
};
102
103
#endif //EcaLaserCondTools_h not defined
EcalLaserCondTools::FileReader::trim
void trim()
Definition:
EcalLaserCondTools.cc:575
EcalLaserCondTools::fnames_
std::vector< std::string > fnames_
Definition:
EcalLaserCondTools.h:93
EcalLaserCondTools::FileReader::iline_
int iline_
Definition:
EcalLaserCondTools.h:77
EcalLaserCondTools::EcalLaserCondTools
EcalLaserCondTools(const edm::ParameterSet &)
Definition:
EcalLaserCondTools.cc:25
edm::Service< cond::service::PoolDBOutputService >
EcalLaserCondTools::fillDb
void fillDb(CorrReader &r)
Definition:
EcalLaserCondTools.cc:259
EcalLaserCondTools::fout_
FILE * fout_
Definition:
EcalLaserCondTools.h:88
EcalLaserCondTools::~EcalLaserCondTools
~EcalLaserCondTools() override
Definition:
EcalLaserCondTools.cc:52
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:649
EcalLaserCondTools::FileReader::f_
FILE * f_
Definition:
EcalLaserCondTools.h:74
EcalLaserCondTools::timeToString
static std::string timeToString(time_t t)
Definition:
EcalLaserCondTools.cc:614
EcalLaserCondTools::db_
edm::Service< cond::service::PoolDBOutputService > db_
Definition:
EcalLaserCondTools.h:94
EcalLaserCondTools::processIov
void processIov(CorrReader &r, int t1, int t2[nLmes], int t3)
Definition:
EcalLaserCondTools.cc:334
EcalLaserCondTools::verb_
int verb_
Definition:
EcalLaserCondTools.h:91
ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr
if constexpr(n > 3)
Definition:
BrokenLine.h:164
EcalLaserCondTools::CorrReader::readPs
virtual bool readPs(DetId &rawdetid, EcalLaserAPDPNRatios::EcalLaserAPDPNpair &corr)
Definition:
EcalLaserCondTools.h:56
EcalLaserCondTools::CorrReader::readTime
virtual bool readTime(int &t1, int t2[nLmes], int &t3)
Definition:
EcalLaserCondTools.h:55
EcalLaserCondTools::from_hdf_to_db
void from_hdf_to_db()
Definition:
EcalLaserCondTools.cc:79
Frameworkfwd.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
EcalLaserCondTools::CorrReader::CorrReader
CorrReader()
Definition:
EcalLaserCondTools.h:54
EcalLaserCondTools::dbToAscii
void dbToAscii(const edm::EventSetup &es)
Definition:
EcalLaserCondTools.cc:623
EcalLaserCondTools::FileReader::ifile_
unsigned ifile_
Definition:
EcalLaserCondTools.h:76
ParameterSet.h
EcalLaserCondTools::nIovs_
int nIovs_
Definition:
EcalLaserCondTools.h:96
EcalLaserCondTools::FileReader::readPs
bool readPs(DetId &rawdetid, EcalLaserAPDPNRatios::EcalLaserAPDPNpair &corr) override
Definition:
EcalLaserCondTools.cc:521
EcalLaserCondTools::FileReader::readTime
bool readTime(int &t1, int t2[EcalLaserCondTools::nLmes], int &t3) override
Definition:
EcalLaserCondTools.cc:470
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd >
RandomServiceHelper.t1
t1
Definition:
RandomServiceHelper.py:256
PoolDBOutputService.h
alignCSCRings.corr
dictionary corr
Definition:
alignCSCRings.py:124
EcalLaserAPDPNRatiosRcd.h
RandomServiceHelper.t3
t3
Definition:
RandomServiceHelper.py:258
EcalLaserCondTools::nLmes
static constexpr int nLmes
Definition:
EcalLaserCondTools.h:29
EcalLaserCondTools::eventListFileName_
std::string eventListFileName_
Definition:
EcalLaserCondTools.h:90
EcalLaserCondTools::mode_
std::string mode_
Definition:
EcalLaserCondTools.h:92
EcalLaserCondTools::CorrReader::~CorrReader
virtual ~CorrReader()
Definition:
EcalLaserCondTools.h:57
Service.h
EcalLaserCondTools::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &es) override
Definition:
EcalLaserCondTools.cc:59
edm::EventSetup
Definition:
EventSetup.h:56
EcalLaserCondTools::FileReader::~FileReader
~FileReader() override
Definition:
EcalLaserCondTools.h:69
EcalLaserCondTools::toTime_
int toTime_
Definition:
EcalLaserCondTools.h:98
EcalLaserCondTools::CorrReader::verb_
int verb_
Definition:
EcalLaserCondTools.h:61
EcalLaserCondTools::skipIov_
int skipIov_
Definition:
EcalLaserCondTools.h:95
EcalLaserCondTools::ferr_
FILE * ferr_
Definition:
EcalLaserCondTools.h:100
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
EcalLaserCondTools::maxP_
double maxP_
Definition:
EcalLaserCondTools.h:99
DetId
Definition:
DetId.h:17
EcalLaserCondTools::FileReader
Definition:
EcalLaserCondTools.h:64
EcalLaserCondTools
Definition:
EcalLaserCondTools.h:24
EcalLaserCondTools::eventList_
FILE * eventList_
Definition:
EcalLaserCondTools.h:89
EcalLaserAPDPNRatios.h
EcalLaserCondTools::fromTime_
int fromTime_
Definition:
EcalLaserCondTools.h:97
EcalLaserCondTools::FileReader::FileReader
FileReader(const std::vector< std::string > &fnames)
Definition:
EcalLaserCondTools.h:66
EDAnalyzer.h
EcalLaserCondTools::toNth
static std::string toNth(int n)
Definition:
EcalLaserCondTools.cc:591
EcalLaserCondTools::laserAPDPNRatiosToken_
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > laserAPDPNRatiosToken_
Definition:
EcalLaserCondTools.h:87
EcalLaserCondTools::FileReader::fnames_
std::vector< std::string > fnames_
Definition:
EcalLaserCondTools.h:75
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
Definition:
EcalLaserAPDPNRatios.h:16
edm::ParameterSet
Definition:
ParameterSet.h:48
EcalLaserCondTools::CorrReader
Definition:
EcalLaserCondTools.h:52
EcalLaserCondTools::minP_
double minP_
Definition:
EcalLaserCondTools.h:99
edm::Event
Definition:
Event.h:73
SiStripCommissioningSource_FromRAW_cfg.fnames
fnames
Definition:
SiStripCommissioningSource_FromRAW_cfg.py:143
DetId.h
edm::one::EDAnalyzer
Definition:
EDAnalyzer.h:30
EcalLaserCondTools::FileReader::nextFile
bool nextFile()
Definition:
EcalLaserCondTools.cc:448
EcalLaserCondTools::CorrReader::setVerbosity
void setVerbosity(int verb)
Definition:
EcalLaserCondTools.h:58
RandomServiceHelper.t2
t2
Definition:
RandomServiceHelper.py:257
Generated for CMSSW Reference Manual by
1.8.14