GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4MbsSource.h
Go to the documentation of this file.
1 // $Id: TGo4MbsSource.h 822 2011-12-19 09:16:18Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4MBSSOURCE_H
15 #define TGO4MBSSOURCE_H
16 
17 #include "TGo4EventSource.h"
18 
19 #ifdef __CINT__
20 
21 struct s_filhe;
22 struct s_bufhe;
23 struct s_evt_channel;
24 struct s_ve10_1;
25 
26 #else
27 
28 extern "C"
29 {
30  #include "f_evt.h"
31  #include "s_filhe_swap.h"
32  #include "s_bufhe_swap.h"
33 }
34 
35 #endif
36 
37 class TGo4MbsEvent;
38 class TGo4MbsSubEvent;
40 
42 class TGo4MbsSourcePrintPar : public TObject {
43 
44  public:
45  TGo4MbsSourcePrintPar() : TObject(), fiNum(0), fiSid(0), fiLong(0), fiHex(0), fiData(0) {}
48  Int_t fiNum;
50  Int_t fiSid;
52  Int_t fiLong;
54  Int_t fiHex;
56  Int_t fiData;
57  ClassDef(TGo4MbsSourcePrintPar, 1)
58 };
59 
60 
62  public:
63 
65  TGo4MbsSource();
66 
67  TGo4MbsSource(const char* name, Int_t mode);
68 
69  TGo4MbsSource(TGo4MbsSourceParameter* par, Int_t mode);
70 
71  virtual ~TGo4MbsSource();
72 
74  virtual Bool_t CheckEventClass(TClass* cl);
75 
77  virtual Bool_t BuildEvent(TGo4EventElement* dest);
78 
80  virtual Int_t Close();
81 
83  virtual Int_t Open();
84 
86  virtual Int_t NextEvent();
87 
93  void BuildMbsEvent(TGo4MbsEvent * target);
94 
98  TGo4MbsSubEvent* BuildMbsSubEvent(TGo4MbsEvent * target, Int_t fullID, Short_t* source, Int_t datalength);
99 
101  void SetStartEvent(UInt_t firstindex) { fuStartEvent=firstindex; }
102 
103  void SetStopEvent(UInt_t lastindex) { fuStopEvent=lastindex; }
104 
105  void SetEventInterval(UInt_t skipinterval) { fuEventInterval=skipinterval; }
106 
107  void SetTimeout(Int_t time) { fiTimeout=time; }
108 
109  void SetPort(Int_t port) { fiPort=port; }
110 
113 
115  virtual s_bufhe * GetBufferHeader();
116 
118  static const UInt_t fguLONGBYCHAR;
119 
121  static const UInt_t fguSHORTBYCHAR;
122 
124  static const UInt_t fguLONGBYSHORT;
125 
127  static const UInt_t fguEVHEBYCHAR;
128 
133  void SetPrintEvent(Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0);
134 
135  void SetDataCopyMode(Bool_t on) { fbDataCopyMode=on; }
136 
137  private:
138 
140  Int_t fiMode;
141 
142  Int_t fiRetryCnt;
143 
144  Int_t GetMode() const { return fiMode; }
145 
146  protected:
147 
150 
152 
155 
158 
159  Bool_t fbIsOpen;
160 
165 
167  ULong_t fuEventCounter;
168 
170  Bool_t fbFirstEvent;
171 
173  ULong_t fuStartEvent;
174 
176  ULong_t fuStopEvent;
177 
180 
182  Int_t fiTimeout;
183 
185  Int_t fiPort;
186 
189 
190  ClassDef(TGo4MbsSource, 3)
191 
192 };
193 
194 #endif //TGO4MBSSOURCE_H
virtual ~TGo4MbsSourcePrintPar()
Definition: TGo4MbsSource.h:46
s_evt_channel * fxInputChannel
void SetStopEvent(UInt_t lastindex)
void SetEventInterval(UInt_t skipinterval)
s_filhe * fxInfoHeader
Bool_t fbDataCopyMode
virtual Bool_t CheckEventClass(TClass *cl)
virtual ~TGo4MbsSource()
ULong_t fuEventCounter
ULong_t fuEventInterval
virtual Int_t NextEvent()
void BuildMbsEvent(TGo4MbsEvent *target)
Int_t GetMode() const
number of allowed reconnect retries
void SetTimeout(Int_t time)
s_filhe * GetInfoHeader()
void SetStartEvent(UInt_t firstindex)
s_bufhe * fxBuffer
static const UInt_t fguLONGBYCHAR
static const UInt_t fguSHORTBYCHAR
virtual Int_t Close()
s_ve10_1 * fxEvent
static const UInt_t fguEVHEBYCHAR
Bool_t fbFirstEvent
virtual Int_t Open()
ULong_t fuStartEvent
void SetPrintEvent(Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0)
virtual Bool_t BuildEvent(TGo4EventElement *dest)
ULong_t fuStopEvent
virtual s_bufhe * GetBufferHeader()
TGo4MbsSubEvent * BuildMbsSubEvent(TGo4MbsEvent *target, Int_t fullID, Short_t *source, Int_t datalength)
TGo4MbsSourcePrintPar fxPrEventPar
static const UInt_t fguLONGBYSHORT
void SetDataCopyMode(Bool_t on)
void SetPort(Int_t port)