Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oncsSub_iddreamv0.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file oncsSub_iddreamv0.h
1 #ifndef __ONCSSUB_IDDREAMV0_H__
2 #define __ONCSSUB_IDDREAMV0_H__
3 
4 #include "oncsSubevent.h"
5 #include "vector"
6 #include "map"
7 
8 #define MAX_FEU 8
9 
10 
11 #ifndef __CINT__
13 #else
14 class oncsSub_iddreamv0 : public oncsSubevent_w2 {
15 #endif
16 
17 public:
20 
21  int iValue(const int channel, const char *);
22  int iValue(const int channel, const int sample); //treating the 8 dreams as 512 contiguous channels
23  int iValue(const int dreamchip, const int sample, const char *);
24  int iValue(const int dreamchip, const int channel, const int sample);
25 
26 
27  void dump ( OSTREAM& os = COUT) ;
28 
29 protected:
30 
32  {
33  int _feu_id;
34  int _feu_P; // pedestal subtraction on
35  int _feu_C; // common noise suppression
36  int _feu_Z; // zero-suppressed format
37 
40  int _dream_enabled[8];
41  int samples [8][64][255];
42  unsigned long long cellids [8][255];
43  // std::vector<short> feu_rawdata;
44  };
45 
46 
47 
48 
49  int *decode ( int *);
50  // int decode_payload (FEU_decoded_data *fd);
51  int decode_payload ( unsigned short *d, const int size);
52  int decode_dream( FEU_decoded_data *fd, unsigned short *d, const int size, const unsigned int sample_nr);
53  int decode_dream( FEU_decoded_data *fd, const int offset, const int size, const unsigned int sample_nr);
54 
55  std::map<int,struct FEU_decoded_data *> feu_map;
56 
57 
58 
59  int _nr_feus;
60 
62 
63 
64 
65  unsigned short *swapped_array;
66 
67 };
68 
69 
70 #endif /* __ONCSSUB_IDDREAMV0_H__ */