11 #include "St_ObjectSet.h"
12 #include "TDataSetIter.h"
22 static Int_t Write (TFile *file,
const StUKey &ukey, TObject *obj);
23 static TObject *Read (TFile *file,
const char *name);
24 static TObject *Read (TFile *file,
const StUKey &ukey);
25 static Int_t GetNextKey(TFile *file,
StUKey &ukey, ULong_t &handle);
26 static TObject *ReadNext (TFile *file,
StUKey &ukey, ULong_t &handle);
27 static TString RFIOName (
const char *name);
28 static TFile *Open (
const char *name, Option_t *option=
"",
const char *title=
"",Int_t compress=1);
29 static Int_t IfExi(
const char *file);
30 static void SetDebug(Int_t dblev=1){fgDebug=dblev;}
42 virtual void SetIOMode(Option_t *iomode=
"0");
43 virtual Option_t *GetIOMode();
44 virtual void SetOption(Option_t *opt);
45 virtual Option_t *GetOption()
const {
return fOption;};
46 virtual Bool_t IsOption(Option_t *opt)
const
47 {
return fOption.Contains(opt,TString::kIgnoreCase);};
48 virtual Int_t UpdateFile(
const char *file);
49 virtual const char *GetFile();
50 virtual Int_t SetFile(
const char *file,
const char *iomode=0,
int insist=0);
51 virtual Int_t SetTFile(TFile *tfile);
52 virtual TFile *GetTFile(){
return fTFile;};
53 virtual void SetName(
const char *name){fUKey=name;TDataSet::SetName(name);};
54 virtual void SetUKey(Int_t ukey){fUKey=ukey;};
55 virtual StUKey GetUKey()
const {
return fUKey;};
56 virtual Int_t GetNEvents()
const {
return fNEvents;};
57 virtual Int_t GetEvent(Int_t mode);
58 virtual Int_t ReadEvent (
const StUKey &ukey);
59 virtual Int_t NextEvent (
StUKey &ukey);
60 virtual Int_t NextEvent ();
61 virtual Int_t WriteEvent(
const StUKey &ukey);
62 virtual void Clear(
const char *opt=0);
63 virtual void Close(
const char *opt=0);
65 virtual Int_t GetDebug(){
return fDebug;};
66 virtual void SetDebug(
int dbl=1){
fDebug=dbl;};
69 virtual void OpenTFile();
71 void SetParAll(TList *savList);
86 StTree(
const char *name=
"");
89 virtual void SetIOMode (Option_t *iomode=
"0");
90 virtual Int_t ReadEvent (
const StUKey &ukey);
91 virtual Int_t NextEvent (
StUKey &ukey);
92 virtual Int_t NextEvent ();
94 Int_t Skip(
int nskip);
95 virtual Int_t WriteEvent(
const StUKey &ukey);
96 virtual void Close(
const char *opt=0);
98 virtual void Clear(Option_t *opt=
"");
99 virtual Int_t SetFile(
const char *file,
const char *iomode=0,
int insist=0);
100 virtual void SetBaseName(
const char* basename,
const char* dirname=0);
101 virtual const char *GetBaseName()
102 {
return (fBaseName.IsNull()) ? 0:(
const char*)fBaseName;};
103 static StTree *GetTree(TFile *file,
const char *treeName);
104 virtual Int_t UpdateFile(
const char *file);
119 virtual void Browse(TBrowser *b);
120 virtual Bool_t IsFolder()
const {
return kTRUE; }
128 StFile(
const char** fileList=0);
131 virtual void ls(Option_t *opt=
"") ;
132 virtual void ls(Option_t *opt=
"")
const{ ((
StFile*)
this)->ls(opt);}
133 virtual Int_t AddFile(
const char *file,
const char *opt=0);
134 virtual Int_t AddFile(
const char **fileList);
135 virtual Int_t AddWild(
const char *file,
const char *opt=0);
136 virtual Int_t AddEvent(UInt_t r,UInt_t e=0);
137 virtual Int_t GetNBundles();
138 virtual Int_t GetNFiles();
139 virtual Int_t GetBundleSize(){
return 1;};
140 virtual StUKey GetNextEvent();
141 virtual Int_t GetNextEvent(UInt_t *NextEventNumber){
return StFileI::GetNextEvent(NextEventNumber);}
143 virtual const char *GetFileName(Int_t idx=-1);
144 virtual const char *GetCompName(Int_t idx=0);
145 virtual const char *GetFormat(Int_t idx=0);
146 virtual Int_t GetNextBundle();
147 virtual void Rewind(){fIter = -1;
delete fKeyIter; fKeyIter =0;}
150 void lsFull(Option_t *opt=
"") ;
152 const char *GetAttr(
TDataSet *ds,
const char *att);
TString fFile
1=ReadOnly; 2=WriteOnly; 1+2=Update;0=do nothing
char fIOMode
Current RunEvent number.
ULong_t fHandle
debug level
Int_t fDebug
Opened TFile.