DQM
SiPixelPhase1Common
src
SiPixelPhase1Base.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Class: SiPixelPhase1Base
4
//
5
// Implementations of the class
6
//
7
// Original Author: Yi-Mu "Enoch" Chen
8
9
#include "
DQM/SiPixelPhase1Common/interface/SiPixelPhase1Base.h
"
10
11
// Constructor requires manually looping the trigger flag settings
12
// Since constructor of GenericTriggerEventFlag requires
13
// EDConsumerBase class protected member calls
14
SiPixelPhase1Base::SiPixelPhase1Base
(
const
edm::ParameterSet
& iConfig)
15
:
DQMEDAnalyzer
(),
HistogramManagerHolder
(iConfig, consumesCollector()) {
16
// Flags will default to empty vector if not specified in configuration file
17
auto
flags
= iConfig.
getUntrackedParameter
<
edm::VParameterSet
>(
"triggerflags"
, {});
18
19
for
(
auto
&
flag
:
flags
) {
20
triggerlist
.emplace_back(
new
GenericTriggerEventFlag
(
flag
, consumesCollector(), *
this
));
21
}
22
}
23
24
// Booking histograms as required by the DQM
25
void
SiPixelPhase1Base::bookHistograms
(
DQMStore::IBooker
& iBooker,
edm::Run
const
&
run
,
edm::EventSetup
const
& iSetup) {
26
for
(
HistogramManager
& histoman :
histo
) {
27
histoman.book(iBooker, iSetup);
28
}
29
30
// Running trigger flag initialization (per run)
31
for
(
auto
&
trigger
:
triggerlist
) {
32
if
(
trigger
->on()) {
33
trigger
->initRun(
run
, iSetup);
34
}
35
}
36
}
37
38
// trigger checking function
39
bool
SiPixelPhase1Base::checktrigger
(
const
edm::Event
&
iEvent
,
40
const
edm::EventSetup
& iSetup,
41
const
unsigned
trgidx)
const
{
42
//true if no trigger, MC, off, or accepted
43
44
return
triggerlist
.empty() || !
iEvent
.isRealData() || !
triggerlist
.at(trgidx)->on() ||
45
triggerlist
.at(trgidx)->accept(
iEvent
, iSetup);
46
}
edm::Run
Definition:
Run.h:45
SiPixelPhase1Base::triggerlist
std::vector< std::unique_ptr< GenericTriggerEventFlag > > triggerlist
Definition:
SiPixelPhase1Base.h:68
HistogramManager
Definition:
HistogramManager.h:31
edm::VParameterSet
std::vector< ParameterSet > VParameterSet
Definition:
ParameterSet.h:34
HistogramManagerHolder::histo
std::vector< HistogramManager > histo
Definition:
SiPixelPhase1Base.h:37
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
SiPixelPhase1Base::SiPixelPhase1Base
SiPixelPhase1Base(const edm::ParameterSet &iConfig)
Definition:
SiPixelPhase1Base.cc:14
DQMEDAnalyzer
Definition:
DQMEDAnalyzer.py:1
edm::ParameterSet
Definition:
ParameterSet.h:47
HistogramManagerHolder
Definition:
SiPixelPhase1Base.h:27
GenericTriggerEventFlag
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
Definition:
GenericTriggerEventFlag.h:42
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:58
SiPixelPhase1Base::bookHistograms
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &run, edm::EventSetup const &) override
Definition:
SiPixelPhase1Base.cc:25
SiPixelPhase1Base.h
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
dqm::implementation::IBooker
Definition:
DQMStore.h:43
trigger
Definition:
HLTPrescaleTableCond.h:8
HLT_FULL_cff.flags
flags
Definition:
HLT_FULL_cff.py:13150
edm::Event
Definition:
Event.h:73
SiPixelPhase1Base::checktrigger
bool checktrigger(const edm::Event &iEvent, const edm::EventSetup &, const unsigned trgidx) const
Definition:
SiPixelPhase1Base.cc:39
RemoveAddSevLevel.flag
flag
Definition:
RemoveAddSevLevel.py:116
Generated for CMSSW Reference Manual by
1.8.16