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 
26 #include <memory>
27 #include <fstream>
33 
35  public:
36  explicit GtPsbTextToDigi(const edm::ParameterSet&);
38 
39  private:
40  virtual void produce(edm::Event&, const edm::EventSetup&);
41  virtual void endJob();
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
virtual void produce(edm::Event &, const edm::EventSetup &)
GtPsbTextToDigi(const edm::ParameterSet &)
std::string m_textFileName
Name out input file.
virtual void endJob()
int m_fileEventOffset
Number of events to be offset wrt input.
std::ifstream m_file[4]
File handle.
void putEmptyDigi(edm::Event &)
Create empty digi collection.
int m_nevt
Event counter.
int m_bc0[4]
Hold detected BC0 signal position per file.