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 TGO4FILESTORE_H 00017 #define TGO4FILESTORE_H 00018 00019 #include "TGo4EventStore.h" 00020 00021 class TFile; 00022 class TTree; 00023 00024 class TGo4EventCalibration; 00025 class TGo4EventElement; 00026 class TGo4FileStoreParameter; 00027 00038 class TGo4FileStore : public TGo4EventStore { 00039 public: 00040 00041 TGo4FileStore(); 00042 00043 TGo4FileStore(const char* name, 00044 Int_t splitlevel=1, 00045 Int_t compression=1, 00046 Bool_t overwrite=kFALSE, 00047 Int_t autosavesize=10000000, 00048 Int_t bufsize=64000); 00049 00050 TGo4FileStore(TGo4FileStoreParameter* par); 00051 00052 virtual ~TGo4FileStore(); 00053 00056 virtual Int_t Store(TGo4EventElement* event); 00057 00059 virtual Int_t Store(TGo4Parameter* cali); 00060 00062 virtual Int_t Store(TGo4Condition* conny); 00063 00065 virtual Int_t Store(TGo4Fitter* fitter); 00066 00068 virtual Int_t Store(TFolder* fold); 00069 00071 void SetCompression(Int_t comp); 00072 00074 void SetAutoSave(Int_t bytesinterval); 00075 00078 static const Text_t fgcEVBRANCHNAME[]; 00079 00081 static const Text_t fgcFILESUF[]; 00082 00084 static const Text_t fgcTREESUF[]; 00085 00087 static const Int_t fgiFILESPLITSIZE; 00088 00090 virtual TTree* GetTree() { return fxTree; } 00091 00092 private: 00093 00095 void WriteToStore(TNamed* ob); 00096 00097 TFile* fxFile; 00098 00099 TTree * fxTree; 00100 00103 Bool_t fbBranchExists; 00104 00106 TGo4EventElement * fxEvent; 00107 00109 Int_t fiSplit; 00110 00112 Int_t fiBufsize; 00113 00115 Int_t fiFillCount; 00116 00117 ClassDef(TGo4FileStore,1) 00118 }; 00119 00120 #endif //TGO4FILESTORE_H 00121 00122 //----------------------------END OF GO4 SOURCE FILE ---------------------