StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
daq1000Formats.h
1 #ifndef _DAQ1000FORMATS_H_
2 #define _DAQ1000FORMATS_H_
3 
4 // Tonko's data format for now...
5 //
6 // rdo data as follows:
7 // ------------------------
8 // | rdoHeader |
9 // ------------------------
10 // | altroData[] fee 1 |
11 // | altroData[] fee 2 |
12 // | ... |
13 // | altroData[] fee n |
14 // ------------------------
15 // | rdoTrailer |
16 // ------------------------
17 //
18 // For the ALTRO data format see the altro user manual. The data from the altro
19 // is packed into 64 bit data words. 4 10 bit altro words are packed into the low 40 bits
20 // of each data word. The high 24 bits are used for status information
21 //
22 // The offset to the end of the altro data block is obtained is obtained from the rdoHeader
23 // There is way to navigate through the altro data without decoding each banks starting
24 // at the end
25 //
26 
27 
28 struct rdoHeader {
29  u_int bytes ; // bytes including header and trailer, minus 4 bytes.
30  u_int w[2] ; // (each has same format as trailer? but fifo status 0xa?
31  union {
32  u_int deadface; // currently 0xdeadface
33  char specifier[4]; // future could be "DTA\0" / "LOG\0" etc... for easy browsing
34  };
35 };
36 
37 struct altroData {
38  // Packing is altro10[x] = (w>>(x*10)) & 0x3ff
39  unsigned long long w;
40 
41 };
42 
43 struct rdoTrailer {
44  union {
45  u_int status;
46  struct {
47  unsigned evt:20;
48  unsigned err:8; // 0x08 good event
49  unsigned fifoStatus:4; // 0xb
50  };
51  };
52 };
53 
54 
55 
56 
57 #endif
58