]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSQASSDChecker.cxx
Added protection in case gGeoManager is a null pointer
[u/mrichter/AliRoot.git] / ITS / AliITSQASSDChecker.cxx
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 "AliITSQASSDChecker.h"
28
29 ClassImp(AliITSQASSDChecker)
30
31 //__________________________________________________________________
32 AliITSQASSDChecker& AliITSQASSDChecker::operator = (const AliITSQASSDChecker& qac ) 
33 {
34   // Equal operator.
35   this->~AliITSQASSDChecker();
36   new(this) AliITSQASSDChecker(qac);
37   return *this;
38 }
39
40 //__________________________________________________________________
41 const Double_t AliITSQASSDChecker::Check() 
42 {
43 /*
44   TObjArray * list
45   Double_t test = 0.0  ;
46   Int_t count = 0 ;
47
48   if (list->GetEntries() == 0){
49     test = 1. ; // nothing to check
50   }
51   else {
52     TIter next(list) ;
53     TH1 * hdata ;
54     count = 0 ;
55     while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
56       if (hdata) {
57         Double_t rv = 0.;
58         if(hdata->GetEntries()>0)rv=1;
59         AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
60         count++ ;
61         test += rv ;
62       }
63       else{
64         AliError("Data type cannot be processed") ;
65       }
66
67     }
68     if (count != 0) {
69       if (test==0) {
70         AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
71         test = 0.5;  //upper limit value to set kWARNING flag for a task
72       }
73       else {
74         test /= count ;
75       }
76     }
77   }
78
79   AliInfo(Form("Test Result = %f", test)) ;
80   return test ;
81 */
82   return 0.;    
83 }
84
85