GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4BufferQueue.h
Go to the documentation of this file.
1 // $Id: TGo4BufferQueue.h 2627 2019-10-01 08:02:45Z 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 fuer 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  private:
98  void InitBuffers();
99 
103  void Realloc(TBuffer* buffer, Int_t oldsize, Int_t newsize);
104 
108  TBuffer* NewEntry();
109 
121  TList* fxBufferList;
122 
124  TList* fxFreeList;
125  TMutex * fxBufferMutex;
126 
132 
133 };
134 
135 #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 TBuffer * CreateValueBuffer(UInt_t val)
void FreeBuffer(TBuffer *buffer)
void AddBufferFromObject(TObject *object)
virtual ~TGo4BufferQueue()