Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Alignment
CommonAlignmentProducer
plugins
LSNumberFilter.cc
Go to the documentation of this file.
1
//#include "FWCore/Framework/interface/Frameworkfwd.h"
2
#include "
FWCore/Framework/interface/EDFilter.h
"
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/Run.h
"
6
#include "
FWCore/Framework/interface/MakerMacros.h
"
7
#include "
FWCore/Framework/interface/EventSetup.h
"
8
#include "
FWCore/Framework/interface/ESHandle.h
"
9
10
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
13
14
15
//
16
// class declaration
17
//
18
19
20
21
class
LSNumberFilter
:
public
edm::EDFilter
{
22
public
:
23
explicit
LSNumberFilter
(
const
edm::ParameterSet
&);
24
~LSNumberFilter
();
25
26
private
:
27
28
virtual
void
beginJob
()
override
;
29
virtual
bool
filter
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
30
virtual
void
endJob
()
override
;
31
32
unsigned
int
minLS
;
33
};
34
35
36
37
LSNumberFilter::LSNumberFilter
(
const
edm::ParameterSet
& iConfig):
38
minLS(iConfig.getUntrackedParameter<unsigned>(
"minLS"
,21))
39
{}
40
41
42
LSNumberFilter::~LSNumberFilter
()
43
{
44
45
// do anything here that needs to be done at desctruction time
46
// (e.g. close files, deallocate resources etc.)
47
48
}
49
50
51
//
52
// member functions
53
//
54
55
// ------------ method called on each new Event ------------
56
bool
LSNumberFilter::filter
(
edm::Event
&
iEvent
,
57
const
edm::EventSetup
& iSetup) {
58
59
if
(iEvent.
luminosityBlock
() <
minLS
)
return
false
;
60
61
return
true
;
62
63
}
64
65
// ------------ method called once each job just before starting event loop ------------
66
void
67
LSNumberFilter::beginJob
()
68
{}
69
70
// ------------ method called once each job just after ending the event loop ------------
71
void
72
LSNumberFilter::endJob
() {
73
}
74
75
//define this as a plug-in
76
DEFINE_FWK_MODULE
(
LSNumberFilter
);
MessageLogger.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
LSNumberFilter::~LSNumberFilter
~LSNumberFilter()
Definition:
LSNumberFilter.cc:42
Event.h
MakerMacros.h
EventSetup.h
edm::EventBase::luminosityBlock
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition:
EventBase.h:63
LSNumberFilter::beginJob
virtual void beginJob() override
Definition:
LSNumberFilter.cc:67
LSNumberFilter::minLS
unsigned int minLS
Definition:
LSNumberFilter.cc:32
LSNumberFilter
Definition:
LSNumberFilter.cc:21
LSNumberFilter::endJob
virtual void endJob() override
Definition:
LSNumberFilter.cc:72
ParameterSet.h
iEvent
int iEvent
Definition:
GenABIO.cc:230
LSNumberFilter::LSNumberFilter
LSNumberFilter(const edm::ParameterSet &)
Definition:
LSNumberFilter.cc:37
EDFilter.h
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:45
Run.h
edm::EDFilter
Definition:
EDFilter.h:37
LSNumberFilter::filter
virtual bool filter(edm::Event &, const edm::EventSetup &) override
Definition:
LSNumberFilter.cc:56
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:64
Generated for CMSSW Reference Manual by
1.8.5