00001 // $Id: TGo4FileSource.h 759 2011-06-22 11:34:10Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4FILESOURCE_H 00015 #define TGO4FILESOURCE_H 00016 00017 #include "TGo4EventSource.h" 00018 00019 #include "TString.h" 00020 00021 class TFile; 00022 class TTree; 00023 class TList; 00024 class TGo4FileSourceParameter; 00025 class TGo4EventElement; 00026 class TGo4CompositeEvent; 00027 00037 class TGo4FileSource : public TGo4EventSource { 00038 00039 public: 00040 00041 TGo4FileSource(); 00042 00043 TGo4FileSource(TGo4FileSourceParameter* par); 00044 00045 TGo4FileSource(const char* name); 00046 00047 virtual ~TGo4FileSource(); 00048 00052 virtual Bool_t BuildEvent(TGo4EventElement* dest); 00053 00054 static TList* ProducesFilesList(const char* mask); 00055 00056 private: 00057 00058 TFile* fxFile; 00059 00060 TTree * fxTree; 00061 00064 Long64_t fiMaxEvents; 00065 00067 Long64_t fiCurrentEvent; 00068 00070 long int fiGlobalEvent; 00071 00073 Bool_t fbActivated; 00074 00076 TGo4EventElement* fxTopEvent; 00077 00079 TList* fxFilesNames; 00080 00082 TString fxCurrentFileName; 00083 00085 Bool_t OpenNextFile(); 00086 00088 Bool_t CloseCurrentFile(); 00089 00090 ClassDef(TGo4FileSource,2) 00091 }; 00092 00093 #endif //TGO4FILESOURCE_H