StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
daq_trg.h
1 #ifndef _DAQ_TRG_H_
2 #define _DAQ_TRG_H_
3 
4 #include <stdio.h>
5 #include <DAQ_READER/daq_det.h>
6 
7 
8 
9 struct trg_t {
10  int mode ;
11  u_int max_channels ;
12  u_int channels ;
13 
14  u_short tcubits ;
15  u_short detlive ;
16  u_int daqbits ;
17  u_char *trgc ;
18 
19  u_int offline_id[32] ; // the Offline trigged ID
20 
21  void *trg_sum ; // actual structures depend on the version of trgStructures.h, can be NULL!
22  void *trgd ; // pointer to the whole Trigger data bank but untouched (not swapped)! Can be NULL!
23 
24  u_int xing_hi, xing_lo ;
25  u_short npre, npost ;
26  u_short phys_word, trg_word ;
27 
28 
29  u_char CTB[240] ;
30 
31  u_char MWC[96] ; // obsolete as of 2007 (all zeros)
32 
33  u_char MTD[32]; // starting 2007
34  u_char VPD[64]; // starting 2007
35  u_char P2P[32]; // starting 2008
36  u_char TOF[16]; // starting 2007
37 
38  u_char BEMC[2][240] ;
39  u_short BEMC_l1[48] ;
40 
41  u_char EEMC[144] ;
42  u_short EEMC_l1[16] ;
43 
44  u_char FPD[2][2][112] ; // mostly obsolete (except for [0][0][i])
45  u_char FPD_l1[2][2][8] ; // mostly obsolete (except for [0][0][i])
46 
47  u_char FPDW[256]; // starting 2007
48 
49  u_char BBC[96] ; // version 0x21 -> 0x22: extended from 80 to 96
50  u_short BBC_l1[16] ;
51 
52  u_char ZDC[16] ;
53  u_short ZDC_l1[8] ;
54  u_char ZDCSMD[32] ;
55 
56  u_short QQTdataBytes;
57  u_int QQTdata[1600];
58 } ;
59 
60 
61 
62 class daq_trg : public daq_det {
63 private:
64  class daq_dta *handle_legacy() ;
65  class daq_dta *handle_raw() ;
66 
67  class daq_dta *legacy ; // "legacy" bank
68  class daq_dta *raw ; // full content of Trigger's banks, any version...
69 
70  static const char *help_string ;
71 protected:
72 
73 
74 public:
75  daq_trg(daqReader *rts_caller=0) ;
76  ~daq_trg() ;
77 
78 
79  daq_dta *get(const char *bank="*",int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
80 
81  void help() const {
82  printf("%s\n%s\n",GetCVS(),help_string) ;
83  }
84 
85  const char *GetCVS() const { // Offline
86  static const char cvs[]="Tag $Name: $Id: built " __DATE__ " " __TIME__ ; return cvs;
87  }
88 
89 } ;
90 
91 
92 #endif // _DAQ_TRG_H_
Definition: daq_trg.h:9