21 #include "TObjString.h"
44 ThrowError(66,0, Form(
"!!! ERROR: Cannot open source %s!!!", GetName()));
61 ThrowError(66,0, Form(
"!!! ERROR: Cannot open source %s!!!", GetName()));
91 if ((mask==0) || (strlen(mask)==0))
return 0;
93 TString dirname, basename(mask);
95 if (!basename.MaybeWildcard()) {
101 TList* lst =
new TList();
102 lst->SetOwner(kTRUE);
103 lst->Add(
new TObjString(basename));
107 Bool_t withdir = kFALSE;
108 Int_t slash = basename.Last(
'/');
111 if (slash<0) slash = basename.Last(
'\\');
115 dirname = basename(0, slash);
116 basename.Remove(0, slash+1);
119 dirname = gSystem->WorkingDirectory();
122 void *dir = gSystem->OpenDirectory(gSystem->ExpandPathName(dirname.Data()));
124 if (dir==0)
return 0;
128 TRegexp re(basename, kTRUE);
129 const char* file = 0;
130 while ((file = gSystem->GetDirEntry(dir)) != 0) {
131 if (!strcmp(file,
".") || !strcmp(file,
".."))
continue;
133 if ( (basename!=s) && s.Index(re) == kNPOS)
continue;
136 lst->SetOwner(kTRUE);
139 lst->Add(
new TObjString(dirname +
"/" + file));
141 lst->Add(
new TObjString(file));
143 gSystem->FreeDirectory(dir);
145 if (lst) lst->Sort();
166 TIter iter(
fxFile->GetListOfKeys());
167 while ( (kee=dynamic_cast<TKey*>(iter())) !=0 ) {
168 fxTree =
dynamic_cast<TTree*
>(kee->ReadObj());
172 ThrowError(77,0,
"!!! ERROR: Tree not found !!!");
202 if(dest==0)
ThrowError(0,22,
"!!! ERROR BuildEvent: no destination event!!!");
void ThrowEOF(Int_t creastat, Int_t errstat, const char *message,...)
virtual ~TGo4FileSource()
void SetCreateStatus(Int_t status)
TGo4EventElement * fxTopEvent
void ThrowError(Int_t creastat, Int_t errstat, const char *message,...)
TString fxCurrentFileName
Bool_t CloseCurrentFile()
virtual Bool_t BuildEvent(TGo4EventElement *dest)
virtual void synchronizeWithTree(TTree *tree, TGo4EventElement **var_ptr=0)
static TList * ProducesFilesList(const char *mask)
static const char * fgcFILESUF
static void Info(const char *text,...)