CMS 3D CMS Logo

HcalLaserReco.cc
Go to the documentation of this file.
10 
11 #include <iostream>
12 #include <fstream>
13 
15 public:
16  explicit HcalLaserReco(const edm::ParameterSet& ps);
17  void produce(edm::StreamID, edm::Event& e, const edm::EventSetup& c) const override;
18 
19 private:
23 };
24 
26  : qdctdcFed_(conf.getUntrackedParameter<int>("QADCTDCFED", 8)) {
27  tok_raw_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("fedRawDataCollectionTag"));
28 
29  produces<HcalLaserDigi>();
30 }
31 
32 // Functions that gets called by framework every event
34  // Step A: Get Inputs
36  e.getByToken(tok_raw_, rawraw);
37 
38  // Step B: Create empty output
39  auto digi = std::make_unique<HcalLaserDigi>();
40 
41  if (qdctdcFed_ >= 0) {
42  // Step C: unpack all requested FEDs
43  const FEDRawData& fed = rawraw->FEDData(qdctdcFed_);
44  unpacker_.unpack(fed, *digi);
45  }
46 
47  // Step D: Put outputs into event
48  e.put(std::move(digi));
49 }
50 
53 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalLaserUnpacker unpacker_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void produce(edm::StreamID, edm::Event &e, const edm::EventSetup &c) const override
HcalLaserReco(const edm::ParameterSet &ps)
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
def move(src, dest)
Definition: eostools.py:511
void unpack(const FEDRawData &raw, HcalLaserDigi &digi) const