Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oncsSub_idfnalmwpc.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file oncsSub_idfnalmwpc.h
1 #ifndef __ONCSSUB_IDFNALMWPC_H__
2 #define __ONCSSUB_IDFNALMWPC_H__
3 
4 #include <vector>
5 
6 #include "oncsSubevent.h"
7 
8 #ifndef __CINT__
10 #else
11 class oncsSub_idfnalmwpc : public oncsSubevent_w4 {
12 #endif
13 
14 public:
17 
18 
19  int iValue(const int n, const char *);
20 
21 
22  // for a given trigger, information about the TDC
23  int iValue(const int trigger, const int tdc, const char * what);
24 
25  // this returns the wire number
26  int iValue(const int trigger, const int tdc, const int index);
27 
28  // this is the workhorse interface
29  int iValue(const int trigger, const int tdc, const int index, const char *what);
30 
31 
32  void dump ( OSTREAM& os = COUT) ;
33 
34 protected:
35  int *decode (int *);
36 
37  int _decoded;
38 
39 #define MAXNROFTDCS 16
40 
41 
42  typedef struct {
43  int wire;
44  int timestamp;
45  } TDC_hit;
46 
47 
48  typedef struct {
49  int hits;
50  short words;
51  short TDC;
52  short EventStatus;
53  short trigger_nr;
54  short triggertype;
55  unsigned short evt_timestamp;
56  unsigned short local_ts_upper;
57  unsigned short local_ts_lower;
58  unsigned long long absolute_time;
59  std::vector<TDC_hit *> TDCHitlist;
60  } TDCData;
61 
62 
63  typedef struct {
65  unsigned short evt_timestamp;
66  unsigned short local_ts_upper;
67  unsigned short local_ts_lower;
68  unsigned long long absolute_time;
70  } TDCEvent;
71 
72  typedef struct {
75  short year;
76  short month;
77  short day;
78  short hour;
79  short minute;
80  short second;
84  } SpillInfo;
85 
86 
87  typedef struct {
88  short spillwords;
89  short TDC;
91  short spillstatus;
93 
94 
95  int tdcmask;
96  int n_tdcs;
97  int length;
98 
100 
102 
103 
104  std::vector<TDCEvent *> TDCEventVector;
105 
106 };
107 
108 
109 
110 #endif