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 <memory>
25 #include <iostream>
26 #include <fstream>
27 #include <vector>
28 #include <iomanip>
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 
38 public:
39 
40  explicit EcalFEtoDigi(const edm::ParameterSet&);
41  ~EcalFEtoDigi() override{}
42 
43 private:
44 
45  void beginJob() override ;
46  void produce(edm::Event&, const edm::EventSetup&) override;
47  void endJob() override;
48 
49  void readInput();
53  int SMidToTCCid(const int) const;
54  void getLUT(unsigned int * lut, const int towerId, const edm::EventSetup&) const ;
55 
57 
60  int sm_;
61  bool singlefile;
62 
64  bool debug_;
65  std::ofstream outfile;
66 
67 };
68 
69 #endif
void getLUT(unsigned int *lut, const int towerId, const edm::EventSetup &) const
return the LUT from eventSetup
int fileEventOffset_
Definition: EcalFEtoDigi.h:63
EcalFEtoDigi(const edm::ParameterSet &)
Definition: EcalFEtoDigi.cc:7
std::string basename_
Definition: EcalFEtoDigi.h:58
void readInput()
open and read in input (flat) data file
TCCInputData inputdata_[N_SM]
Definition: EcalFEtoDigi.h:56
bool useIdentityLUT_
Definition: EcalFEtoDigi.h:59
void produce(edm::Event &, const edm::EventSetup &) override
method called to produce the data
Definition: EcalFEtoDigi.cc:23
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:41
EcalTriggerPrimitiveSample create_TPSampleTcp(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample in tcp format (uncomrpessed energy)
l1t::HGCalTowerID towerId
Definition: classes.h:34
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:65
EcalTrigTowerDetId create_TTDetId(TCCinput)
create EcalTrigTowerDetId from input data (line)