CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  ~HcalLaserReco() override;
18  void produce(edm::Event& e, const edm::EventSetup& c) override;
19 
20 private:
24 };
25 
27  : qdctdcFed_(conf.getUntrackedParameter<int>("QADCTDCFED", 8)) {
28  tok_raw_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("fedRawDataCollectionTag"));
29 
30  produces<HcalLaserDigi>();
31 }
32 
33 // Virtual destructor needed.
35 
36 // Functions that gets called by framework every event
38  // Step A: Get Inputs
40  e.getByToken(tok_raw_, rawraw);
41 
42  // Step B: Create empty output
43  auto digi = std::make_unique<HcalLaserDigi>();
44 
45  if (qdctdcFed_ >= 0) {
46  // Step C: unpack all requested FEDs
47  const FEDRawData& fed = rawraw->FEDData(qdctdcFed_);
48  unpacker_.unpack(fed, *digi);
49  }
50 
51  // Step D: Put outputs into event
52  e.put(std::move(digi));
53 }
54 
57 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalLaserUnpacker unpacker_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(edm::Event &e, const edm::EventSetup &c) override
~HcalLaserReco() override
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
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