00001 #ifndef _FGT_PED_HH_
00002 #define _FGT_PED_HH_
00003
00004
00005 #include <sys/types.h>
00006
00007 #include "daq_fgt.h"
00008
00009 class fgtPed {
00010 public:
00011 fgtPed() ;
00012 ~fgtPed() ;
00013
00014
00015 int sector ;
00016 int valid ;
00017
00018 void init(int active_rbs) ;
00019
00020 void accum(char *evbuff, int bytes, int rdo) ;
00021 void calc() ;
00022 int to_evb(char *buff) ;
00023
00024 void do_thresh(double n_sigma) ;
00025
00026 int do_zs(char *src, int in_bytes, char *dst, int rdo1) ;
00027
00028
00029 int from_cache(char *fname = 0) ;
00030 int to_cache(char *fname = 0, u_int run = 0) ;
00031
00032 int special_setup(int run_type, int sub_type) ;
00033
00034
00035
00036 private:
00037
00038
00039
00040
00041 struct peds {
00042 double ped[FGT_ARM_COU][FGT_APV_COU][FGT_CH_COU] ;
00043 double rms[FGT_ARM_COU][FGT_APV_COU][FGT_CH_COU] ;
00044 u_short thr[FGT_ARM_COU][FGT_APV_COU][FGT_CH_COU] ;
00045 u_short cou[FGT_ARM_COU][FGT_APV_COU][FGT_CH_COU] ;
00046 } *ped_store ;
00047
00048
00049 daq_fgt *fgt_rdr ;
00050
00051 int sizeof_ped ;
00052
00053 u_int evts[2] ;
00054 u_int valid_evts[2] ;
00055 int rb_mask ;
00056
00057 } ;
00058
00059 #endif