StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
daq_tpc.h
1 #ifndef _DAQ_TPC_H_
2 #define _DAQ_TPC_H_
3 
4 
5 #include <DAQ_READER/daq_det.h>
6 
7 #define TPC_READER_MAX_CLUSTERS 5000
8 
9 
10 // cluster structures
11 struct tpc_cl {
12  float p ;
13  float t ;
14  u_short charge ;
15  u_short flags ;
16  u_short t1, t2, p1, p2 ;
17 //#ifdef FCF_SIM_ON
18  u_short adc_max ;
19 //#endif
20 } ;
21 
22 struct tpc_t {
23 
24  int mode ; // 0 normal, 1 pedestals/RMSs
25  int max_channels_all ;
26  int max_channels_sector ;
27  int channels_sector ;
28  int has_clusters ; // are there any clusters in the data?
29 
30  // how many valid timebins in this pad
31  u_short counts[45][182] ;
32 
33  // up to 512 valid timebins (count is in counts)
34  // timebin is overloaded with RMS data if mode==1
35  u_short timebin[45][182][512] ;
36 
37  // up to 512 valid adcs (same count as above...)
38  // overloaded with PED data if mode==1
39  u_char adc[45][182][512] ;
40 
41  // how many valid clusters in this row
42  u_short cl_counts[45] ;
43 
44  // cluster structures
45  struct tpc_cl cl[45][TPC_READER_MAX_CLUSTERS] ;
46 
47  u_int *cl_p[45][3] ; // points MZ row data
48 
49  u_char rdo_present[6] ; // boolean stating the presence of an RDO
50 } ;
51 
52 class daq_tpc : public daq_det {
53 private:
54  class daq_dta *handle_adc(int sec, int rdo) ;
55  class daq_dta *handle_cld(int sec, int rdo) ;
56  class daq_dta *handle_legacy(int sec, int rdo) ;
57 
58  class daq_dta *adc ; // "adc"
59  class daq_dta *cld ; // "cld"
60  class daq_dta *legacy ;
61 
62  static const int MAX_SEC = 24 ; // was TPC_MAXFEE; used to be 30 before FY05...
63  static const int MAX_RDO = 6 ; // not used
64 
65 
66 protected:
67 
68 
69 public:
70  daq_tpc(daqReader *rts_caller=0) ;
71  ~daq_tpc() ;
72 
73  // special for TPC...
74  // Assume that tpc raw structure is alread filled
75  //
76  // t0corr --> int t0[46][242], for this sector
77  // gainCorr --> u_int gain[46][242], for this sector
78  //
79  int fcfReader(int sector, int *t0c, u_int *gainc, tpc_t *tpc_p) ;
80 
81  daq_dta *get(const char *bank="*",int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
82 
83  int get_l2(char *buff, int buff_bytes, struct daq_trg_word *trg, int prompt) ;
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_TPC_H_
Definition: daq_tpc.h:22
Definition: daq_tpc.h:11