00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TGO4MBSSOURCE_H
00017 #define TGO4MBSSOURCE_H
00018
00019 #include "TGo4EventSource.h"
00020
00021 #ifdef __CINT__
00022
00023 struct s_filhe;
00024 struct s_bufhe;
00025 struct s_evt_channel;
00026 struct s_ve10_1;
00027
00028 #else
00029
00030 extern "C"
00031 {
00032 #include "f_evt.h"
00033 #include "s_filhe_swap.h"
00034 #include "s_bufhe_swap.h"
00035 }
00036
00037 #endif
00038
00039 class TGo4MbsEvent;
00040 class TGo4MbsSubEvent;
00041
00043 class TGo4MbsSourcePrintPar : public TObject {
00044
00045 public:
00046 TGo4MbsSourcePrintPar():fiNum(0), fiSid(0), fiLong(0),fiHex(0), fiData(0){}
00047 virtual ~TGo4MbsSourcePrintPar(){}
00049 Int_t fiNum;
00051 Int_t fiSid;
00053 Int_t fiLong;
00055 Int_t fiHex;
00057 Int_t fiData;
00058 ClassDef(TGo4MbsSourcePrintPar, 1)
00059 };
00060
00061
00062 class TGo4MbsSource : public TGo4EventSource {
00063 public:
00064
00066 TGo4MbsSource();
00067
00068 TGo4MbsSource(const char* name, Int_t mode);
00069
00070 virtual ~TGo4MbsSource();
00071
00073 virtual Int_t Close();
00074
00076 virtual Int_t Open();
00077
00079 virtual Int_t NextEvent();
00080
00086 void BuildMbsEvent(TGo4MbsEvent * target);
00087
00088
00093 TGo4MbsSubEvent* BuildMbsSubEvent(TGo4MbsEvent * target, Int_t fullID, Short_t* source, Int_t datalength);
00094
00095
00097 void SetStartEvent(UInt_t firstindex) { fuStartEvent=firstindex; }
00098
00099 void SetStopEvent(UInt_t lastindex) { fuStopEvent=lastindex; }
00100
00101 void SetEventInterval(UInt_t skipinterval) { fuEventInterval=skipinterval; }
00102
00103 void SetTimeout(Int_t time) { fiTimeout=time; }
00104
00106 s_filhe * GetInfoHeader() { return fxInfoHeader; }
00107
00109 virtual s_bufhe * GetBufferHeader();
00110
00112 static const UInt_t fguLONGBYCHAR;
00113
00115 static const UInt_t fguSHORTBYCHAR;
00116
00118 static const UInt_t fguLONGBYSHORT;
00119
00121 static const UInt_t fguEVHEBYCHAR;
00122
00127 void SetPrintEvent(Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0);
00128
00129 void SetDataCopyMode(Bool_t on) { fbDataCopyMode=on; }
00130
00131 private:
00132
00134 Int_t fiMode;
00135
00136 protected:
00137
00139 s_evt_channel* fxInputChannel;
00140
00141 s_ve10_1* fxEvent;
00142
00144 s_bufhe * fxBuffer;
00145
00147 s_filhe * fxInfoHeader;
00148
00149 Bool_t fbIsOpen;
00150
00154 Bool_t fbDataCopyMode;
00155
00157 ULong_t fuEventCounter;
00158
00160 ULong_t fuStartEvent;
00161
00163 ULong_t fuStopEvent;
00164
00166 ULong_t fuEventInterval;
00167
00169 Int_t fiTimeout;
00170
00172 TGo4MbsSourcePrintPar fxPrEventPar;
00173
00174 ClassDef(TGo4MbsSource, 1)
00175
00176 };
00177
00178 #endif //TGO4MBSSOURCE_H
00179
00180