]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/icepack/iceconvert/twr_config.h
07-jun-2007 GdV OM readout type also updated from the data contents in IceRoot.cxx.
[u/mrichter/AliRoot.git] / RALICE / icepack / iceconvert / twr_config.h
1 #ifndef TWR_CONFIG_H
2 #define TWR_CONFIG_H
3
4 // Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved.
5 // See cxx source for full Copyright notice.
6
7 // $Id$
8
9 /////////////////////////////////////////////////////////////////////////
10 // This header file originates from the file config.h
11 // of Wolfgang Wagner's TWR raw data reader.
12 // The types u_int32_t etc... have been replaced by the ROOT portable
13 // types UInt_t etc... to obtain identical performance on all ROOT
14 // supported platforms from within the Ralice/IcePack framework.
15 // In addition the low level C "read()" invokations have been replaced
16 // by the standard C/C++ "fread()" invokations to even more enhance
17 // portability. As a result several header files have become obsolete
18 // and as such are not included anymore.
19 //
20 // NvE 07-dec-2006 Utrecht University
21 /////////////////////////////////////////////////////////////////////////
22
23 #include "twr_globalconst.h"
24
25 #define LENGTH_OF_STRING 100
26 #define MAX_N_VLF_VETOS_PER_HOUR 16
27
28 /*
29   Enhanced structures for Analysis
30 */
31
32 typedef struct  /* of one module */
33 {
34   UInt_t base;   /* Baseaddress in VME-BUS */
35   UInt_t id;     /* identifier for TWR  */
36   /* id = crate no * 0x10      (begining with 1) */
37   /*     + TWR number in crate (beginnig with 0)  */
38   
39   UInt_t mod_id;    /* Module ID from internal register   0x4 */
40   UInt_t ext_start; /* Extern Start Delay Register        0x14 */
41   UInt_t ext_stop;  /* Extern Stop Delay Register         0x18 */
42   
43   UInt_t om_no[CHANNELS_PER_TWR]; 
44   UInt_t om_is_optical[CHANNELS_PER_TWR];
45   UInt_t baseline[CHANNELS_PER_TWR];
46   UInt_t threshold[CHANNELS_PER_TWR];
47 } twr_config_t;
48
49
50 typedef struct
51 {
52   UInt_t vme_base_bridge;   /* physical base local bridge in master crate */
53   UInt_t vme_base_100MHz;   /* physical base local 100MHz module */
54  
55   char dsp_program_name[LENGTH_OF_STRING];
56   UInt_t base_gps; /* physical base of GPSAMD in remote crate */
57   UInt_t n_twr;  
58   twr_config_t *twr[MAX_N_TWR_PER_CRATE];
59 } crate_config_t;
60
61 typedef struct
62 {
63   Int_t pci_channel;
64   char pci_driver_name[LENGTH_OF_STRING];
65   char data_output_directory[LENGTH_OF_STRING];
66   UInt_t n_events_per_file;
67   UInt_t compression;
68
69   /* DSP parameters */
70   UInt_t preceeding_values_optical;
71   UInt_t following_values_optical;
72   UInt_t preceeding_values_electrical;
73   UInt_t following_values_electrical;
74
75   /* TWR */
76   UInt_t clockdiv;  /* Clockpredivider for Time Stamp for TWRs  */ 
77   UInt_t statreg;   /* Status Register                    0x0 */  
78   UInt_t acq_ctrl;  /* Acquisition Control Register       0x10 */
79   UInt_t evtconfig;
80   UInt_t triggerflagclearcounter;
81
82   /* GPS AMD / VLF stuff */
83   UInt_t b_vlf_trigger_veto_on; /* Enable VLF trigger veto */
84   UInt_t n_vlf_trigger_veto; /* no of trigger times per hour */
85   UInt_t start_vlf_trigger_veto[MAX_N_VLF_VETOS_PER_HOUR];
86   UInt_t duration_vlf_trigger_veto;
87   UInt_t overlap_vlf_trigger_veto;
88
89   UInt_t n_crates;
90   UInt_t n_twr;
91
92   crate_config_t *crate[MAX_N_CRATES+1];
93
94   twr_config_t *twr_field[MAX_N_CRATES * MAX_N_TWR_PER_CRATE];
95
96 }sys_config_t;
97
98
99
100 #endif
101
102
103
104
105
106
107
108
109
110
111
112
113
114