Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DQM
TrackerCommon
plugins
SimpleEventFilter.cc
Go to the documentation of this file.
1
#include "
DQM/TrackerCommon/plugins/SimpleEventFilter.h
"
2
#include <iostream>
3
4
//
5
// -- Constructor
6
//
7
SimpleEventFilter::SimpleEventFilter
(
const
edm::ParameterSet
& pset ) {
8
nInterval_
= pset.
getUntrackedParameter
<
int
>(
"EventsToSkip"
, 10 );
9
verbose_
= pset.
getUntrackedParameter
<
bool
>(
"DebugOn"
,
false
);
10
nEvent_
= 0;
11
}
12
//
13
// -- Destructor
14
//
15
SimpleEventFilter::~SimpleEventFilter
() {
16
}
17
18
bool
SimpleEventFilter::filter
(
edm::Event
&,
edm::EventSetup
const
& ) {
19
nEvent_
++;
20
bool
ret
=
true
;
21
if
(
nEvent_
%
nInterval_
!= 0) ret =
false
;
22
if
(
verbose_
&& !ret)
std::cout
<<
">>> filtering event"
<<
nEvent_
<< std::endl;
23
return
ret
;
24
}
25
26
#include "
FWCore/Framework/interface/MakerMacros.h
"
27
DEFINE_FWK_MODULE
(
SimpleEventFilter
);
28
29
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
SimpleEventFilter.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
run_regression.ret
int ret
Definition:
run_regression.py:388
MakerMacros.h
SimpleEventFilter::nEvent_
int nEvent_
Definition:
SimpleEventFilter.h:13
SimpleEventFilter::SimpleEventFilter
SimpleEventFilter(const edm::ParameterSet &)
Definition:
SimpleEventFilter.cc:7
edm::EventSetup
Definition:
EventSetup.h:45
SimpleEventFilter::~SimpleEventFilter
~SimpleEventFilter()
Definition:
SimpleEventFilter.cc:15
SimpleEventFilter::nInterval_
int nInterval_
Definition:
SimpleEventFilter.h:14
SimpleEventFilter::filter
bool filter(edm::Event &, edm::EventSetup const &)
Definition:
SimpleEventFilter.cc:18
SimpleEventFilter::verbose_
bool verbose_
Definition:
SimpleEventFilter.h:15
edm::ParameterSet
Definition:
ParameterSet.h:36
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
edm::false
volatile std::atomic< bool > shutdown_flag false
Definition:
UnixSignalHandlers.cc:22
SimpleEventFilter
Definition:
SimpleEventFilter.h:7
edm::Event
Definition:
Event.h:64
Generated for CMSSW Reference Manual by
1.8.5