Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4EventServer/TGo4MainTree.h

Go to the documentation of this file.
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 TGO4MAINTREE_H
00017 #define TGO4MAINTREE_H
00018 
00019 #include "TObject.h"
00020 #include "TTree.h"
00021 #include "TFile.h"
00022 
00023 #include "Go4Log/TGo4Log.h"
00024 #include "Go4Exceptions/Go4Exceptions.h"
00025 
00036 class TGo4MainTree : public TObject {
00037   friend class TGo4TreeSource;
00038   friend class TGo4TreeStore;
00039 
00040   protected:
00043     TTree* GetTree() { return fxTree; }
00044 
00045     TGo4MainTree();
00046 
00047   public:
00048 
00049     virtual ~TGo4MainTree();
00050 
00052     static const Text_t fgcTREENAME[]; 
00053 
00055     static const Text_t fgcFILENAME[]; 
00056 
00058     static const Int_t fgiCOMPRESS; 
00059 
00061     static const Int_t fgiAUTOSAVESIZE; 
00062 
00063     static TGo4MainTree * Instance();
00064 
00068     static Bool_t Exists() { return fxInstance!=0; }
00069 
00070     Int_t GetCurrentIndex() const { return fiCurrentIndex; }
00071 
00075     Int_t IncCurrentIndex() { return (++fiCurrentIndex); }
00076 
00077     void SetCurrentIndex(Int_t number=0) { fiCurrentIndex = number; }
00078 
00079     Int_t GetMaxIndex();
00080 
00082     void SetAutoSave(Int_t bytesinterval);
00083 
00087     void Update();
00088 
00090     virtual Int_t Write(const char* dummy="", Int_t option=1, Int_t bufsize=1);
00091 
00092   private:
00093 
00094     static TGo4MainTree * fxInstance; 
00095 
00096     TFile* fxFile; 
00097  
00098     TTree * fxTree; 
00099  
00102     Int_t fiMaxIndex;
00103 
00105     Int_t fiCurrentIndex;
00106 
00107   ClassDef(TGo4MainTree,1)
00108 };
00109 
00110 #endif //TGO4MAINTREE_H
00111 
00112 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:53 2005 for Go4-v2.10-5 by doxygen1.2.15