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 **************************************************************************/
19 /////////////////////////////////////////////////////////////////////
21 // Checks the quality assurance. //
22 // By analysis of the histograms & comparing with reference data //
25 /////////////////////////////////////////////////////////////////////
28 #include "TObjArray.h"
31 //#include "AliQAv1.h"
32 //#include "AliQAChecker.h"
34 #include "AliTOFQAChecker.h"
36 ClassImp(AliTOFQAChecker)
38 //____________________________________________________________________________
39 Double_t * AliTOFQAChecker::Check(AliQAv1::ALITASK_t /*index*/,
41 const AliDetectorRecoParam * /*recoParam*/)
43 // Super-basic check on the QA histograms on the input list:
44 // look whether they are empty!
46 Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
47 Int_t count[AliRecoParam::kNSpecies] = { 0 };
49 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
50 if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) )
53 if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
55 if (list[specie]->GetEntries() == 0){
56 test[specie] = 0.0 ; // nothing to check
59 TIter next(list[specie]) ;
62 while ( (hdata = static_cast<TH1 *>(next())) ) {
63 if (hdata && hdata->InheritsFrom("TH1")) {
65 if(hdata->GetEntries()>0)rv=1;
66 AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv)) ;
71 AliError("Data type cannot be processed") ;
74 if (count[specie] != 0) {
75 if (test[specie]==0) {
76 AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
77 test[specie] = 0.5; //upper limit value to set kWARNING flag for a task
80 test[specie] /= count[specie] ;
82 AliDebug(AliQAv1::GetQADebugLevel(), Form("Test Result = %f", test[specie])) ;