00001 //--------------------------------------------------------------- 00002 // Go4 Release Package v2.10-5 (build 21005) 00003 // 03-Nov-2005 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at DVEE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #ifndef TGO4BUFFERQUEUE_H 00017 #define TGO4BUFFERQUEUE_H 00018 00019 #include "TGo4Queue.h" 00020 00021 class TMutex; 00022 class TIterator; 00023 class TList; 00024 class TBuffer; 00025 00030 class TGo4BufferQueue : public TGo4Queue { 00031 00032 public: 00033 00034 TGo4BufferQueue() ; 00035 00036 TGo4BufferQueue(const char* name); 00037 00043 void AddBufferFromObject(TObject * object); 00044 00050 void AddBuffer(TBuffer * buffer, Bool_t clone=kFALSE); 00051 00059 void FreeBuffer(TBuffer * buffer); 00060 00062 virtual void Clear(Option_t* opt=""); 00063 00068 TBuffer * WaitBuffer(); 00069 00075 TObject * WaitObjectFromBuffer(); 00076 00077 virtual ~TGo4BufferQueue() ; 00078 00086 static TBuffer* CreateValueBuffer(UInt_t val); 00087 00095 static Int_t DecodeValueBuffer(TBuffer* buf); 00096 00097 00101 static const Int_t fgiISOWNER; 00102 00103 private: 00107 void InitBuffers(); 00108 00112 void Realloc(TBuffer* buffer, Int_t oldsize, Int_t newsize); 00113 00117 TBuffer* NewEntry(); 00118 00119 00120 00132 TList* fxBufferList; 00133 00135 TList* fxFreeList; 00136 TMutex * fxBufferMutex; 00137 Int_t fiOverflowcount; 00138 00140 TIterator * fxBufferIterator; 00141 00146 Int_t fiMaxBuffers; 00147 00148 }; 00149 00150 #endif //TGO4BUFFERQUEUE_H 00151 00152 //----------------------------END OF GO4 SOURCE FILE ---------------------