GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4BufferQueue.h
Go to the documentation of this file.
1 // $Id: TGo4BufferQueue.h 695 2011-01-19 15:16:14Z 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 TGO4BUFFERQUEUE_H
15 #define TGO4BUFFERQUEUE_H
16 
17 #include "TGo4Queue.h"
18 
19 class TMutex;
20 class TIterator;
21 class TList;
22 
27 class TGo4BufferQueue : public TGo4Queue {
28 
29  public:
30 
31  TGo4BufferQueue() ;
32 
33  TGo4BufferQueue(const char* name);
34 
40  void AddBufferFromObject(TObject * object);
41 
47  void AddBuffer(TBuffer * buffer, Bool_t clone=kFALSE);
48 
56  void FreeBuffer(TBuffer * buffer);
57 
59  virtual void Clear(Option_t* opt="");
60 
65  TBuffer * WaitBuffer();
66 
72  TObject * WaitObjectFromBuffer();
73 
74  virtual ~TGo4BufferQueue() ;
75 
83  static TBuffer* CreateValueBuffer(UInt_t val);
84 
92  static Int_t DecodeValueBuffer(TBuffer* buf);
93 
94 
98  static const Int_t fgiISOWNER;
99 
100  private:
104  void InitBuffers();
105 
109  void Realloc(TBuffer* buffer, Int_t oldsize, Int_t newsize);
110 
114  TBuffer* NewEntry();
115 
116 
117 
129  TList* fxBufferList;
130 
132  TList* fxFreeList;
133  TMutex * fxBufferMutex;
135 
141 
142 };
143 
144 #endif //TGO4BUFFERQUEUE_H
TMutex * fxBufferMutex
TObject * WaitObjectFromBuffer()
virtual void Clear(Option_t *opt="")
TBuffer * WaitBuffer()
void Realloc(TBuffer *buffer, Int_t oldsize, Int_t newsize)
TBuffer * NewEntry()
void AddBuffer(TBuffer *buffer, Bool_t clone=kFALSE)
static Int_t DecodeValueBuffer(TBuffer *buf)
static const Int_t fgiISOWNER
static TBuffer * CreateValueBuffer(UInt_t val)
void FreeBuffer(TBuffer *buffer)
void AddBufferFromObject(TObject *object)
virtual ~TGo4BufferQueue()