]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMaker.cxx
Possibility to fix some of the parameters. New method to get the number of free param...
[u/mrichter/AliRoot.git] / STEER / AliQADataMaker.cxx
index 56ec5800efce74bd2ae14af837867db9b4a00dc6..3b375b4e2e3cf8646976498b384ad7f8ac9b538c 100644 (file)
@@ -86,24 +86,43 @@ Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list)
        }
 }
 
+//____________________________________________________________________________
+void AliQADataMaker::DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task) 
+{
+       // this method must be oveloaded by detectors
+       // sets the QA result to Fatal
+       AliQA::Instance(AliQA::GetDetIndex(GetName())) ;
+       AliQA * qa = AliQA::Instance(task) ;
+       qa->Set(AliQA::kFATAL) ; 
+       AliQA::GetQAResultFile()->cd() ; 
+       qa->Write(AliQA::GetQAName(), kWriteDelete) ;   
+       AliQA::GetQAResultFile()->Close() ; 
+}
+
 //____________________________________________________________________________ 
 void AliQADataMaker::Finish() const 
 { 
-  // write to the output File
-  fOutput->Close() ; 
+       // write to the output File
+       if (fOutput) 
+               fOutput->Close() ; 
 } 
 
 //____________________________________________________________________________ 
 TObject * AliQADataMaker::GetData(TObjArray * list, const Int_t index)  
 { 
        // Returns the QA object at index. Limit is 100. 
-       if ( index > 10000 ) {
-               AliError("Max number of authorized QA objects is 10000") ; 
-               return NULL; 
+       if (list) {
+               if ( index > 10000 ) {
+                       AliError("Max number of authorized QA objects is 10000") ; 
+                       return NULL ; 
+               } else {
+                       return list->At(index) ; 
+               }       
        } else {
-               return list->At(index) ; 
+               AliError("Data list is NULL !!") ; 
+               return NULL ;           
        }
-} 
+}
 
 //____________________________________________________________________________
 void AliQADataMaker::Reset(const Bool_t sameCycle)