Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4Queue.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 TGO4QUEUE_H
00017 #define TGO4QUEUE_H
00018 
00019 #include "TNamed.h"
00020 
00021 class TCondition;
00022 class TList;
00023 class TMutex;
00024 
00033 class TGo4Queue : public TNamed {
00034    public:
00035       TGo4Queue();
00036 
00037       TGo4Queue(const char* name);
00038 
00039       virtual ~TGo4Queue();
00040 
00041       virtual void Clear(Option_t* opt="");
00042 
00043       virtual void Wake();
00044 
00045       Bool_t IsEmpty();
00046 
00047 
00048       Int_t GetEntries() const { return fiEntries; }
00049 
00050       void SetMaxEntries(Int_t max) { fiMaxEntries = max; }
00051 
00052    protected:
00053       TObject* Next();
00054       TObject* Wait();
00055       void Add(TObject* ob);
00056 
00057 
00058 
00059    private:
00060       TMutex* fxMutex;           
00061       TCondition* fxCondition;   
00062       TList* fxList;             
00063       Int_t fiEntries;           
00064       Int_t fiMaxEntries;        
00065       Bool_t fbWakeUpCall;       
00066 };
00067 
00068 #endif //TGO4QUEUE_H
00069 
00070 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:28 2008 for Go4-v3.04-1 by  doxygen 1.4.2