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
EcalFEtoDigi::create_TPSample
EcalTriggerPrimitiveSample create_TPSample(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample from input data (line)
Definition: EcalFEtoDigi.cc:219
EDProducer.h
EcalFEtoDigi::outfile
std::ofstream outfile
Definition: EcalFEtoDigi.h:62
MessageLogger.h
ESHandle.h
edm::one::EDProducer
Definition: EDProducer.h:30
EcalFEtoDigi::create_TTDetId
EcalTrigTowerDetId create_TTDetId(TCCinput)
create EcalTrigTowerDetId from input data (line)
Definition: EcalFEtoDigi.cc:180
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
EcalFEtoDigi::SMidToTCCid
int SMidToTCCid(const int) const
translate input supermodule id into TCC id (barrel)
Definition: EcalFEtoDigi.cc:300
EcalFEtoDigi::basename_
std::string basename_
Definition: EcalFEtoDigi.h:55
TCCinput.h
EcalFEtoDigi::getLUT
void getLUT(unsigned int *lut, const int towerId, const edm::EventSetup &) const
return the LUT from eventSetup
Definition: EcalFEtoDigi.cc:303
TCCinput
Definition: TCCinput.h:12
MakerMacros.h
EcalFEtoDigi::inputdata_
TCCInputData inputdata_[N_SM]
Definition: EcalFEtoDigi.h:53
EcalDigiCollections.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
EcalFEtoDigi::~EcalFEtoDigi
~EcalFEtoDigi() override
Definition: EcalFEtoDigi.h:39
EcalFEtoDigi::readInput
void readInput()
open and read in input (flat) data file
Definition: EcalFEtoDigi.cc:112
EcalFEtoDigi::produce
void produce(edm::Event &, const edm::EventSetup &) override
method called to produce the data
Definition: EcalFEtoDigi.cc:21
N_SM
static const int N_SM
Definition: EcalFEtoDigi.h:34
edm::EventSetup
Definition: EventSetup.h:57
EcalFEtoDigi::EcalFEtoDigi
EcalFEtoDigi(const edm::ParameterSet &)
Definition: EcalFEtoDigi.cc:7
EcalFEtoDigi
Definition: EcalFEtoDigi.h:36
EcalFEtoDigi::beginJob
void beginJob() override
method called once each job just before starting event loop
Definition: EcalFEtoDigi.cc:280
EcalFEtoDigi::debug_
bool debug_
Definition: EcalFEtoDigi.h:61
ecaldqm::towerId
unsigned towerId(DetId const &)
Definition: EcalDQMCommonUtils.cc:79
Frameworkfwd.h
EcalFEtoDigi::create_TPSampleTcp
EcalTriggerPrimitiveSample create_TPSampleTcp(TCCinput, const edm::EventSetup &)
create EcalTriggerPrimitiveSample in tcp format (uncomrpessed energy)
Definition: EcalFEtoDigi.cc:257
TCCInputData
std::vector< TCCinput > TCCInputData
Definition: EcalFEtoDigi.h:32
EventSetup.h
Exception.h
EcalFEtoDigi::endJob
void endJob() override
method called once each job just after ending the event loop
Definition: EcalFEtoDigi.cc:294
EcalTriggerPrimitiveSample
Definition: EcalTriggerPrimitiveSample.h:12
EcalFEtoDigi::useIdentityLUT_
bool useIdentityLUT_
Definition: EcalFEtoDigi.h:56
ParameterSet.h
edm::Event
Definition: Event.h:73
EcalFEtoDigi::fileEventOffset_
int fileEventOffset_
Definition: EcalFEtoDigi.h:60
EcalFEtoDigi::sm_
int sm_
Definition: EcalFEtoDigi.h:57
EcalFEtoDigi::singlefile
bool singlefile
Definition: EcalFEtoDigi.h:58