]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - test/QA/rawqa.C
access to alien files
[u/mrichter/AliRoot.git] / test / QA / rawqa.C
index 52e35ed29ca66724635497a15d17a153a678da8b..1efdc4605acc43312b64ee431ed38f6c4554d5b2 100644 (file)
@@ -51,22 +51,24 @@ void rawqa(const Int_t runNumber, Int_t maxFiles = 10, const char* year = "08")
        TGridResult * result = 0x0 ; 
        Bool_t local = kFALSE ; 
        if (grid) { // get the list of files from AliEn directly 
-         TString baseDir; 
-         baseDir.Form("/alice/data/20%s/",year);
-         result = grid->Query(baseDir, pattern) ;  
+               TString collectionFile(pattern) ; 
+               collectionFile.ReplaceAll("*.root", ".xml") ; 
+               if ( gSystem->AccessPathName(collectionFile) == 0 ) { // get the list of files from an a-priori created collection file
+                       TAlienCollection collection(collectionFile.Data(), maxFiles) ; 
+                       result = collection.GetGridResult("", 0, 0); 
+               } else { 
+                       TString baseDir; 
+                       baseDir.Form("/alice/data/20%s/",year);
+                       result = grid->Query(baseDir, pattern) ;  
+               }
        } else {
-         TString collectionFile(pattern) ; 
-         collectionFile.Append(".xml") ; 
-         if ( gSystem->AccessPathName(collectionFile) == 0 ) { // get the list of files from an a-priori created collection file
-           TAlienCollection collection(collectionFile.Data(), maxFiles) ; 
-           result = collection.GetGridResult("", 0, 0); 
-         } else { // get the list of files from the local current directory 
+          // get the list of files from the local current directory 
            local = kTRUE ; 
            char line[100] ; 
            sprintf(line, ".! ls %s*.root > tempo.txt", pattern.Data()) ; 
            gROOT->ProcessLine(line) ;
-         }
        }
+       
        AliLog::Flush();
        ifstream in ; 
        if (local)