]>
Commit | Line | Data |
---|---|---|
04236e67 | 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 | // contained in a DB | |
22 | // ------------------------------------------------------------- | |
8c823e5a | 23 | // W. Ferrarese + P. Cerello Feb 2008 |
04236e67 | 24 | // INFN Torino |
25 | ||
26 | // --- ROOT system --- | |
04236e67 | 27 | #include <TTree.h> |
04236e67 | 28 | // --- Standard library --- |
29 | ||
30 | // --- AliRoot header files --- | |
31 | #include "AliITSQADataMakerRec.h" | |
8c823e5a | 32 | #include "AliITSQASPDDataMakerRec.h" |
33 | #include "AliITSQASDDDataMakerRec.h" | |
34 | #include "AliITSQASSDDataMakerRec.h" | |
04236e67 | 35 | #include "AliLog.h" |
36 | #include "AliQA.h" | |
37 | #include "AliQAChecker.h" | |
38 | #include "AliRawReader.h" | |
04236e67 | 39 | |
40 | ClassImp(AliITSQADataMakerRec) | |
41 | ||
42 | //____________________________________________________________________________ | |
8c823e5a | 43 | AliITSQADataMakerRec::AliITSQADataMakerRec(Bool_t kMode, Short_t subDet, Short_t ldc) : |
44 | AliQADataMakerRec(AliQA::GetDetName(AliQA::kITS), "ITS Quality Assurance Data Maker"), | |
1aa7c4f5 | 45 | fkOnline(kMode), |
8c823e5a | 46 | fSubDetector(subDet), |
1aa7c4f5 | 47 | fLDC(ldc), |
8c823e5a | 48 | fSPDDataMaker(NULL), |
49 | fSDDDataMaker(NULL), | |
50 | fSSDDataMaker(NULL) | |
1aa7c4f5 | 51 | { |
1aa7c4f5 | 52 | //ctor used to discriminate OnLine-Offline analysis |
8c823e5a | 53 | if(fSubDetector < 0 || fSubDetector > 3) { |
54 | AliError("Error: fSubDetector number out of range; return\n"); | |
55 | } | |
56 | ||
57 | // Initialization for RAW data | |
58 | if(fSubDetector == 0 || fSubDetector == 1) { | |
59 | AliDebug(1,"AliITSQADM::Create SPD DataMakerRec\n"); | |
60 | fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline); | |
61 | } | |
62 | if(fSubDetector == 0 || fSubDetector == 2) { | |
63 | AliDebug(1,"AliITSQADM::Create SDD DataMakerRec\n"); | |
64 | fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline); | |
65 | } | |
66 | if(fSubDetector == 0 || fSubDetector == 3) { | |
67 | AliDebug(1,"AliITSQADM::Create SSD DataMakerRec\n"); | |
68 | fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline); | |
69 | } | |
1aa7c4f5 | 70 | } |
71 | ||
04236e67 | 72 | //____________________________________________________________________________ |
8c823e5a | 73 | AliITSQADataMakerRec::~AliITSQADataMakerRec(){ |
74 | // destructor | |
75 | if(fSPDDataMaker)delete fSPDDataMaker; | |
76 | if(fSDDDataMaker)delete fSDDDataMaker; | |
77 | if(fSSDDataMaker)delete fSSDDataMaker; | |
04236e67 | 78 | } |
79 | ||
80 | //____________________________________________________________________________ | |
81 | AliITSQADataMakerRec::AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm) : | |
8c823e5a | 82 | AliQADataMakerRec(), |
9db10425 | 83 | fkOnline(qadm.fkOnline), |
8c823e5a | 84 | fSubDetector(qadm.fSubDetector), |
9db10425 | 85 | fLDC(qadm.fLDC), |
8c823e5a | 86 | fSPDDataMaker(NULL), |
87 | fSDDDataMaker(NULL), | |
88 | fSSDDataMaker(NULL) | |
04236e67 | 89 | { |
90 | //copy ctor | |
91 | SetName((const char*)qadm.GetName()) ; | |
8c823e5a | 92 | SetTitle((const char*)qadm.GetTitle()); |
04236e67 | 93 | } |
94 | ||
95 | //__________________________________________________________________ | |
96 | AliITSQADataMakerRec& AliITSQADataMakerRec::operator = (const AliITSQADataMakerRec& qac ) | |
97 | { | |
98 | // Equal operator. | |
99 | this->~AliITSQADataMakerRec(); | |
100 | new(this) AliITSQADataMakerRec(qac); | |
101 | return *this; | |
102 | } | |
103 | ||
104 | //____________________________________________________________________________ | |
8c823e5a | 105 | void AliITSQADataMakerRec::StartOfDetectorCycle() |
04236e67 | 106 | { |
107 | //Detector specific actions at start of cycle | |
108 | AliDebug(1,"AliITSQADM::Start of ITS Cycle\n"); | |
8c823e5a | 109 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle(); |
110 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle(); | |
111 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle(); | |
04236e67 | 112 | } |
113 | ||
114 | //____________________________________________________________________________ | |
8c823e5a | 115 | void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray* list) |
04236e67 | 116 | { |
117 | // launch the QA checking | |
118 | AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); | |
8c823e5a | 119 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list); |
120 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list); | |
121 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list); | |
04236e67 | 122 | |
8c823e5a | 123 | //AliQAChecker::Instance()->Run( AliQA::kITS , task, list); //temporary skipping the checking |
04236e67 | 124 | } |
125 | ||
126 | //____________________________________________________________________________ | |
8c823e5a | 127 | void AliITSQADataMakerRec::EndOfDetectorCycle(const char * /*fgDataName*/) |
04236e67 | 128 | { |
8c823e5a | 129 | //eventually used for different AliQAChecker::Instance()->Run |
04236e67 | 130 | } |
131 | ||
132 | //____________________________________________________________________________ | |
133 | void AliITSQADataMakerRec::InitRaws() | |
1aa7c4f5 | 134 | { |
8c823e5a | 135 | // Initialization for RAW data |
136 | if(fSubDetector == 0 || fSubDetector == 1) { | |
137 | AliDebug(1,"AliITSQADM:: SPD InitRaws\n"); | |
138 | fSPDDataMaker->InitRaws(); | |
1aa7c4f5 | 139 | } |
8c823e5a | 140 | if(fSubDetector == 0 || fSubDetector == 2) { |
141 | AliDebug(1,"AliITSQADM:: SDD InitRaws\n"); | |
142 | fSDDDataMaker->InitRaws(); | |
04236e67 | 143 | } |
8c823e5a | 144 | if(fSubDetector == 0 || fSubDetector == 3) { |
145 | AliDebug(1,"AliITSQADM:: SSD InitRaws\n"); | |
146 | fSSDDataMaker->InitRaws(); | |
04236e67 | 147 | } |
1aa7c4f5 | 148 | } |
149 | ||
04236e67 | 150 | //____________________________________________________________________________ |
151 | void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader) | |
152 | { | |
8c823e5a | 153 | // Fill QA for RAW |
154 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRaws(rawReader); | |
155 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRaws(rawReader); | |
156 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader); | |
1aa7c4f5 | 157 | } |
04236e67 | 158 | |
159 | //____________________________________________________________________________ | |
160 | void AliITSQADataMakerRec::InitRecPoints() | |
1aa7c4f5 | 161 | { |
162 | // Initialization for RECPOINTS | |
8c823e5a | 163 | if(fSubDetector == 0 || fSubDetector == 1) { |
164 | AliDebug(1,"AliITSQADM:: SPD InitRecPoints\n"); | |
165 | fSPDDataMaker->InitRecPoints(); | |
04236e67 | 166 | } |
8c823e5a | 167 | if(fSubDetector == 0 || fSubDetector == 2) { |
168 | AliDebug(1,"AliITSQADM:: SDD InitRecPoints\n"); | |
169 | fSDDDataMaker->InitRecPoints(); | |
1aa7c4f5 | 170 | } |
8c823e5a | 171 | if(fSubDetector == 0 || fSubDetector == 3) { |
172 | AliDebug(1,"AliITSQADM:: SSD InitRecPoints\n"); | |
173 | fSSDDataMaker->InitRecPoints(); | |
1aa7c4f5 | 174 | } |
1aa7c4f5 | 175 | } |
04236e67 | 176 | |
177 | //____________________________________________________________________________ | |
178 | void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree) | |
1aa7c4f5 | 179 | { |
180 | // Fill QA for recpoints | |
8c823e5a | 181 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRecPoints(clustersTree); |
182 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRecPoints(clustersTree); | |
183 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRecPoints(clustersTree); | |
04236e67 | 184 | } |
185 | ||
186 |