/[PAMELA software]/PamelaLevel2/src/PamLevel2.cpp
ViewVC logotype

Diff of /PamelaLevel2/src/PamLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by mocchiut, Tue Jan 16 13:00:26 2007 UTC revision 1.16 by pam-fi, Tue Jan 16 13:19:58 2007 UTC
# Line 915  TList*  PamLevel2::GetListOfLevel2Files( Line 915  TList*  PamLevel2::GetListOfLevel2Files(
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;
# Line 948  TList*  PamLevel2::GetListOfLevel2Files( Line 950  TList*  PamLevel2::GetListOfLevel2Files(
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    
# Line 976  TList*  PamLevel2::GetListOfLevel2Files( Line 979  TList*  PamLevel2::GetListOfLevel2Files(
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          }          }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.23