| 915 |
TList *contents = new TList; // create output list |
TList *contents = new TList; // create output list |
| 916 |
contents->SetOwner(); |
contents->SetOwner(); |
| 917 |
|
|
| 918 |
char *fullpath; |
// char *fullpath; |
| 919 |
|
const char *fullpath; |
| 920 |
|
|
| 921 |
// if no input file list is given: |
// if no input file list is given: |
| 922 |
if ( flisttxt != "" ){ |
if ( flisttxt != "" ){ |
| 923 |
|
|
| 924 |
if( !gSystem->IsFileInIncludePath(flisttxt,&fullpath) ){ |
// if( !gSystem->IsFileInIncludePath(flisttxt,&fullpath) ){ |
| 925 |
|
if( !(fullpath = gSystem->FindFile("./",flisttxt)) ){ |
| 926 |
cout <<"File "<<flisttxt<<" not found"<<endl; |
cout <<"File "<<flisttxt<<" not found"<<endl; |
| 927 |
return 0; |
return 0; |
| 928 |
} |
} |
| 929 |
// flisttxt = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
// flisttxt = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
| 930 |
flisttxt = fullpath; |
flisttxt = fullpath; |
| 931 |
|
|
| 932 |
if( !gSystem->ChangeDirectory(ddir) ){ |
if( !gSystem->ChangeDirectory(ddir) ){ |
| 933 |
cout << "Cannot change directory : "<<ddir<<endl; |
cout << "Cannot change directory : "<<ddir<<endl; |
| 934 |
return 0; |
return 0; |
| 950 |
} |
} |
| 951 |
if(file.Contains("#"))file = file(0,file.First("#")); |
if(file.Contains("#"))file = file(0,file.First("#")); |
| 952 |
// cout <<"(2) " << file << endl; |
// cout <<"(2) " << file << endl; |
| 953 |
if( gSystem->IsFileInIncludePath(file,&fullpath) ){ |
// if( gSystem->IsFileInIncludePath(file,&fullpath) ){ |
| 954 |
|
if( (fullpath = gSystem->FindFile(ddir,file)) ){ |
| 955 |
|
|
| 956 |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath)));// add file to the list |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath)));// add file to the list |
| 957 |
|
|
| 979 |
while ( (questo = (TSystemFile*) next()) ) { |
while ( (questo = (TSystemFile*) next()) ) { |
| 980 |
TString name = questo-> GetName(); |
TString name = questo-> GetName(); |
| 981 |
if( name.EndsWith(".root") ){ |
if( name.EndsWith(".root") ){ |
| 982 |
char *fullpath; |
const char *fullpath = gSystem->FindFile(ddir,name); |
| 983 |
gSystem->IsFileInIncludePath(name,&fullpath); |
// char *fullpath; |
| 984 |
|
// gSystem->IsFileInIncludePath(name,&fullpath); |
| 985 |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath))); |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath))); |
| 986 |
}; |
}; |
| 987 |
} |
} |