CMS 3D CMS Logo

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 
13 
17 
19 
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 
30 
32  std::pair<int, int> fedRange;
33 };
34 
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 
40 
41  produces<FEDRawDataCollection>();
42 }
43 
45 
47  using namespace edm;
48  using namespace std;
49 
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
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:85964
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