Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
}
15
16
FilterTrackerOn::~FilterTrackerOn
()
17
{
18
}
19
20
bool
FilterTrackerOn::filter
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
21
{
22
using namespace
edm;
23
24
ESHandle<SiStripDetVOff>
detVOff;
25
iSetup.
get
<
SiStripDetVOffRcd
>().
get
( detVOff );
26
27
// std::cout << "detVOff->getHVoffCounts() = " << detVOff->getHVoffCounts() << " < " << minModulesWithHVoff_;
28
if
( detVOff->getHVoffCounts() >
minModulesWithHVoff_
) {
29
// std::cout << " skipping event" << std::endl;
30
return
false
;
31
}
32
// cout << " keeping event" << endl;
33
return
true
;
34
}
35
36
// ------------ method called once each job just before starting event loop ------------
37
void
FilterTrackerOn::beginJob
()
38
{
39
}
40
41
// ------------ method called once each job just after ending the event loop ------------
42
void
FilterTrackerOn::endJob
()
43
{
44
}
SiStripCondDataRecords.h
EventSetup.h
FilterTrackerOn::beginJob
virtual void beginJob()
Definition:
FilterTrackerOn.cc:37
FilterTrackerOn::~FilterTrackerOn
~FilterTrackerOn()
Definition:
FilterTrackerOn.cc:16
FilterTrackerOn::minModulesWithHVoff_
int minModulesWithHVoff_
Definition:
FilterTrackerOn.h:42
iEvent
int iEvent
Definition:
GenABIO.cc:243
edm::ESHandle< SiStripDetVOff >
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:44
FilterTrackerOn::FilterTrackerOn
FilterTrackerOn(const edm::ParameterSet &)
Definition:
FilterTrackerOn.cc:11
FilterTrackerOn::endJob
virtual void endJob()
Definition:
FilterTrackerOn.cc:42
FilterTrackerOn.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
FilterTrackerOn::filter
virtual bool filter(edm::Event &, const edm::EventSetup &)
Definition:
FilterTrackerOn.cc:20
SiStripDetVOff.h
edm::ParameterSet
Definition:
ParameterSet.h:35
SiStripDetVOffRcd
Definition:
SiStripCondDataRecords.h:25
edm::Event
Definition:
Event.h:50
Generated for CMSSW Reference Manual by
1.8.5