00001 #ifndef _DAQ_TPC_H_
00002 #define _DAQ_TPC_H_
00003
00004
00005 #include <DAQ_READER/daq_det.h>
00006
00007 #define TPC_READER_MAX_CLUSTERS 5000
00008
00009
00010
00011 struct tpc_cl {
00012 float p ;
00013 float t ;
00014 u_short charge ;
00015 u_short flags ;
00016 u_short t1, t2, p1, p2 ;
00017
00018 u_short adc_max ;
00019
00020 } ;
00021
00022 struct tpc_t {
00023
00024 int mode ;
00025 int max_channels_all ;
00026 int max_channels_sector ;
00027 int channels_sector ;
00028 int has_clusters ;
00029
00030
00031 u_short counts[45][182] ;
00032
00033
00034
00035 u_short timebin[45][182][512] ;
00036
00037
00038
00039 u_char adc[45][182][512] ;
00040
00041
00042 u_short cl_counts[45] ;
00043
00044
00045 struct tpc_cl cl[45][TPC_READER_MAX_CLUSTERS] ;
00046
00047 u_int *cl_p[45][3] ;
00048
00049 u_char rdo_present[6] ;
00050 } ;
00051
00052 class daq_tpc : public daq_det {
00053 private:
00054 class daq_dta *handle_adc(int sec, int rdo) ;
00055 class daq_dta *handle_cld(int sec, int rdo) ;
00056 class daq_dta *handle_legacy(int sec, int rdo) ;
00057
00058 class daq_dta *adc ;
00059 class daq_dta *cld ;
00060 class daq_dta *legacy ;
00061
00062 static const int MAX_SEC = 24 ;
00063 static const int MAX_RDO = 6 ;
00064
00065
00066 protected:
00067
00068
00069 public:
00070 daq_tpc(daqReader *rts_caller=0) ;
00071 ~daq_tpc() ;
00072
00073
00074
00075
00076
00077
00078
00079 int fcfReader(int sector, int *t0c, u_int *gainc, tpc_t *tpc_p) ;
00080
00081 daq_dta *get(const char *bank="*",int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
00082
00083 int get_l2(char *buff, int buff_bytes, struct daq_trg_word *trg, int prompt) ;
00084
00085 const char *GetCVS() const {
00086 static const char cvs[]="Tag $Name: $Id: built "__DATE__" "__TIME__ ; return cvs;
00087 }
00088
00089 } ;
00090
00091
00092 #endif // _DAQ_TPC_H_