EventFilter
RawDataCollector
src
RawDataSelector.cc
Go to the documentation of this file.
1
//
2
// Original Author: Marco ZANETTI
3
// Created: Mon Jan 28 18:22:13 CET 2008
4
5
#include <memory>
6
#include <utility>
7
8
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
9
#include "
FWCore/Framework/interface/EDProducer.h
"
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/Framework/interface/MakerMacros.h
"
12
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
13
14
#include "
DataFormats/FEDRawData/interface/FEDRawDataCollection.h
"
15
#include "
DataFormats/FEDRawData/interface/FEDRawData.h
"
16
#include "
DataFormats/FEDRawData/interface/FEDNumbering.h
"
17
18
#include "
EventFilter/RawDataCollector/interface/RawDataFEDSelector.h
"
19
20
class
RawDataSelector
:
public
edm::EDProducer
{
21
public
:
22
explicit
RawDataSelector
(
const
edm::ParameterSet
&);
23
24
~RawDataSelector
()
override
;
25
26
private
:
27
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
28
29
RawDataFEDSelector
*
selector
;
30
31
edm::InputTag
dataLabel
;
32
std::pair<int, int>
fedRange
;
33
};
34
35
RawDataSelector::RawDataSelector
(
const
edm::ParameterSet
&
pset
)
36
: dataLabel(
pset
.getUntrackedParameter<
edm
::
InputTag
>(
"InputLabel"
,
edm
::
InputTag
(
"source"
))) {
37
fedRange
= std::pair<int, int>(
pset
.getParameter<
int
>(
"lowerBound"
),
pset
.getParameter<
int
>(
"upperBound"
));
38
39
selector
=
new
RawDataFEDSelector
();
40
41
produces<FEDRawDataCollection>();
42
}
43
44
RawDataSelector::~RawDataSelector
() {
delete
selector
; }
45
46
void
RawDataSelector::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
47
using namespace
edm
;
48
using namespace
std
;
49
50
Handle<FEDRawDataCollection>
rawData
;
51
iEvent
.getByLabel(
dataLabel
,
rawData
);
52
53
/* here eventually perform some operation to get the list of FED's
54
to be written in the new collection.
55
In this case we simply take the range from the ParameterSet */
56
57
// the filtered raw data collections
58
std::unique_ptr<FEDRawDataCollection> selectedRawData =
selector
->
select
(
rawData
,
fedRange
);
59
60
iEvent
.put(
std::move
(selectedRawData));
61
}
62
63
//define this as a plug-in
64
DEFINE_FWK_MODULE
(
RawDataSelector
);
FEDNumbering.h
RawDataSelector::selector
RawDataFEDSelector * selector
Definition:
RawDataSelector.cc:29
EDProducer.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89353
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition:
l1tstage2_dqm_sourceclient-live_cfg.py:162
RawDataSelector::RawDataSelector
RawDataSelector(const edm::ParameterSet &)
Definition:
RawDataSelector.cc:35
FEDRawData.h
edm::Handle
Definition:
AssociativeIterator.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
RawDataSelector
Definition:
RawDataSelector.cc:20
RawDataFEDSelector.h
RawDataSelector::~RawDataSelector
~RawDataSelector() override
Definition:
RawDataSelector.cc:44
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
FEDRawDataCollection.h
RawDataSelector::fedRange
std::pair< int, int > fedRange
Definition:
RawDataSelector.cc:32
edm::EventSetup
Definition:
EventSetup.h:57
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
Frameworkfwd.h
RawDataFEDSelector
Definition:
RawDataFEDSelector.h:17
edm::EDProducer
Definition:
EDProducer.h:35
ParameterSet.h
edm::Event
Definition:
Event.h:73
RawDataSelector::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
RawDataSelector.cc:46
edm::InputTag
Definition:
InputTag.h:15
RawDataFEDSelector::select
std::unique_ptr< FEDRawDataCollection > select(const edm::Handle< FEDRawDataCollection > &rawData)
Definition:
RawDataFEDSelector.cc:17
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
RawDataSelector::dataLabel
edm::InputTag dataLabel
Definition:
RawDataSelector.cc:31
Generated for CMSSW Reference Manual by
1.8.16