CMS 3D CMS Logo

EvFFEDSelector.cc
Go to the documentation of this file.
1 #include <memory>
2 
3 #include "EvFFEDSelector.h"
4 
7 
8 namespace evf {
9 
11  : token_(consumes<FEDRawDataCollection>(config.getParameter<edm::InputTag>("inputTag"))),
12  fedlist_(config.getParameter<std::vector<unsigned int> >("fedList")) {
13  produces<FEDRawDataCollection>();
14  }
15 
18  desc.add<edm::InputTag>("inputTag", edm::InputTag("source"));
19  {
20  std::vector<unsigned int> temp1;
21  temp1.reserve(2);
22  temp1.push_back(812);
23  temp1.push_back(1023);
24  desc.add<std::vector<unsigned int> >("fedList", temp1);
25  }
26  descriptions.add("EvFFEDSelector", desc);
27  }
28 
31  event.getByToken(token_, rawdata);
32 
33  std::unique_ptr<FEDRawDataCollection> fedcoll(new FEDRawDataCollection());
34 
35  for (unsigned int i : fedlist_)
36  if (rawdata->FEDData(i).size() > 0)
37  fedcoll->FEDData(i) = rawdata->FEDData(i);
38 
39  event.put(std::move(fedcoll));
40  }
41 
42 } // namespace evf
Definition: fillJson.h:27
std::vector< unsigned int > fedlist_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:48
Definition: config.py:1
edm::EDGetTokenT< FEDRawDataCollection > token_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void add(std::string const &label, ParameterSetDescription const &psetDescription)
EvFFEDSelector(edm::ParameterSet const &)
HLT enums.
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const final
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1