/* $Id$ */
-/*
- Base Class
- Produces the data needed to calculate the quality assurance for Reconstruction
- All data must be mergeable objects.
- Y. Schutz CERN July 2007
-*/
+//
+// Base Class
+// Produces the data needed to calculate the quality assurance for Reconstruction
+// All data must be mergeable objects.
+// Y. Schutz CERN July 2007
+//
// --- ROOT system ---
-#include <TSystem.h>
#include <TFile.h>
-#include <TList.h>
#include <TTree.h>
-#include <TClonesArray.h>
// --- Standard library ---
// --- AliRoot header files ---
#include "AliLog.h"
#include "AliQADataMakerRec.h"
-#include "AliQAChecker.h"
#include "AliESDEvent.h"
#include "AliRawReader.h"
fDetectorDirName = GetName() ;
}
+//____________________________________________________________________________
+AliQADataMakerRec::~AliQADataMakerRec()
+{
+ //dtor: delete the TObjArray and thei content
+ if ( fESDsQAList ) {
+ if ( fESDsQAList->IsOwner() )
+ fESDsQAList->Delete() ;
+ delete fESDsQAList ;
+ }
+ if ( fRawsQAList ) {
+ if ( fRawsQAList->IsOwner() )
+ fRawsQAList->Delete() ;
+ delete fRawsQAList ;
+ }
+ if ( fRecPointsQAList ) {
+ if ( fRecPointsQAList->IsOwner() )
+ fRecPointsQAList->Delete() ;
+ delete fRecPointsQAList ;
+ }
+}
+
//__________________________________________________________________
AliQADataMakerRec& AliQADataMakerRec::operator = (const AliQADataMakerRec& qadm )
{
}
//____________________________________________________________________________
-void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX task)
+void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
{
// Finishes a cycle of QA data acquistion
list = fRecPointsQAList ;
else if ( task == AliQA::kESDS )
list = fESDsQAList ;
-
- EndOfDetectorCycle(task, list) ;
- TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
+
+ DefaultEndOfDetectorCycle(task) ;
+ EndOfDetectorCycle(task, list) ;
+ TDirectory * subDir = 0x0 ;
+ if (fDetectorDir)
+ subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if ( subDir ) {
subDir->cd() ;
- list->Write() ;
+ if (list)
+ list->Write() ;
}
+ //Finish() ;
}
//____________________________________________________________________________
-void AliQADataMakerRec::Exec(AliQA::TASKINDEX task, TObject * data)
+void AliQADataMakerRec::Exec(AliQA::TASKINDEX_t task, TObject * data)
{
// creates the quality assurance data for the various tasks (Hits, SDigits, Digits, ESDs)
}
//____________________________________________________________________________
-TObjArray * AliQADataMakerRec::Init(AliQA::TASKINDEX task, Int_t run, Int_t cycles)
+TObjArray * AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, Int_t run, Int_t cycles)
{
// general intialisation
SetCycle(cycles) ;
if ( task == AliQA::kRAWS ) {
- fRawsQAList = new TObjArray(100) ;
- InitRaws() ;
+ if (! fRawsQAList ) {
+ fRawsQAList = new TObjArray(100) ;
+ InitRaws() ;
+ }
rv = fRawsQAList ;
} else if ( task == AliQA::kRECPOINTS ) {
- fRecPointsQAList = new TObjArray(100) ;
- InitRecPoints() ;
+ if ( ! fRecPointsQAList ) {
+ fRecPointsQAList = new TObjArray(100) ;
+ InitRecPoints() ;
+ }
rv = fRecPointsQAList ;
} else if ( task == AliQA::kESDS ) {
- fESDsQAList = new TObjArray(100) ;
- InitESDs() ;
+ if ( ! fESDsQAList ) {
+ fESDsQAList = new TObjArray(100) ;
+ InitESDs() ;
+ }
rv = fESDsQAList ;
}
}
//____________________________________________________________________________
-void AliQADataMakerRec::Init(AliQA::TASKINDEX task, TObjArray * list, Int_t run, Int_t cycles)
+void AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles)
{
// Intialisation by passing the list of QA data booked elsewhere
}
//____________________________________________________________________________
-void AliQADataMakerRec::StartOfCycle(AliQA::TASKINDEX task, const Bool_t sameCycle)
+void AliQADataMakerRec::StartOfCycle(AliQA::TASKINDEX_t task, const Bool_t sameCycle)
{
// Finishes a cycle of QA data acquistion
-
if ( !sameCycle || fCurrentCycle == -1) {
ResetCycle() ;
if (fOutput)
list = fRecPointsQAList ;
else if ( task == AliQA::kESDS )
list = fESDsQAList ;
-
- TIter next(list) ;
- TH1 * h ;
- while ( (h = dynamic_cast<TH1 *>(next())) )
- h->Reset() ;
+
+// Should be the choice of detectors
+// TIter next(list) ;
+// TH1 * h ;
+// while ( (h = dynamic_cast<TH1 *>(next())) )
+// h->Reset() ;
StartOfDetectorCycle() ;
}