StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
emcReader.h
1 #ifndef _EMC_READER_H_
2 #define _EMC_READER_H_
3 
4 #include <sys/types.h>
5 #include "daqFormats.h"
6 
7 //BARREL constants
8 #define BTOW_MAXFEE 30
9 #define BTOW_PRESIZE 4
10 #define BTOW_DATSIZE 160
11 
12 // ENDCAP constants; from Piotr
13 #define ETOW_MAXFEE 6
14 #define ETOW_PRESIZE 4
15 #define ETOW_DATSIZE 160
16 #define ESMD_MAXFEE 48 // used to be 30
17 #define ESMD_PRESIZE 4
18 #define ESMD_DATSIZE 192
19 
20 struct emc_t {
21  emc_t();
22  void reset();
23  int check();
24 
25  int fenceA;
26  u_char btow_in ;
27  u_short btow_max_ch ;
28  u_short btow_ch ;
29  u_short btow[4800] ; int fenceB;
30  u_short *btow_raw ;
31  // added later
32  u_short btow_new[BTOW_MAXFEE][BTOW_DATSIZE] ;
33  u_short btow_pre[BTOW_MAXFEE][BTOW_PRESIZE] ;
34 
35  u_char bsmd_in ;
36  u_short bsmd_max_ch ;
37  u_short bsmd_ch ;
38  u_short bsmd[EMC_FIBER_NUM][4800] ;int fenceC;
39  u_char bsmd_cap[EMC_FIBER_NUM] ;int fenceD; // capacitor value...
40 
41 #if 0
42  // the bpre is currently unused - the data is in the last 4ish fibers of BSMD...
43  u_char bpre_in ;
44  u_short bpre_max_ch ;
45  u_short bpre_ch ;
46  u_short bpre[4800] ; // noooo idea...
47 #endif
48 
49  // ENDCAP TOWERS
50  u_char etow_in ; // in this event?
51  u_short etow_max_ch ; // constant ETOW_MAXFEE * ETOW_DATSIZE
52 
53  u_short etow_ch ; // channels above zero
54  u_short etow[ETOW_MAXFEE][ETOW_DATSIZE] ; int fenceE;// ADC data...
55  u_short etow_pre[ETOW_MAXFEE][ETOW_PRESIZE]; int fenceF;// ETOW preamble
56  u_short *etow_raw ; // pointer to the beginning of rawdata; raw data is little endian
57 
58 
59 
60  // ENDCAP Showermax & preshower(?)
61  u_char esmd_in ; // in this event?
62  u_short esmd_max_ch ; // 48 * 192
63  u_short esmd_ch ; // channels above 0
64  u_short esmd_max_fee ; // ESMD_MAXFEE changed between FY04 and FY05...
65  u_short esmd [ESMD_MAXFEE][ESMD_DATSIZE]; int fenceG;
66  u_short esmd_pre[ESMD_MAXFEE][ESMD_PRESIZE]; int fenceH;
67  u_short *esmd_raw ; // pointer to the beginning of raw data; raw data is little endian
68  int fenceZ;
69 
70 
71 } ;
72 
73 namespace OLDEVP {
74 extern struct emc_t emc ;
75 
76 extern int emcReader(char *mem) ;
77 }
78 
79 #endif
Definition: daq_emc.h:52
u_short * esmd_raw
ESMD preamble.
Definition: daq_emc.h:96
u_short esmd_pre[ESMD_MAXFEE][ESMD_PRESIZE]
ADC data.
Definition: daq_emc.h:95