1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // Checks the quality assurance for ACORDE.
17 // Default implementation
19 // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> (FCFM-BUAP)
20 // Luciano Diaz Gonzalez <luciano.diaz@nucleares.unam.mx> (ICN-UNAM)
21 // Arturo Fernandez <afernan@mail.cern.ch> (FCFM-BUAP)
24 // --- ROOT system ---
28 #include <TIterator.h>
32 // --- Standard library ---
34 // --- AliRoot header files ---
37 #include "AliQAChecker.h"
38 #include "AliACORDEQAChecker.h"
40 ClassImp(AliACORDEQAChecker)
42 //____________________________________________________________________________
43 Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/)
45 Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
46 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
51 //__________________________________________________________________
52 Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
56 // Super-basic check on the QA histograms on the input list:
57 // look whether they are empty!
58 Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
59 Int_t * count = new Int_t[AliRecoParam::kNSpecies] ;
60 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
65 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
66 if (list[specie]->GetEntries() == 0){
67 test[specie] = 1. ; // nothing to check
70 TIter next(list[specie]) ;
72 while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
75 if(hdata->GetEntries()>0)rv=1;
76 AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
81 AliError("Data type cannot be processed") ;
84 if (count[specie] != 0) {
85 if (test[specie]==0) {
86 AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
87 test[specie] = 0.5; //upper limit value to set kWARNING flag for a task
90 test[specie] /= count[specie] ;
94 AliInfo(Form("Test Result = %f", test[specie])) ;