StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
daq_tpx.h
1 #ifndef _DAQ_TPX_H_
2 #define _DAQ_TPX_H_
3 
4 
5 #include <DAQ_READER/daq_det.h>
6 
7 
8 // forward decls
9 class tpxPed ;
10 class tpxGain ;
11 class tpxFCF ;
12 class tpxStat ;
13 class daqReader;
14 class tpxFCF_2D ;
15 
16 class tpx23 ;
17 
18 class daq_tpx : public daq_det {
19 private:
20  class daq_dta *handle_raw(int sec, int rdo) ;
21  class daq_dta *handle_legacy(int sec, int rdo) ;
22  class daq_dta *handle_adc(int sec, int rdo) ;
23  class daq_dta *handle_altro(int sec, int rdo) ;
24  class daq_dta *handle_cld(int sec, int rdo) ;
25  class daq_dta *handle_cld_raw(int sec, int rdo) ;
26  class daq_dta *handle_cld_sim(int sec, int row) ;
27  class daq_dta *handle_cld_2d_sim(int sec, int row) ;
28  class daq_dta *handle_ped(int sec) ;
29 
30  // direct maps to file content:
31  class daq_dta *raw ;
32  class daq_dta *cld_raw ;
33  class daq_dta *ped_raw ; // token 0
34 
35  // calculated from "raw" (sfs "adc")
36  class daq_dta *adc ;
37 
38  // calculated from "cld_raw" (sfs adc)
39  class daq_dta *cld ;
40 
41  // made to look like TPC!
42  class daq_dta *legacy ;
43 
44  // input classes by the user
45  class daq_dta *adc_sim ;
46  class daq_dta *gain ; // ACTIVE: from file or database
47  class daq_dta *ped ; // ACTIVE: from file
48 
49  // calculated from "adc_sim"
50  class daq_dta *cld_sim ;
51  class daq_dta *cld_2d_sim ;
52 
53  // calculated via algorithm at end-run
54  class daq_dta *ped_c ; // in ped runs
55  class daq_dta *gain_c ; // in pulser runs
56 
57  class daq_dta *altro ;
58 
59 
60  // algorithms
61  class tpxPed *ped_algo ;
62 
63  class tpxStat *stat_algo ;
64 
65 
66 
67  u_int *fcf_tmp_storage ;
68 
69  static const int FCF_TMP_BYTES = (1024*1024) ; // for local FCF
70 
71  static const int MAX_SEC = 24 ;
72  static const int MAX_RDO = 6 ;
73 
74  static const char *help_string ;
75 
76  int cld23 ;
77 
78  int rdo_fmt ;
79 
80  tpx23 *t23 ;
81 
82 
83 
84 protected:
85 
86 public:
87  daq_tpx(daqReader *rts_caller=0) ;
88  ~daq_tpx() ;
89 
90  class tpxGain *gain_algo ;
91 
92  char fcf_afterburner_disable ;
93  char fcf_run_compatibility ;
94  char fcf_do_cuts ;
95 
96  u_char mode ;
97 
98  // for use by simulation
99  int sim_row_count ;
100  unsigned char *sim_tpx_rowlen ;
101 
102 
103  class tpxFCF *fcf_algo[25] ;
104  class tpxFCF_2D *fcf_2d_algo[25] ;
105 
106  int InitRun(int run_num) ; // used in send_config
107  int FinishRun(int old_run) ; // used in inject_token0
108 
109 
110  class daq_dta *get(const char *bank="*", int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
111 
112  class daq_dta *put(const char *bank="*", int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
113 
114  // these functions perform on the raw DDL buffer data i.e. per RDO
115  int get_token(char *buff, int buff_bytes) ;
116  int get_l2(char *buff, int buff_bytes, struct daq_trg_word *trg, int prompt=0) ;
117 
118 
119 
120  // trivial stuff below...
121  virtual const char *GetCVS() const { // Offline
122  static const char cvs[]="Tag $Name: $Id: built " __DATE__ " " __TIME__ ; return cvs;
123  }
124 
125  void help() const ;
126 
127 } ;
128 
129 
130 #endif // _DAQ_TPX_H_
Definition: tpxFCF.h:87
Definition: tpxPed.h:14
Definition: tpxStat.h:7
Definition: tpx23.h:48