CalibCalorimetry
EcalTrivialCondModules
interface
EcalLaserCondTools.h
Go to the documentation of this file.
1
#ifndef EcaLaserCondTools_h
2
#define 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/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
15
#include "
DataFormats/DetId/interface/DetId.h
"
16
17
#include <cstdio>
18
#include <ctime>
19
#include <string>
20
#include <vector>
23
class
EcalLaserCondTools
:
public
edm::EDAnalyzer
{
24
//static fields
25
28
static
constexpr
int
nLmes
= 92;
29
30
//methods
31
public
:
35
EcalLaserCondTools
(
const
edm::ParameterSet
&);
36
39
~EcalLaserCondTools
()
override
;
40
45
void
analyze
(
const
edm::Event
& evt,
const
edm::EventSetup
& es)
override
;
46
void
from_hdf_to_db
();
47
48
private
:
49
static
std::string
toNth
(
int
n
);
50
static
std::string
timeToString
(time_t
t
);
51
class
CorrReader
{
52
public
:
53
CorrReader
() :
verb_
(0) {}
54
virtual
bool
readTime
(
int
&
t1
,
int
t2
[
nLmes
],
int
&
t3
) {
return
false
; }
55
virtual
bool
readPs
(
DetId
& rawdetid,
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
&
corr
) {
return
false
; }
56
virtual
~CorrReader
() {}
57
void
setVerbosity
(
int
verb) {
verb_
= verb; }
58
59
protected
:
60
int
verb_
;
61
};
62
63
class
FileReader
:
public
EcalLaserCondTools::CorrReader
{
64
public
:
65
FileReader
(
const
std::vector<std::string>&
fnames
) :
f_
(nullptr),
fnames_
(
fnames
),
ifile_
(-1),
iline_
(0) {}
66
bool
readTime
(
int
&
t1
,
int
t2
[
EcalLaserCondTools::nLmes
],
int
&
t3
)
override
;
67
bool
readPs
(
DetId
& rawdetid,
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
&
corr
)
override
;
68
~FileReader
()
override
{}
69
70
private
:
71
bool
nextFile
();
72
void
trim
();
73
FILE*
f_
;
74
std::vector<std::string>
fnames_
;
75
unsigned
ifile_
;
76
int
iline_
;
77
};
78
79
private
:
80
void
fillDb
(
CorrReader
&
r
);
81
void
dbToAscii
(
const
edm::EventSetup
& es);
82
void
processIov
(
CorrReader
&
r
,
int
t1
,
int
t2
[
nLmes
],
int
t3
);
83
84
//fields
85
private
:
86
FILE*
fout_
;
87
FILE*
eventList_
;
88
std::string
eventListFileName_
;
89
int
verb_
;
90
std::string
mode_
;
91
std::vector<std::string>
fnames_
;
92
edm::Service<cond::service::PoolDBOutputService>
db_
;
93
int
skipIov_
;
94
int
nIovs_
;
95
int
fromTime_
;
96
int
toTime_
;
97
double
minP_
,
maxP_
;
98
FILE*
ferr_
;
99
};
100
101
#endif //EcaLaserCondTools_h not defined
RandomServiceHelper.t2
t2
Definition:
RandomServiceHelper.py:257
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
EcalLaserCondTools::from_hdf_to_db
void from_hdf_to_db()
Definition:
EcalLaserCondTools.cc:82
EcalLaserCondTools::FileReader
Definition:
EcalLaserCondTools.h:63
EcalLaserCondTools::verb_
int verb_
Definition:
EcalLaserCondTools.h:89
EcalLaserCondTools::FileReader::nextFile
bool nextFile()
Definition:
EcalLaserCondTools.cc:445
EcalLaserCondTools::dbToAscii
void dbToAscii(const edm::EventSetup &es)
Definition:
EcalLaserCondTools.cc:620
EcalLaserCondTools::CorrReader::readTime
virtual bool readTime(int &t1, int t2[nLmes], int &t3)
Definition:
EcalLaserCondTools.h:54
EDAnalyzer.h
EcalLaserCondTools::CorrReader::setVerbosity
void setVerbosity(int verb)
Definition:
EcalLaserCondTools.h:57
EcalLaserCondTools::EcalLaserCondTools
EcalLaserCondTools(const edm::ParameterSet &)
Definition:
EcalLaserCondTools.cc:26
EcalLaserCondTools::FileReader::ifile_
unsigned ifile_
Definition:
EcalLaserCondTools.h:75
EcalLaserCondTools::~EcalLaserCondTools
~EcalLaserCondTools() override
Definition:
EcalLaserCondTools.cc:49
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
EcalLaserCondTools::timeToString
static std::string timeToString(time_t t)
Definition:
EcalLaserCondTools.cc:611
EcalLaserCondTools::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &es) override
Definition:
EcalLaserCondTools.cc:56
EcalLaserCondTools::db_
edm::Service< cond::service::PoolDBOutputService > db_
Definition:
EcalLaserCondTools.h:92
DetId
Definition:
DetId.h:17
EcalLaserCondTools::eventListFileName_
std::string eventListFileName_
Definition:
EcalLaserCondTools.h:88
EcalLaserCondTools::mode_
std::string mode_
Definition:
EcalLaserCondTools.h:90
RandomServiceHelper.t1
t1
Definition:
RandomServiceHelper.py:256
EcalLaserCondTools::toTime_
int toTime_
Definition:
EcalLaserCondTools.h:96
PoolDBOutputService.h
EcalLaserCondTools::FileReader::f_
FILE * f_
Definition:
EcalLaserCondTools.h:73
EcalLaserCondTools::processIov
void processIov(CorrReader &r, int t1, int t2[nLmes], int t3)
Definition:
EcalLaserCondTools.cc:336
alignCSCRings.corr
dictionary corr
Definition:
alignCSCRings.py:124
Service.h
EcalLaserCondTools::CorrReader
Definition:
EcalLaserCondTools.h:51
EcalLaserCondTools::FileReader::readPs
bool readPs(DetId &rawdetid, EcalLaserAPDPNRatios::EcalLaserAPDPNpair &corr) override
Definition:
EcalLaserCondTools.cc:518
EcalLaserCondTools::CorrReader::verb_
int verb_
Definition:
EcalLaserCondTools.h:60
EcalLaserCondTools::FileReader::readTime
bool readTime(int &t1, int t2[EcalLaserCondTools::nLmes], int &t3) override
Definition:
EcalLaserCondTools.cc:467
EcalLaserCondTools::CorrReader::CorrReader
CorrReader()
Definition:
EcalLaserCondTools.h:53
RandomServiceHelper.t3
t3
Definition:
RandomServiceHelper.py:258
EcalLaserCondTools::FileReader::~FileReader
~FileReader() override
Definition:
EcalLaserCondTools.h:68
EcalLaserCondTools::maxP_
double maxP_
Definition:
EcalLaserCondTools.h:97
EcalLaserCondTools::fromTime_
int fromTime_
Definition:
EcalLaserCondTools.h:95
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EcalLaserCondTools::nIovs_
int nIovs_
Definition:
EcalLaserCondTools.h:94
EcalLaserAPDPNRatios::EcalLaserAPDPNpair
Definition:
EcalLaserAPDPNRatios.h:16
edm::ParameterSet
Definition:
ParameterSet.h:47
EcalLaserCondTools::CorrReader::readPs
virtual bool readPs(DetId &rawdetid, EcalLaserAPDPNRatios::EcalLaserAPDPNpair &corr)
Definition:
EcalLaserCondTools.h:55
edm::Service< cond::service::PoolDBOutputService >
EcalLaserCondTools::toNth
static std::string toNth(int n)
Definition:
EcalLaserCondTools.cc:588
EcalLaserCondTools::nLmes
static constexpr int nLmes
Definition:
EcalLaserCondTools.h:28
edm::EventSetup
Definition:
EventSetup.h:58
EcalLaserAPDPNRatios.h
EcalLaserCondTools::minP_
double minP_
Definition:
EcalLaserCondTools.h:97
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
EcalLaserCondTools::ferr_
FILE * ferr_
Definition:
EcalLaserCondTools.h:98
DetId.h
Frameworkfwd.h
EcalLaserCondTools::skipIov_
int skipIov_
Definition:
EcalLaserCondTools.h:93
EcalLaserCondTools::FileReader::fnames_
std::vector< std::string > fnames_
Definition:
EcalLaserCondTools.h:74
EcalLaserCondTools
Definition:
EcalLaserCondTools.h:23
EcalLaserCondTools::FileReader::trim
void trim()
Definition:
EcalLaserCondTools.cc:572
EcalLaserCondTools::fnames_
std::vector< std::string > fnames_
Definition:
EcalLaserCondTools.h:91
EcalLaserCondTools::CorrReader::~CorrReader
virtual ~CorrReader()
Definition:
EcalLaserCondTools.h:56
ParameterSet.h
EcalLaserCondTools::eventList_
FILE * eventList_
Definition:
EcalLaserCondTools.h:87
EcalLaserCondTools::fillDb
void fillDb(CorrReader &r)
Definition:
EcalLaserCondTools.cc:261
SiStripCommissioningSource_FromRAW_cfg.fnames
fnames
Definition:
SiStripCommissioningSource_FromRAW_cfg.py:143
EcalLaserCondTools::fout_
FILE * fout_
Definition:
EcalLaserCondTools.h:86
edm::Event
Definition:
Event.h:73
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
EcalLaserCondTools::FileReader::FileReader
FileReader(const std::vector< std::string > &fnames)
Definition:
EcalLaserCondTools.h:65
EcalLaserCondTools::FileReader::iline_
int iline_
Definition:
EcalLaserCondTools.h:76
Generated for CMSSW Reference Manual by
1.8.16