Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oncsSub_idtpcfeev2.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file oncsSub_idtpcfeev2.h
1 #ifndef __ONCSSUB_IDTPCFEEV2_H__
2 #define __ONCSSUB_IDTPCFEEV2_H__
3 
4 #include "oncsSubevent.h"
5 #include <vector>
6 #include <set>
7 #include <algorithm>
8 #include <functional>
9 
10 #ifndef __CINT__
12 #else
13 class oncsSub_idtpcfeev2 : public oncsSubevent_w2 {
14 #endif
15 
16 public:
19 
20  int iValue(const int fee, const int ch, const int sample);
21  int iValue(const int fee, const int ch, const int sample, const char *what);
22  int iValue(const int ch, const int sample);
23  int iValue(const int , const int, const char * what);
24  int iValue(const int ,const char * what);
25 
26  void dump ( OSTREAM& os = COUT) ;
27 
28 
29 protected:
30  int tpc_decode ();
31 
32  static const int MAX_FEECOUNT=8;
33  static const int MAX_FEECHANNELS=256;
34 
35 
36  unsigned short reverseBits(const unsigned short x) const;
37  unsigned short crc16(const unsigned int fee, const unsigned int index, const int l) const;
38 
39  int _broken;
40 
42 
43  typedef struct
44  {
45  unsigned int bx_time;
46  unsigned int bx_time_raw;
47  unsigned short adc;
48  } tpc_sample;
49 
50 
51  unsigned int _max_samples[MAX_FEECOUNT];
52  unsigned int _lowest_bx[MAX_FEECOUNT];
53  unsigned int _highest_bx[MAX_FEECOUNT];
54 
55  std::vector<unsigned short> fee_data[MAX_FEECOUNT];
56 
57  // std::vector<bx> fee_bx[MAX_FEECOUNT][MAX_FEECHANNELS];
58  std::vector<tpc_sample> fee_samples[MAX_FEECOUNT][MAX_FEECHANNELS];
59 
60 };
61 
62 
63 #endif /* __ONCSSUB_IDTPCFEEV2_H__ */