test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~HcalLaserReco();
19  virtual 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:122
HcalLaserUnpacker unpacker_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
def move
Definition: eostools.py:510
virtual ~HcalLaserReco()
HcalLaserReco(const edm::ParameterSet &ps)
void unpack(const FEDRawData &raw, HcalLaserDigi &digi) const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_