CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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&);
42 
43 private:
44 
45  virtual void beginJob() ;
46  virtual void produce(edm::Event&, const edm::EventSetup&);
47  virtual void endJob();
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
virtual void produce(edm::Event &, const edm::EventSetup &)
method called to produce the data
Definition: EcalFEtoDigi.cc:23
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
virtual void beginJob()
method called once each job just before starting event loop
int SMidToTCCid(const int) const
translate input supermodule id into TCC id (barrel)
virtual void endJob()
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
unsigned towerId(DetId const &)
EcalTriggerPrimitiveSample create_TPSampleTcp(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample in tcp format (uncomrpessed energy)
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)