CMS 3D CMS Logo

HcalLaserReco.cc
Go to the documentation of this file.
10 
11 #include <iostream>
12 #include <fstream>
13 
14 
16 public:
17  explicit HcalLaserReco(const edm::ParameterSet& ps);
18  ~HcalLaserReco() override;
19  void produce(edm::Event& e, const edm::EventSetup& c) override;
20 private:
24 };
25 
27  qdctdcFed_(conf.getUntrackedParameter<int>("QADCTDCFED",8))
28 {
29  tok_raw_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("fedRawDataCollectionTag"));
30 
31  produces<HcalLaserDigi>();
32 }
33 
34 // Virtual destructor needed.
36 
37 // Functions that gets called by framework every event
39 {
40  // Step A: Get Inputs
42  e.getByToken(tok_raw_, rawraw);
43 
44  // Step B: Create empty output
45  auto digi = std::make_unique<HcalLaserDigi>();
46 
47  if (qdctdcFed_ >=0) {
48  // Step C: unpack all requested FEDs
49  const FEDRawData& fed = rawraw->FEDData(qdctdcFed_);
50  unpacker_.unpack(fed,*digi);
51  }
52 
53  // Step D: Put outputs into event
54  e.put(std::move(digi));
55 }
56 
59 
61 
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
HcalLaserUnpacker unpacker_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
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)
void unpack(const FEDRawData &raw, HcalLaserDigi &digi) const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
def move(src, dest)
Definition: eostools.py:510