]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSQAChecker.cxx
In Open() and GotoEvent() try the ESD operations first, fallback to run-loader.
[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{
8b51d296 49 // Standard constructor
5dfa9b71 50 fkOnline = kMode; fDet = subDet; fLDC = ldc;
51 if(fDet == 0 || fDet == 1) {
52 AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
53 }
54 if(fDet == 0 || fDet == 2) {
55 AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
56 }
57 if(fDet == 0 || fDet == 3) {
58 AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
59 }
60
61}
62
8b51d296 63//____________________________________________________________________________
64AliITSQAChecker::AliITSQAChecker(const AliITSQAChecker& qac):
65AliQACheckerBase(qac.GetName(), qac.GetTitle()),
66fkOnline(qac.fkOnline),
67fDet(qac.fDet),
68fLDC(qac.fLDC),
69fSPDOffset(qac.fSPDOffset),
70fSDDOffset(qac.fSDDOffset),
71fSSDOffset(qac.fSSDOffset),
72fSPDChecker(0),
73fSDDChecker(0),
74fSSDChecker(0) {
75 // copy constructor
76 AliError("Copy should not be used with this class\n");
77}
78//____________________________________________________________________________
79AliITSQAChecker& AliITSQAChecker::operator=(const AliITSQAChecker& qac){
80 // assignment operator
81 this->~AliITSQAChecker();
82 new(this)AliITSQAChecker(qac);
83 return *this;
84}
85
5dfa9b71 86//____________________________________________________________________________
6b374954 87const Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
5dfa9b71 88{
3647765c 89
5dfa9b71 90 // Super-basic check on the QA histograms on the input list:
91 // look whether they are empty!
c71529b0 92 Double_t spdCheck, sddCheck, ssdCheck;
e7e85671 93 Double_t retval = 1.;
5dfa9b71 94 if(fDet == 0 || fDet == 1) {
95 AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
3647765c 96 if(!fSPDChecker) {
97 fSPDChecker = new AliITSQASPDChecker();
98 }
99 fSPDChecker->SetTaskOffset(fSPDOffset);
100 spdCheck = fSPDChecker->Check(index, list);
e7e85671 101 if(spdCheck<retval)retval = spdCheck;
5dfa9b71 102 }
103 if(fDet == 0 || fDet == 2) {
104 AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
3647765c 105 if(!fSDDChecker) {
106 fSDDChecker = new AliITSQASDDChecker();
107 }
108 fSDDChecker->SetTaskOffset(fSDDOffset);
109 sddCheck = fSDDChecker->Check(index, list);
e7e85671 110 if(sddCheck<retval)retval = sddCheck;
3647765c 111 }
5dfa9b71 112 if(fDet == 0 || fDet == 3) {
113 AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
3647765c 114 if(!fSSDChecker) {
115 fSSDChecker = new AliITSQASSDChecker();
116 AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));
117 }
118 fSSDChecker->SetTaskOffset(fSSDOffset);
119 ssdCheck = fSSDChecker->Check(index, list);
e7e85671 120 if(ssdCheck<retval)retval = ssdCheck; }
5dfa9b71 121 // here merging part for common ITS QA result
c71529b0 122 //
3647765c 123 AliDebug(1,Form("AliITSQAChecker::QAChecker returned value is %f \n",retval));
c71529b0 124 return retval;
3647765c 125
5dfa9b71 126}
127
128
c71529b0 129//____________________________________________________________________________
130void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDOffset)
131{
132 //Setting the 3 offsets for each task called
133 fSPDOffset = SPDOffset;
134 fSDDOffset = SDDOffset;
135 fSSDOffset = SSDOffset;
136}