StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
daq_bsmd.h
1 #ifndef _DAQ_BSMD_H_
2 #define _DAQ_BSMD_H_
3 
4 
5 #include <DAQ_READER/daq_det.h>
6 
7 #include <DAQ_EMC/daq_emc.h>
8 
9 
10 struct bsmd_t {
11  short adc[BSMD_DATSIZE] ;
12  u_char cap ; // capacitor
13 } ;
14 
15 
16 class daq_bsmd : public daq_det {
17 private:
18  class daq_dta *handle_adc(int rdo) ;
19  class daq_dta *handle_raw(int rdo) ;
20  class daq_dta *handle_adc_non_zs(int rdo) ;
21  class daq_dta *handle_ped_rms(int rdo, int is_ped) ;
22 
23 
24  class daq_dta *adc ; // "adc"
25  class daq_dta *adc_non_zs ;
26  class daq_dta *ped ;
27  class daq_dta *rms ;
28  class daq_dta *raw ;
29 
30  static const char *help_string ;
31 
32 
33 
34 
35 protected:
36 
37 
38 public:
39  daq_bsmd(daqReader *rts_caller=0) ;
40  ~daq_bsmd() ;
41 
42 
43  daq_dta *get(const char *bank="*",int c1=-1, int c2=-1, int c3=-1, void *p1=0, void *p2=0) ;
44 
45  int get_l2(char *buff, int buff_bytes, struct daq_trg_word *trg, int prompt) ;
46 
47  const char *GetCVS() const { // Offline
48  static const char cvs[]="Tag $Name: $Id: built " __DATE__ " " __TIME__ ; return cvs;
49  }
50 
51  u_char rdo_id[7] ; // for RDO checks in get_l2
52  u_int rdo_warns[7] ; // number of warning issued...
53 
54  unsigned int t_data ; // for trg_cmd pattern tests!
55 
56 
57 } ;
58 
59 // internal support
60 struct bsmd_desc {
61  char *dta[BSMD_FIBERS][3] ; //0 is non-ZS, 1 is ZS, 2 is PED
62  int bytes[BSMD_FIBERS][3] ;
63  int endian[BSMD_FIBERS][3] ; // 1-BIG, 0-LITTLE
64 } ;
65 
66 extern char *bsmd_reader(char *e, struct bsmd_desc *bsmd_d) ;
67 
68 #endif // _DAQ_BSMD_H_