1 /**************************************************************************
2 * Copyright(c) 2007-2009, 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 **************************************************************************/
18 // *****************************************
19 // Checks the quality assurance
20 // by comparing with reference data
21 // W.Ferrarese P.Cerello Mag 2008
24 // --- ROOT system ---
26 #include <Riostream.h>
28 // --- AliRoot header files ---
29 #include "AliITSQAChecker.h"
30 #include "AliITSQASPDChecker.h"
31 #include "AliITSQASDDChecker.h"
32 #include "AliITSQASSDChecker.h"
34 ClassImp(AliITSQAChecker)
36 //____________________________________________________________________________
37 AliITSQAChecker::AliITSQAChecker(Bool_t kMode, Short_t subDet, Short_t ldc) :
38 AliQACheckerBase("ITS","SDD Quality Assurance Checker"),
45 fSPDChecker(0), // SPD Checker
46 fSDDChecker(0), // SDD Checker
47 fSSDChecker(0) // SSD Checker
49 // Standard constructor
50 fkOnline = kMode; fDet = subDet; fLDC = ldc;
51 if(fDet == 0 || fDet == 1) {
52 AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
54 if(fDet == 0 || fDet == 2) {
55 AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
57 if(fDet == 0 || fDet == 3) {
58 AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
63 //____________________________________________________________________________
64 AliITSQAChecker::AliITSQAChecker(const AliITSQAChecker& qac):
65 AliQACheckerBase(qac.GetName(), qac.GetTitle()),
66 fkOnline(qac.fkOnline),
69 fSPDOffset(qac.fSPDOffset),
70 fSDDOffset(qac.fSDDOffset),
71 fSSDOffset(qac.fSSDOffset),
76 AliError("Copy should not be used with this class\n");
78 //____________________________________________________________________________
79 AliITSQAChecker& AliITSQAChecker::operator=(const AliITSQAChecker& qac){
80 // assignment operator
81 this->~AliITSQAChecker();
82 new(this)AliITSQAChecker(qac);
86 //____________________________________________________________________________
87 const Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
90 // Super-basic check on the QA histograms on the input list:
91 // look whether they are empty!
92 Double_t spdCheck, sddCheck, ssdCheck;
94 if(fDet == 0 || fDet == 1) {
95 AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
97 fSPDChecker = new AliITSQASPDChecker();
99 fSPDChecker->SetTaskOffset(fSPDOffset);
100 spdCheck = fSPDChecker->Check(index, list);
101 if(spdCheck<retval)retval = spdCheck;
103 if(fDet == 0 || fDet == 2) {
104 AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
106 fSDDChecker = new AliITSQASDDChecker();
108 fSDDChecker->SetTaskOffset(fSDDOffset);
109 sddCheck = fSDDChecker->Check(index, list);
110 if(sddCheck<retval)retval = sddCheck;
112 if(fDet == 0 || fDet == 3) {
113 AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
115 fSSDChecker = new AliITSQASSDChecker();
116 AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));
118 fSSDChecker->SetTaskOffset(fSSDOffset);
119 ssdCheck = fSSDChecker->Check(index, list);
120 if(ssdCheck<retval)retval = ssdCheck; }
121 // here merging part for common ITS QA result
123 AliDebug(1,Form("AliITSQAChecker::QAChecker returned value is %f \n",retval));
129 //____________________________________________________________________________
130 void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDOffset)
132 //Setting the 3 offsets for each task called
133 fSPDOffset = SPDOffset;
134 fSDDOffset = SDDOffset;
135 fSSDOffset = SSDOffset;