/* $Id$ */
-/*
- Base Class
- Produces the data needed to calculate the quality assurance.
- All data must be mergeable objects.
- Y. Schutz CERN July 2007
-*/
+//
+// Base Class
+// Produces the data needed to calculate the quality assurance.
+// All data must be mergeable objects.
+// Y. Schutz CERN July 2007
+//
// --- ROOT system ---
#include <TSystem.h>
}
}
+//____________________________________________________________________________
+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
+ 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)
if (!sameCycle) {
fCycleCounter = 0 ;
}
-}
\ No newline at end of file
+}