Update for changes in other parts of the code
[u/mrichter/AliRoot.git] / ITS / AliITSQASDDChecker.cxx
CommitLineData
5b716935 1/**************************************************************************
2 * Copyright(c) 2007-2009, 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/* $Id$ */
17
18// *****************************************
19// Checks the quality assurance
20// by comparing with reference data
21// P. Cerello Apr 2008
22// INFN Torino
23
24// --- ROOT system ---
25
26// --- AliRoot header files ---
27#include "AliITSQASDDChecker.h"
c71529b0 28#include "AliLog.h"
5b716935 29
30ClassImp(AliITSQASDDChecker)
31
32//__________________________________________________________________
33AliITSQASDDChecker& AliITSQASDDChecker::operator = (const AliITSQASDDChecker& qac )
34{
35 // Equal operator.
36 this->~AliITSQASDDChecker();
37 new(this) AliITSQASDDChecker(qac);
38 return *this;
39}
40
41//__________________________________________________________________
c71529b0 42const Double_t AliITSQASDDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * /*list*/, Int_t SubDetOffset)
43{
44 AliDebug(1,Form("AliITSQASDDChecker called with offset: %d\n", SubDetOffset));
45 /*
5b716935 46 TObjArray * list
47 Double_t test = 0.0 ;
48 Int_t count = 0 ;
49
50 if (list->GetEntries() == 0){
51 test = 1. ; // nothing to check
52 }
53 else {
54 TIter next(list) ;
55 TH1 * hdata ;
56 count = 0 ;
57 while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
58 if (hdata) {
59 Double_t rv = 0.;
60 if(hdata->GetEntries()>0)rv=1;
61 AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
62 count++ ;
63 test += rv ;
64 }
65 else{
66 AliError("Data type cannot be processed") ;
67 }
68
69 }
70 if (count != 0) {
71 if (test==0) {
72 AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
73 test = 0.5; //upper limit value to set kWARNING flag for a task
74 }
75 else {
76 test /= count ;
77 }
78 }
79 }
80
81 AliInfo(Form("Test Result = %f", test)) ;
82 return test ;
c71529b0 83 */
5b716935 84 return 0.;
85}
86