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  ~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 
Handle.h
EDProducer.h
HcalLaserUnpacker::unpack
void unpack(const FEDRawData &raw, HcalLaserDigi &digi) const
Definition: HcalLaserUnpacker.cc:16
edm::EDGetTokenT< FEDRawDataCollection >
HcalLaserUnpacker.h
edm::Handle< FEDRawDataCollection >
FEDRawData
Definition: FEDRawData.h:19
MakerMacros.h
HcalLaserDigi.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HcalLaserReco::HcalLaserReco
HcalLaserReco(const edm::ParameterSet &ps)
Definition: HcalLaserReco.cc:26
HcalLaserReco::~HcalLaserReco
~HcalLaserReco() override
Definition: HcalLaserReco.cc:34
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
ModuleDef.h
createfilelist.int
int
Definition: createfilelist.py:10
HcalLaserReco::qdctdcFed_
int qdctdcFed_
Definition: HcalLaserReco.cc:21
FEDRawDataCollection.h
edm::EventSetup
Definition: EventSetup.h:58
InputTag.h
HcalLaserReco::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: HcalLaserReco.cc:37
eostools.move
def move(src, dest)
Definition: eostools.py:511
HcalLaserReco::tok_raw_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
Definition: HcalLaserReco.cc:23
HcalLaserReco::unpacker_
HcalLaserUnpacker unpacker_
Definition: HcalLaserReco.cc:22
edm::EDProducer
Definition: EDProducer.h:35
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::Event
Definition: Event.h:73
EDCollection.h
edm::InputTag
Definition: InputTag.h:15
HcalLaserUnpacker
Definition: HcalLaserUnpacker.h:7
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HcalLaserReco
Definition: HcalLaserReco.cc:14