00001
00004 #ifndef STAR_StIOMaker
00005 #define STAR_StIOMaker
00006
00007
00008 #include "StMaker.h"
00009 #include "StTree.h"
00010 #include "StIOInterFace.h"
00011
00012
00013
00014
00015
00016 class StIOMaker : public StIOInterFace {
00017 public:
00018 StIOMaker(const char *name="StIO",const char *iomode="r", const char *ioFile="",const char *treeName="bfcTree");
00019 StIOMaker(const char *name, const char *iomode, StFileI *fileSet ,const char *treeName="bfcTree");
00020 virtual ~StIOMaker();
00021 virtual Int_t Init();
00022 virtual Int_t Make();
00023 Int_t MakeRead();
00024 Int_t MakeRead(const StUKey &);
00025 Int_t MakeWrite();
00026 Int_t Open(const char * = 0);
00027 Int_t OpenRead();
00028 Int_t OpenWrite();
00029 void Close(Option_t *opt=0);
00030 virtual Int_t Finish();
00031 virtual void Clear(Option_t *opt);
00032 virtual void SetFile(const char *file);
00033 void SetMaxEvent(Int_t mx=10000000){fMaxEvent=mx;fNumEvent=0;};
00034 void SetFileSet(StFileI *fileSet){fFileSet = fileSet;};
00035 virtual Int_t Skip(int nskip){fSkip=nskip;return 0;}
00036 virtual Int_t Skip();
00037 virtual void Rewind();
00038 virtual void NotifyMe(const char *about,const void *info);
00039
00040
00041 protected:
00042
00043 void Build(StFileI *fileSet,const char *ioFile,const char *treeName);
00044 StIOInterFace *Load();
00045
00046
00047
00048
00049
00050 StFileI *fFileSet;
00051 TString fNextFile;
00052 StIOInterFace *fCurrMk;
00053 StIOInterFace *fFmtMk[9];
00054 Int_t fMaxEvent;
00055 Int_t fNumEvent;
00056 Int_t fCase ;
00057 Int_t fSkip ;
00058
00059 virtual const char *GetCVS() const
00060 {static const char cvs[]="Tag $Name: $ $Id: StIOMaker.h,v 1.14 2003/09/10 19:47:20 perev Exp $ built "__DATE__" "__TIME__ ; return cvs;}
00061
00062 ClassDef(StIOMaker,0)
00063 };
00064
00065 #endif