]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - test/QA/rawqa.C
geometry for 2008 run
[u/mrichter/AliRoot.git] / test / QA / rawqa.C
index 52e35ed29ca66724635497a15d17a153a678da8b..065131d17e7ae2a1f1bc0f773a1bacfdc4c81ace 100644 (file)
 #include "AliRawReader.h"
 #include "AliRawReaderRoot.h"
 #include "AliTRDrawStreamBase.h"
+#include "AliGeomManager.h"
 
 TString ClassName() { return "rawqa" ; } 
 
 //________________________________qa______________________________________
 void rawqa(const Int_t runNumber, Int_t maxFiles = 10, const char* year = "08") 
 {      
-       char kDefaultOCDBStorage[120] ; 
-       sprintf(kDefaultOCDBStorage, "alien://folder=/alice/data/20%s/LHC%sa/OCDB/", year, year) ; 
-       AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), year)) ;  
-       AliQA::SetQARefDataDirName("Data") ; //Data, Pedestals, BlackEvent, ..... 
+       char * kDefaultOCDBStorage = Form("alien://folder=/alice/data/20%s/LHC%sc/OCDB/", year, year) ; 
+       //AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), year)) ;  
+       AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
+       AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
        
        UInt_t maxEvents = 99999 ;
        if ( maxFiles < 0 ) {
@@ -51,36 +52,40 @@ 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) 
                in.open("tempo.txt", ifstream::in) ; 
 
-       AliQADataMakerSteer qas ; 
+       AliQADataMakerSteer qas("rec") ; 
        TString detectors  = ""; 
        TString detectorsW = ""; 
        UShort_t file = 0 ; 
        UShort_t filesProcessed = 0 ; 
        UShort_t eventsProcessed = 0 ; 
        AliCDBManager* man = AliCDBManager::Instance();
+       man->SetDefaultStorage(kDefaultOCDBStorage) ;  
+       man->SetRun(runNumber) ; 
+       AliGeomManager::LoadGeometry();
        for ( file = 0 ; file < maxFiles ; file++) {
-               man->SetDefaultStorage(kDefaultOCDBStorage) ;  
                if ( qas.GetCurrentEvent() >= maxEvents) 
                        break ;