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