AliRoot Core  edcc906 (edcc906)
AliCorrQAChecker.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 
17 /* $Id: $ */
18 
19 /*
20  Checks the quality assurance.
21  By comparing with reference data
22  Y. Schutz CERN July 2007
23 */
24 
25 // --- ROOT system ---
26 #include <TClass.h>
27 #include <TH1F.h>
28 #include <TH1I.h>
29 #include <TIterator.h>
30 #include <TKey.h>
31 #include <TFile.h>
32 #include <TNtupleD.h>
33 
34 // --- Standard library ---
35 
36 // --- AliRoot header files ---
37 #include "AliLog.h"
38 #include "AliQAv1.h"
39 #include "AliQAChecker.h"
40 #include "AliCorrQAChecker.h"
41 
42 ClassImp(AliCorrQAChecker)
43 
44 //__________________________________________________________________
45 Double_t * AliCorrQAChecker::CheckN(AliQAv1::ALITASK_t index, TNtupleD ** nData, AliDetectorRecoParam * /*recoParam*/)
46 {
47  // check the QA of correlated data stored in a ntuple
48 
49  Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
50  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
51  test[specie] = 0. ;
52 
53  if ( index != AliQAv1::kRAW ) {
54  AliWarning("Checker not implemented") ;
55  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
56  test[specie] = 1. ;
57  return test ;
58  }
59 // if (!fRefSubDir) {
60 // test = 1. ; // no reference data
61 // } else {
62  if ( ! nData ) {
63  AliError(Form("nRawCorr not found in %s", fDataSubDir->GetName())) ;
64  } else {
65  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
66  if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
67  continue ;
68  TObjArray * bList = nData[specie]->GetListOfBranches() ;
69  for (Int_t b = 0 ; b < bList->GetEntries() ; b++) {
70  AliInfo(Form("Ntuple %s parameter name %d : %s", nData[specie]->GetName(), b, bList->At(b)->GetName())) ;
71  }
72  }
73  }
74  // }
75  return test ;
76 }
77 //__________________________________________________________________
79 {
80  // special run for TNtupleD
81  AliDebug(AliQAv1::GetQADebugLevel(), Form("Processing %s", AliQAv1::GetAliTaskName(tsk))) ;
82 
83  Double_t * rv = NULL ;
84  rv = CheckN(tsk, nt, recoParam) ;
85  SetQA(tsk, rv) ;
86 
87  AliDebug(AliQAv1::GetQADebugLevel(), Form("Test result of %s", AliQAv1::GetAliTaskName(tsk))) ;
88 
89  if (rv)
90  delete [] rv ;
91  Finish() ;
92 }
93 
TBrowser b
Definition: RunAnaESD.C:12
const Int_t nt
Definition: pdfIO.C:2
#define TObjArray
void Finish() const
ALITASK_t
Definition: AliQAv1.h:26
#define AliWarning(message)
Definition: AliLog.h:541
#define AliInfo(message)
Definition: AliLog.h:484
static const char * GetAliTaskName(ALITASK_t tsk)
Definition: AliQAv1.cxx:292
virtual void SetQA(AliQAv1::ALITASK_t index, Double_t *value) const
void test()
Definition: interpolTest.C:100
#define AliDebug(logLevel, message)
Definition: AliLog.h:300
Double_t * CheckN(AliQAv1::ALITASK_t index, TNtupleD **nData, AliDetectorRecoParam *recoParam)
#define AliError(message)
Definition: AliLog.h:591
virtual void Run(AliQAv1::ALITASK_t, TNtupleD **, AliDetectorRecoParam *)
static Int_t GetQADebugLevel()
Definition: AliQAv1.h:72
static AliQAv1 * Instance()
Definition: AliQAv1.cxx:585