CMS 3D CMS Logo

GtPsbTextToDigi.h
Go to the documentation of this file.
1 #ifndef GTPSBTEXTTODIGI_H
2 #define GTPSBTEXTTODIGI_H
3 
4 /*\class GtPsbTextToDigi
5  *\description makes digis from GT PSB captured data file
6  *\author Nuno Leonardo (CERN)
7  *\date 08.08
8  */
9 
10 /*\note on format
11  input file names: m_textFileName + mem# + .txt
12  each line corresponds to one 80MHz clock (2 cycles/lines per event)
13  input data: 16 bits: cycle (msb) + GCT em cand raw data (14:0)
14  msb set once at cycle 0 to indicate BC0 signal, for GT synch check
15  file/mem#:0 line/cycle:0 electron 1
16  line/cycle:1 electron 3
17  file/mem#:1 line/cycle:0 electron 2
18  line/cycle:1 electron 4
19  file/mem#:6 line/cycle:0 electron 1
20  line/cycle:1 electron 3
21  file/mem#:7 line/cycle:0 electron 2
22  line/cycle:1 electron 4
23  as specified to me by I.Mikulec, M.Jeitler, J.Brooke
24 */
25 
31 #include <fstream>
32 #include <memory>
33 
35 public:
36  explicit GtPsbTextToDigi(const edm::ParameterSet &);
37  ~GtPsbTextToDigi() override;
38 
39 private:
40  void produce(edm::Event &, const edm::EventSetup &) override;
41  void endJob() override;
42 
43 private:
45  void putEmptyDigi(edm::Event &);
46 
49 
52 
54  int m_nevt;
55 
57  std::ifstream m_file[4];
58 
60  int m_bc0[4];
61 };
62 
63 #endif
GtPsbTextToDigi::m_file
std::ifstream m_file[4]
File handle.
Definition: GtPsbTextToDigi.h:57
EDProducer.h
GtPsbTextToDigi::m_nevt
int m_nevt
Event counter.
Definition: GtPsbTextToDigi.h:54
GtPsbTextToDigi::putEmptyDigi
void putEmptyDigi(edm::Event &)
Create empty digi collection.
Definition: GtPsbTextToDigi.cc:60
MakerMacros.h
GtPsbTextToDigi::m_bc0
int m_bc0[4]
Hold detected BC0 signal position per file.
Definition: GtPsbTextToDigi.h:60
GtPsbTextToDigi::~GtPsbTextToDigi
~GtPsbTextToDigi() override
Definition: GtPsbTextToDigi.cc:52
GtPsbTextToDigi::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: GtPsbTextToDigi.cc:85
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
GtPsbTextToDigi::m_textFileName
std::string m_textFileName
Name out input file.
Definition: GtPsbTextToDigi.h:51
GtPsbTextToDigi
Definition: GtPsbTextToDigi.h:34
GtPsbTextToDigi::endJob
void endJob() override
Definition: GtPsbTextToDigi.cc:206
edm::EventSetup
Definition: EventSetup.h:58
GtPsbTextToDigi::GtPsbTextToDigi
GtPsbTextToDigi(const edm::ParameterSet &)
Definition: GtPsbTextToDigi.cc:15
Frameworkfwd.h
GtPsbTextToDigi::m_fileEventOffset
int m_fileEventOffset
Number of events to be offset wrt input.
Definition: GtPsbTextToDigi.h:48
edm::EDProducer
Definition: EDProducer.h:35
ParameterSet.h
edm::Event
Definition: Event.h:73