Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
EventFilter
L1TRawToDigi
plugins
L1TValidationEventFilter.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: L1TValidationEventFilter
4
// Class: L1TValidationEventFilter
5
//
12
//
13
// Original Author: Jim Brooke
14
// Created:
15
//
16
//
17
18
19
// system include files
20
#include <memory>
21
22
// user include files
23
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
24
25
#include "
FWCore/Framework/interface/EDFilter.h
"
26
#include "
FWCore/Framework/interface/Event.h
"
27
#include "
FWCore/Framework/interface/MakerMacros.h
"
28
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
29
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
30
31
#include <string>
32
#include <iostream>
33
34
#include "
DataFormats/FEDRawData/interface/FEDRawData.h
"
35
#include "
DataFormats/FEDRawData/interface/FEDRawDataCollection.h
"
36
#include "
DataFormats/FEDRawData/interface/FEDNumbering.h
"
37
38
39
//
40
// class declaration
41
//
42
43
class
L1TValidationEventFilter
:
public
edm::EDFilter
{
44
public
:
45
explicit
L1TValidationEventFilter
(
const
edm::ParameterSet
&);
46
virtual
~L1TValidationEventFilter
();
47
48
private
:
49
virtual
void
beginJob
()
override
;
50
virtual
bool
filter
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
51
virtual
void
endJob
()
override
;
52
53
// ----------member data ---------------------------
54
55
int
period_
;
56
57
// edm::EDGetTokenT<FEDRawDataCollection> token_;
58
59
};
60
61
62
//
63
// constructors and destructor
64
//
65
L1TValidationEventFilter::L1TValidationEventFilter
(
const
edm::ParameterSet
& iConfig) :
66
period_( iConfig.getUntrackedParameter<int>(
"period"
, 107) )
67
{
68
//now do what ever initialization is needed
69
70
}
71
72
73
L1TValidationEventFilter::~L1TValidationEventFilter
()
74
{
75
76
// do anything here that needs to be done at desctruction time
77
// (e.g. close files, deallocate resources etc.)
78
79
}
80
81
82
//
83
// member functions
84
//
85
86
// ------------ method called on each new Event ------------
87
bool
88
L1TValidationEventFilter::filter
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
89
{
90
using namespace
edm;
91
92
return
((iEvent.
id
().
event
() %
period_
)==0);
93
94
}
95
96
// ------------ method called once each job just before starting event loop ------------
97
void
98
L1TValidationEventFilter::beginJob
()
99
{
100
101
}
102
103
// ------------ method called once each job just after ending the event loop ------------
104
void
105
L1TValidationEventFilter::endJob
() {
106
107
}
108
109
//define this as a plug-in
110
DEFINE_FWK_MODULE
(
L1TValidationEventFilter
);
edm::EventID::event
EventNumber_t event() const
Definition:
EventID.h:41
MessageLogger.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
FEDRawDataCollection.h
Frameworkfwd.h
L1TValidationEventFilter::~L1TValidationEventFilter
virtual ~L1TValidationEventFilter()
Definition:
L1TValidationEventFilter.cc:73
ParameterSet.h
iEvent
int iEvent
Definition:
GenABIO.cc:230
L1TValidationEventFilter::endJob
virtual void endJob() override
Definition:
L1TValidationEventFilter.cc:105
EDFilter.h
edm::EventSetup
Definition:
EventSetup.h:45
L1TValidationEventFilter::L1TValidationEventFilter
L1TValidationEventFilter(const edm::ParameterSet &)
Definition:
L1TValidationEventFilter.cc:65
edm::EDFilter
Definition:
EDFilter.h:37
L1TValidationEventFilter::filter
virtual bool filter(edm::Event &, const edm::EventSetup &) override
Definition:
L1TValidationEventFilter.cc:88
L1TValidationEventFilter::beginJob
virtual void beginJob() override
Definition:
L1TValidationEventFilter.cc:98
edm::EventBase::id
edm::EventID id() const
Definition:
EventBase.h:60
FEDRawData.h
L1TValidationEventFilter
Definition:
L1TValidationEventFilter.cc:43
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:64
L1TValidationEventFilter::period_
int period_
Definition:
L1TValidationEventFilter.cc:55
FEDNumbering.h
Generated for CMSSW Reference Manual by
1.8.5