CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CamacTBDataFormatter.h
Go to the documentation of this file.
1 #ifndef CamacTBDataFormatter_H
2 #define CamacTBDataFormatter_H
3 
11 #include <vector>
12 #include <iostream>
13 
16 
22 
24 
25 
26 
27 
29 
30  public:
31 
33  virtual ~CamacTBDataFormatter(){LogDebug("EcalTBRawToDigi") << "@SUB=CamacTBDataFormatter" << "\n"; };
34 
35 
36  void interpretRawData( const FEDRawData & data, EcalTBEventHeader& tbEventHeader,
37  EcalTBHodoscopeRawInfo& hodoRaw, EcalTBTDCRawInfo& tdcRawInfo );
38 
39  // for tests based on standalone file
40  /* void interpretRawData(unsigned long * buffer, unsigned long bufferSize, */
41  /* EcalTBEventHeader& tbEventHeader, */
42  /* EcalTBHodoscopeRawInfo & hodo, */
43  /* EcalTBTDCRawInfo & tdc); */
44 
45 
46 
47  private:
48 
49  bool checkStatus(unsigned long word, int wordNumber);
50 
51  int nWordsPerEvent; // Number of fibers per hodoscope plane
52 
53  static const int nHodoFibers = 64; // Number of fibers per hodoscope plane
54  static const int nHodoscopes = 2; // Number of different mappings between fiber and electronics
55  static const int nHodoPlanes = 4; // Number of hodoscopes along the beam
56  static const int hodoRawLen = 4; // The raw data is stored as 4 integers for each hodo plane
57 
61  bool statusWords[148+4];
62 
63  std::vector<int> scalers_;
64 };
65 #endif
#define LogDebug(id)
int nHodoHits[nHodoPlanes]
std::vector< int > scalers_
int hodoAll[nHodoPlanes *nHodoFibers]
bool checkStatus(unsigned long word, int wordNumber)
static const int nHodoFibers
int hodoHits[nHodoPlanes][nHodoFibers]
static const int nHodoscopes
static const int nHodoPlanes
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static const int hodoRawLen
void interpretRawData(const FEDRawData &data, EcalTBEventHeader &tbEventHeader, EcalTBHodoscopeRawInfo &hodoRaw, EcalTBTDCRawInfo &tdcRawInfo)