DQM
L1TMonitorClient
src
L1TCSCTFClient.cc
Go to the documentation of this file.
1
#include "
DQM/L1TMonitorClient/interface/L1TCSCTFClient.h
"
2
3
#include "
FWCore/ServiceRegistry/interface/Service.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
5
#include "
FWCore/Framework/interface/ESHandle.h
"
6
#include "
FWCore/Framework/interface/EventSetup.h
"
7
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
8
#include "
DQMServices/Core/interface/DQMStore.h
"
9
#include "TRandom.h"
10
using namespace
edm
;
11
using namespace
std
;
12
13
L1TCSCTFClient::L1TCSCTFClient
(
const
edm::ParameterSet
&ps) {
14
parameters
= ps;
15
initialize
();
16
}
17
18
L1TCSCTFClient::~L1TCSCTFClient
() {}
19
20
//--------------------------------------------------------
21
void
L1TCSCTFClient::initialize
() {
22
counterLS = 0;
23
counterEvt = 0;
24
25
input_dir
=
parameters
.getUntrackedParameter<
string
>(
"input_dir"
,
""
);
26
output_dir
=
parameters
.getUntrackedParameter<
string
>(
"output_dir"
,
""
);
27
prescaleLS
=
parameters
.getUntrackedParameter<
int
>(
"prescaleLS"
, -1);
28
prescaleEvt
=
parameters
.getUntrackedParameter<
int
>(
"prescaleEvt"
, -1);
29
30
m_runInEventLoop =
parameters
.getUntrackedParameter<
bool
>(
"runInEventLoop"
,
false
);
31
m_runInEndLumi =
parameters
.getUntrackedParameter<
bool
>(
"runInEndLumi"
,
false
);
32
m_runInEndRun =
parameters
.getUntrackedParameter<
bool
>(
"runInEndRun"
,
false
);
33
m_runInEndJob =
parameters
.getUntrackedParameter<
bool
>(
"runInEndJob"
,
false
);
34
}
35
36
void
L1TCSCTFClient::dqmEndLuminosityBlock
(
DQMStore::IBooker
&,
37
DQMStore::IGetter
&igetter,
38
const
edm::LuminosityBlock
&lumiSeg,
39
const
edm::EventSetup
&
c
) {}
40
41
//--------------------------------------------------------
42
void
L1TCSCTFClient::dqmEndJob
(
DQMStore::IBooker
&ibooker,
DQMStore::IGetter
&igetter) {
43
ibooker.
setCurrentFolder
(
output_dir
);
44
csctferrors_ = ibooker.
book1D
(
"csctferrors_"
,
"CSCTF Errors"
, 6, 0, 6);
45
46
processHistograms(igetter);
47
}
48
49
//--------------------------------------------------------
50
void
L1TCSCTFClient::processHistograms
(
DQMStore::IGetter
&igetter) {
51
igetter.
setCurrentFolder
(
input_dir
);
52
53
vector<string> meVec = igetter.
getMEs
();
54
for
(vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
55
string
full_path =
input_dir
+
"/"
+ (*it);
56
MonitorElement
*
me
= igetter.
get
(full_path);
57
if
(!
me
) {
58
LogInfo
(
"TriggerDQM"
) << full_path <<
" NOT FOUND."
;
59
continue
;
60
}
61
62
// But for now we only do a simple workaround
63
if
((*it) !=
"CSCTF_errors"
)
64
continue
;
65
TH1F *
errors
=
me
->getTH1F();
66
csctferrors_->getTH1F()->Reset();
67
if
(!
errors
)
68
continue
;
69
for
(
int
bin
= 1;
bin
<=
errors
->GetXaxis()->GetNbins();
bin
++)
70
csctferrors_->Fill(
bin
- 0.5,
errors
->GetBinContent(
bin
));
71
}
72
}
L1TCSCTFClient_cfi.input_dir
input_dir
Definition:
L1TCSCTFClient_cfi.py:5
MessageLogger.h
L1TCSCTFClient.h
ESHandle.h
L1TCSCTFClient::L1TCSCTFClient
L1TCSCTFClient(const edm::ParameterSet &ps)
Constructor.
Definition:
L1TCSCTFClient.cc:13
edm::LuminosityBlock
Definition:
LuminosityBlock.h:50
L1TRPCTF_cfi.output_dir
output_dir
Definition:
L1TRPCTF_cfi.py:7
edm
HLT enums.
Definition:
AlignableModifier.h:19
dqm::implementation::IGetter::getMEs
virtual std::vector< std::string > getMEs() const
Definition:
DQMStore.cc:698
edm::LogInfo
Definition:
MessageLogger.h:254
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition:
DQMStore.cc:32
DQMStore.h
dqm::legacy::MonitorElement
Definition:
MonitorElement.h:461
L1TCSCTFClient::initialize
void initialize()
Definition:
L1TCSCTFClient.cc:21
parameters
parameters
Definition:
BeamSpot_PayloadInspector.cc:14
errors
Definition:
errors.py:1
Service.h
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::EventSetup
Definition:
EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
L1TCSCTFClient::processHistograms
void processHistograms(DQMStore::IGetter &)
Definition:
L1TCSCTFClient.cc:50
newFWLiteAna.bin
bin
Definition:
newFWLiteAna.py:161
L1TCSCTFClient_cfi.prescaleLS
prescaleLS
Definition:
L1TCSCTFClient_cfi.py:6
std
Definition:
JetResolutionObject.h:76
L1TCSCTFClient_cfi.prescaleEvt
prescaleEvt
Definition:
L1TCSCTFClient_cfi.py:8
L1TCSCTFClient::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition:
L1TCSCTFClient.cc:36
dqm::implementation::IGetter
Definition:
DQMStore.h:484
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition:
DQMStore.cc:651
EventSetup.h
dqm::implementation::IBooker
Definition:
DQMStore.h:43
initialize
static AlgebraicMatrix initialize()
Definition:
BeamSpotTransientTrackingRecHit.cc:24
ParameterSet.h
L1TCSCTFClient::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition:
L1TCSCTFClient.cc:42
hlt_dqm_clientPB-live_cfg.me
me
Definition:
hlt_dqm_clientPB-live_cfg.py:61
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition:
DQMStore.h:98
L1TCSCTFClient::~L1TCSCTFClient
~L1TCSCTFClient() override
Destructor.
Definition:
L1TCSCTFClient.cc:18
Generated for CMSSW Reference Manual by
1.8.16