CMS 3D CMS Logo

EcalFEtoDigi.h
Go to the documentation of this file.
1 #ifndef ECALFETODIGI_H
2 #define ECALFETODIGI_H
3 
4 /* Class: EcalFEtoDigi
5  * Description:
6  * produces Ecal trigger primitive digis from TCC input flat files
7  * Original Author: Nuno Leonardo, P. Paganini, E. Perez
8  * Created: Thu Feb 22 11:32:53 CET 2007
9  */
10 
20 
22 //#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
23 
24 #include <fstream>
25 #include <iomanip>
26 #include <iostream>
27 #include <memory>
28 #include <vector>
29 
31 
32 struct TCCinput;
33 typedef std::vector<TCCinput> TCCInputData;
34 static const int N_SM = 36; // number of ecal barrel supermodules
35 
37 public:
38  explicit EcalFEtoDigi(const edm::ParameterSet &);
39  ~EcalFEtoDigi() override {}
40 
41 private:
42  void beginJob() override;
43  void produce(edm::Event &, const edm::EventSetup &) override;
44  void endJob() override;
45 
46  void readInput();
50  int SMidToTCCid(const int) const;
51  void getLUT(unsigned int *lut, const int towerId, const edm::EventSetup &) const;
52 
54 
57  int sm_;
58  bool singlefile;
59 
61  bool debug_;
62  std::ofstream outfile;
63 };
64 
65 #endif
void getLUT(unsigned int *lut, const int towerId, const edm::EventSetup &) const
return the LUT from eventSetup
int fileEventOffset_
Definition: EcalFEtoDigi.h:60
EcalFEtoDigi(const edm::ParameterSet &)
Definition: EcalFEtoDigi.cc:7
std::string basename_
Definition: EcalFEtoDigi.h:55
void readInput()
open and read in input (flat) data file
TCCInputData inputdata_[N_SM]
Definition: EcalFEtoDigi.h:53
bool useIdentityLUT_
Definition: EcalFEtoDigi.h:56
void produce(edm::Event &, const edm::EventSetup &) override
method called to produce the data
Definition: EcalFEtoDigi.cc:21
int SMidToTCCid(const int) const
translate input supermodule id into TCC id (barrel)
void endJob() override
method called once each job just after ending the event loop
static const int N_SM
Definition: EcalFEtoDigi.h:34
std::vector< TCCinput > TCCInputData
Definition: EcalFEtoDigi.h:32
~EcalFEtoDigi() override
Definition: EcalFEtoDigi.h:39
EcalTriggerPrimitiveSample create_TPSampleTcp(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample in tcp format (uncomrpessed energy)
l1t::HGCalTowerID towerId
Definition: classes.h:36
void beginJob() override
method called once each job just before starting event loop
EcalTriggerPrimitiveSample create_TPSample(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample from input data (line)
std::ofstream outfile
Definition: EcalFEtoDigi.h:62
EcalTrigTowerDetId create_TTDetId(TCCinput)
create EcalTrigTowerDetId from input data (line)