Main Page
Namespaces
Classes
Package Documentation
CalibTracker
SiStripDCS
plugins
FilterTrackerOn.cc
Go to the documentation of this file.
1
#include "
CalibTracker/SiStripDCS/plugins/FilterTrackerOn.h
"
2
3
#include "
FWCore/Framework/interface/ESHandle.h
"
4
#include "
FWCore/Framework/interface/EventSetup.h
"
5
#include "
CondFormats/SiStripObjects/interface/SiStripDetVOff.h
"
6
#include "
CondFormats/DataRecord/interface/SiStripCondDataRecords.h
"
7
8
#include <iostream>
9
#include <algorithm>
10
11
FilterTrackerOn::FilterTrackerOn
(
const
edm::ParameterSet
& iConfig)
12
: minModulesWithHVoff_(iConfig.getParameter<
int
>(
"MinModulesWithHVoff"
)) {}
13
14
FilterTrackerOn::~FilterTrackerOn
() {}
15
16
bool
FilterTrackerOn::filter
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
17
using namespace
edm
;
18
19
ESHandle<SiStripDetVOff>
detVOff;
20
iSetup.
get
<
SiStripDetVOffRcd
>().
get
(detVOff);
21
22
// std::cout << "detVOff->getHVoffCounts() = " << detVOff->getHVoffCounts() << " < " << minModulesWithHVoff_;
23
if
(detVOff->
getHVoffCounts
() >
minModulesWithHVoff_
) {
24
// std::cout << " skipping event" << std::endl;
25
return
false
;
26
}
27
// cout << " keeping event" << endl;
28
return
true
;
29
}
30
31
// ------------ method called once each job just before starting event loop ------------
32
void
FilterTrackerOn::beginJob
() {}
33
34
// ------------ method called once each job just after ending the event loop ------------
35
void
FilterTrackerOn::endJob
() {}
SiStripCondDataRecords.h
EventSetup.h
FilterTrackerOn::minModulesWithHVoff_
int minModulesWithHVoff_
Definition:
FilterTrackerOn.h:40
iEvent
int iEvent
Definition:
GenABIO.cc:224
createfilelist.int
int
Definition:
createfilelist.py:10
FilterTrackerOn::~FilterTrackerOn
~FilterTrackerOn() override
Definition:
FilterTrackerOn.cc:14
edm::ESHandle< SiStripDetVOff >
FilterTrackerOn::filter
bool filter(edm::Event &, const edm::EventSetup &) override
Definition:
FilterTrackerOn.cc:16
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:57
SiStripDetVOff::getHVoffCounts
int getHVoffCounts() const
Returns the total number of modules with HV off.
Definition:
SiStripDetVOff.cc:121
FilterTrackerOn::FilterTrackerOn
FilterTrackerOn(const edm::ParameterSet &)
Definition:
FilterTrackerOn.cc:11
FilterTrackerOn.h
SiStripDetVOff.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:71
edm::ParameterSet
Definition:
ParameterSet.h:36
SiStripDetVOffRcd
Definition:
SiStripCondDataRecords.h:28
edm::Event
Definition:
Event.h:71
FilterTrackerOn::endJob
void endJob() override
Definition:
FilterTrackerOn.cc:35
FilterTrackerOn::beginJob
void beginJob() override
Definition:
FilterTrackerOn.cc:32
Generated for CMSSW Reference Manual by
1.8.11