]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSQAChecker.cxx
Fix bug due to shadowed variables
[u/mrichter/AliRoot.git] / ITS / AliITSQAChecker.cxx
CommitLineData
1507771f 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// W. Ferrarese Oct 2007
22// INFN Torino
23
24// --- ROOT system ---
5dfa9b71 25#include "TH1.h"
1507771f 26
27// --- AliRoot header files ---
28#include "AliITSQAChecker.h"
5dfa9b71 29#include "AliITSQASPDChecker.h"
30#include "AliITSQASDDChecker.h"
31#include "AliITSQASSDChecker.h"
1507771f 32
33ClassImp(AliITSQAChecker)
34
5dfa9b71 35//____________________________________________________________________________
36AliITSQAChecker::AliITSQAChecker(Bool_t kMode, Short_t subDet, Short_t ldc) :
c71529b0 37AliQACheckerBase("ITS","SDD Quality Assurance Checker"),
38fkOnline(0),
39fDet(0),
40fLDC(0),
41fSPDOffset(0),
42fSDDOffset(0),
43fSSDOffset(0),
44fSPDChecker(0), // SPD Checker
45fSDDChecker(0), // SDD Checker
46fSSDChecker(0) // SSD Checker
5dfa9b71 47{
48 fkOnline = kMode; fDet = subDet; fLDC = ldc;
49 if(fDet == 0 || fDet == 1) {
50 AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
51 }
52 if(fDet == 0 || fDet == 2) {
53 AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
54 }
55 if(fDet == 0 || fDet == 3) {
56 AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
57 }
58
59}
60
1507771f 61//__________________________________________________________________
62AliITSQAChecker& AliITSQAChecker::operator = (const AliITSQAChecker& qac )
63{
64 // Equal operator.
65 this->~AliITSQAChecker();
66 new(this) AliITSQAChecker(qac);
67 return *this;
68}
5dfa9b71 69
70//____________________________________________________________________________
6b374954 71const Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
5dfa9b71 72{
73
74 // Super-basic check on the QA histograms on the input list:
75 // look whether they are empty!
c71529b0 76 Double_t spdCheck, sddCheck, ssdCheck;
77 Double_t retval = 0.;
5dfa9b71 78 if(fDet == 0 || fDet == 1) {
79 AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
c71529b0 80 if(!fSPDChecker) fSPDChecker = new AliITSQASPDChecker();
81 spdCheck = fSPDChecker->Check(index, list, fSPDOffset);
82 if(spdCheck>retval)retval = spdCheck;
5dfa9b71 83 }
84 if(fDet == 0 || fDet == 2) {
85 AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
c71529b0 86 if(!fSDDChecker) fSDDChecker = new AliITSQASDDChecker();
87 sddCheck = fSDDChecker->Check(index, list, fSDDOffset);
88 if(sddCheck>retval)retval = sddCheck;
5dfa9b71 89 }
90 if(fDet == 0 || fDet == 3) {
91 AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
c71529b0 92 if(!fSSDChecker) fSSDChecker = new AliITSQASSDChecker();
93 //AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));
94 ssdCheck = fSSDChecker->Check(index, list, fSSDOffset);
95 if(ssdCheck>retval)retval = ssdCheck;
5dfa9b71 96 }
97 // here merging part for common ITS QA result
c71529b0 98 //
99 return retval;
5dfa9b71 100}
101
102
c71529b0 103//____________________________________________________________________________
104void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDOffset)
105{
106 //Setting the 3 offsets for each task called
107 fSPDOffset = SPDOffset;
108 fSDDOffset = SDDOffset;
109 fSSDOffset = SSDOffset;
110}