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
22 // -------------------------------------------------------------
23 // W. Ferrarese + P. Cerello Feb 2008
26 // --- ROOT system ---
28 // --- Standard library ---
30 // --- AliRoot header files ---
31 #include "AliITSQADataMakerRec.h"
32 #include "AliITSQASPDDataMakerRec.h"
33 #include "AliITSQASDDDataMakerRec.h"
34 #include "AliITSQASSDDataMakerRec.h"
37 #include "AliQAChecker.h"
38 #include "AliITSQAChecker.h"
39 #include "AliRawReader.h"
41 ClassImp(AliITSQADataMakerRec)
43 //____________________________________________________________________________
44 AliITSQADataMakerRec::AliITSQADataMakerRec(Bool_t kMode, Short_t subDet, Short_t ldc) :
45 AliQADataMakerRec(AliQA::GetDetName(AliQA::kITS), "ITS Quality Assurance Data Maker"),
53 //ctor used to discriminate OnLine-Offline analysis
54 if(fSubDetector < 0 || fSubDetector > 3) {
55 AliError("Error: fSubDetector number out of range; return\n");
58 // Initialization for RAW data
59 if(fSubDetector == 0 || fSubDetector == 1) {
60 AliDebug(1,"AliITSQADM::Create SPD DataMakerRec\n");
61 fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline);
63 if(fSubDetector == 0 || fSubDetector == 2) {
64 AliDebug(1,"AliITSQADM::Create SDD DataMakerRec\n");
65 fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline);
67 if(fSubDetector == 0 || fSubDetector == 3) {
68 AliDebug(1,"AliITSQADM::Create SSD DataMakerRec\n");
69 fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline);
73 //____________________________________________________________________________
74 AliITSQADataMakerRec::~AliITSQADataMakerRec(){
76 if(fSPDDataMaker)delete fSPDDataMaker;
77 if(fSDDDataMaker)delete fSDDDataMaker;
78 if(fSSDDataMaker)delete fSSDDataMaker;
81 //____________________________________________________________________________
82 AliITSQADataMakerRec::AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm) :
84 fkOnline(qadm.fkOnline),
85 fSubDetector(qadm.fSubDetector),
92 SetName((const char*)qadm.GetName()) ;
93 SetTitle((const char*)qadm.GetTitle());
96 //__________________________________________________________________
97 AliITSQADataMakerRec& AliITSQADataMakerRec::operator = (const AliITSQADataMakerRec& qac )
100 this->~AliITSQADataMakerRec();
101 new(this) AliITSQADataMakerRec(qac);
105 //____________________________________________________________________________
106 void AliITSQADataMakerRec::StartOfDetectorCycle()
108 //Detector specific actions at start of cycle
109 AliDebug(1,"AliITSQADM::Start of ITS Cycle\n");
110 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle();
111 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle();
112 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle();
115 //____________________________________________________________________________
116 void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
118 // launch the QA checking
119 AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
120 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);
121 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
122 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
124 AliQAChecker *qac = AliQAChecker::Instance();
125 AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
126 if(fSubDetector == 0 ){
127 qacb->SetTaskOffset(fSPDDataMaker->GetOffset(), fSDDDataMaker->GetOffset(), fSSDDataMaker->GetOffset()); //Setting the offset for the QAChecker list
129 qac->Run( AliQA::kITS , task, list); //temporary skipping the checking
132 //____________________________________________________________________________
133 void AliITSQADataMakerRec::EndOfDetectorCycle(const char * /*fgDataName*/)
135 //eventually used for different AliQAChecker::Instance()->Run
138 //____________________________________________________________________________
139 void AliITSQADataMakerRec::InitRaws()
141 // Initialization for RAW data
142 if(fSubDetector == 0 || fSubDetector == 1) {
143 AliDebug(1,"AliITSQADM:: SPD InitRaws\n");
144 fSPDDataMaker->InitRaws();
146 if(fSubDetector == 0 || fSubDetector == 2) {
147 AliDebug(1,"AliITSQADM:: SDD InitRaws\n");
148 fSDDDataMaker->InitRaws();
150 if(fSubDetector == 0 || fSubDetector == 3) {
151 AliDebug(1,"AliITSQADM:: SSD InitRaws\n");
152 fSSDDataMaker->InitRaws();
156 //____________________________________________________________________________
157 void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
160 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRaws(rawReader);
161 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRaws(rawReader);
162 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader);
165 //____________________________________________________________________________
166 void AliITSQADataMakerRec::InitRecPoints()
168 // Initialization for RECPOINTS
169 if(fSubDetector == 0 || fSubDetector == 1) {
170 AliDebug(1,"AliITSQADM:: SPD InitRecPoints\n");
171 fSPDDataMaker->InitRecPoints();
173 if(fSubDetector == 0 || fSubDetector == 2) {
174 AliDebug(1,"AliITSQADM:: SDD InitRecPoints\n");
175 fSDDDataMaker->InitRecPoints();
177 if(fSubDetector == 0 || fSubDetector == 3) {
178 AliDebug(1,"AliITSQADM:: SSD InitRecPoints\n");
179 fSSDDataMaker->InitRecPoints();
183 //____________________________________________________________________________
184 void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree)
186 // Fill QA for recpoints
187 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRecPoints(clustersTree);
188 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRecPoints(clustersTree);
189 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRecPoints(clustersTree);