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 
19 
25 
26 #include <fstream>
27 #include <iomanip>
28 #include <iostream>
29 #include <memory>
30 #include <vector>
31 
33 
34 struct TCCinput;
35 typedef std::vector<TCCinput> TCCInputData;
36 static const int N_SM = 36; // number of ecal barrel supermodules
37 
39 public:
40  explicit EcalFEtoDigi(const edm::ParameterSet &);
41  ~EcalFEtoDigi() override {}
42 
43 private:
44  void beginJob() override;
45  void produce(edm::Event &, const edm::EventSetup &) override;
46  void endJob() override;
47 
48  void readInput();
52  int SMidToTCCid(const int) const;
53  void getLUT(unsigned int *lut, const int towerId, const edm::EventSetup &) const;
54 
57 
59 
61  const bool useIdentityLUT_;
62  int sm_;
63  bool singlefile;
64 
65  const int fileEventOffset_;
66  const bool debug_;
67  std::ofstream outfile;
68 };
69 
70 #endif
const edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcd > tpgLutGroupToken_
Definition: EcalFEtoDigi.h:55
EcalFEtoDigi(const edm::ParameterSet &)
Definition: EcalFEtoDigi.cc:3
void readInput()
open and read in input (flat) data file
TCCInputData inputdata_[N_SM]
Definition: EcalFEtoDigi.h:58
void produce(edm::Event &, const edm::EventSetup &) override
method called to produce the data
Definition: EcalFEtoDigi.cc:18
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
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
const bool useIdentityLUT_
Definition: EcalFEtoDigi.h:61
static const int N_SM
Definition: EcalFEtoDigi.h:36
std::vector< TCCinput > TCCInputData
Definition: EcalFEtoDigi.h:34
~EcalFEtoDigi() override
Definition: EcalFEtoDigi.h:41
EcalTriggerPrimitiveSample create_TPSampleTcp(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample in tcp format (uncomrpessed energy)
const int fileEventOffset_
Definition: EcalFEtoDigi.h:65
const std::string basename_
Definition: EcalFEtoDigi.h:60
void getLUT(unsigned int *lut, const int towerId, const edm::EventSetup &) const
return the LUT from eventSetup
const edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcd > tpgLutIdMapToken_
Definition: EcalFEtoDigi.h:56
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)
const bool debug_
Definition: EcalFEtoDigi.h:66
std::ofstream outfile
Definition: EcalFEtoDigi.h:67
EcalTrigTowerDetId create_TTDetId(TCCinput)
create EcalTrigTowerDetId from input data (line)