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  std::auto_ptr<HcalLaserDigi>
46  digi(new HcalLaserDigi);
47 
48  if (qdctdcFed_ >=0) {
49  // Step C: unpack all requested FEDs
50  const FEDRawData& fed = rawraw->FEDData(qdctdcFed_);
51  unpacker_.unpack(fed,*digi);
52  }
53 
54  // Step D: Put outputs into event
55  e.put(digi);
56 }
57 
60 
62 
T getParameter(std::string const &) const
HcalLaserUnpacker unpacker_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
tuple conf
Definition: dbtoconf.py:185
virtual ~HcalLaserReco()
HcalLaserReco(const edm::ParameterSet &ps)
void unpack(const FEDRawData &raw, HcalLaserDigi &digi) const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_