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
ConfigurationDescriptions.h
edm::StreamID
Definition: StreamID.h:30
mps_fire.i
i
Definition: mps_fire.py:428
evf::EvFFEDSelector::EvFFEDSelector
EvFFEDSelector(edm::ParameterSet const &)
Definition: EvFFEDSelector.cc:10
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
evf::EvFFEDSelector::produce
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const final
Definition: EvFFEDSelector.cc:29
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
EcalFEDMonitor_cfi.FEDRawDataCollection
FEDRawDataCollection
Definition: EcalFEDMonitor_cfi.py:6
ParameterSetDescription.h
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
createfilelist.int
int
Definition: createfilelist.py:10
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
EvFFEDSelector.h
edm::EventSetup
Definition: EventSetup.h:57
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
evf
Definition: fillJson.h:27
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
evf::EvFFEDSelector::token_
edm::EDGetTokenT< FEDRawDataCollection > token_
Definition: EvFFEDSelector.h:27
edm::InputTag
Definition: InputTag.h:15
evf::EvFFEDSelector::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EvFFEDSelector.cc:16
evf::EvFFEDSelector::fedlist_
std::vector< unsigned int > fedlist_
Definition: EvFFEDSelector.h:28