1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
17 /* $Id: AliCorrQADataMakerRec.cxx 27570 2008-07-24 21:49:27Z cvetan $ */
20 Produces the data needed to calculate the quality assurance.
21 All data must be mergeable objects.
22 Y. Schutz CERN July 2007
25 // --- ROOT system ---
26 #include <TClonesArray.h>
32 #include <TParameter.h>
35 // --- Standard library ---
37 // --- AliRoot header files ---
39 #include "AliCorrQADataMakerRec.h"
40 #include "AliQAChecker.h"
42 ClassImp(AliCorrQADataMakerRec)
44 //____________________________________________________________________________
45 AliCorrQADataMakerRec::AliCorrQADataMakerRec(AliQADataMaker ** qadm ) :
46 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kCORR), "Corr Quality Assurance Data Maker"),
52 fCorrNt = new TNtupleD *[AliRecoParam::kNSpecies] ;
53 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
54 fCorrNt[specie] = NULL ;
57 //____________________________________________________________________________
58 AliCorrQADataMakerRec::AliCorrQADataMakerRec(const AliCorrQADataMakerRec& qadm) :
60 fMaxRawVar(qadm.fMaxRawVar),
65 SetName((const char*)qadm.GetName()) ;
66 SetTitle((const char*)qadm.GetTitle());
68 fVarvalue = new Double_t[fMaxRawVar] ;
71 //__________________________________________________________________
72 AliCorrQADataMakerRec& AliCorrQADataMakerRec::operator = (const AliCorrQADataMakerRec& qadm )
75 this->~AliCorrQADataMakerRec();
76 new(this) AliCorrQADataMakerRec(qadm);
80 //____________________________________________________________________________
81 AliCorrQADataMakerRec::~AliCorrQADataMakerRec()
83 // dtor only destroy the ntuple
85 // for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
86 // if ( fCorrNt[specie] != NULL )
87 // delete fCorrNt[specie] ;
96 //____________________________________________________________________________
97 void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** /*list*/)
99 //Detector specific actions at end of cycle
100 // do the QA checking
101 if (task == AliQAv1::kRAWS) {
102 AliQAChecker::Instance()->Run(AliQAv1::kCORR, task, fCorrNt) ;
106 //____________________________________________________________________________
107 void AliCorrQADataMakerRec::InitESDs()
109 //Create histograms to controll ESD
111 AliInfo("TO BE IMPLEMENTED") ;
114 //____________________________________________________________________________
115 void AliCorrQADataMakerRec::InitRecPoints()
117 // create Reconstructed Points histograms in RecPoints subdir
119 AliInfo("TO BE IMPLEMENTED") ;
122 //____________________________________________________________________________
123 void AliCorrQADataMakerRec::InitRaws()
125 // createa ntuple taking all the parameters declared by detectors
126 if (fCorrNt[AliRecoParam::AConvert(fEventSpecie)])
130 delete[] fRawsQAList ; // not needed for the time being
133 TString varlist("") ;
134 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
135 AliQADataMaker * qadm = fqadm[detIndex] ;
138 TList * list = qadm->GetParameterList() ;
141 TParameter<double> * p ;
142 while ( (p = static_cast<TParameter<double>*>(next()) ) ) {
143 varlist.Append(p->GetName()) ;
144 varlist.Append(":") ;
149 varlist = varlist.Strip(TString::kTrailing, ':') ;
150 if (fMaxRawVar == 0) {
151 AliWarning("NTUPLE not created") ;
153 char * name = Form("%s_%s", AliQAv1::GetQACorrName(), AliRecoParam::GetEventSpecieName(fEventSpecie)) ;
154 fCorrNt[AliRecoParam::AConvert(fEventSpecie)] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;
155 fVarvalue = new Double_t[fMaxRawVar] ;
159 //____________________________________________________________________________
160 void AliCorrQADataMakerRec::MakeESDs(AliESDEvent * /*esd*/)
162 // make QA data from ESDs
164 AliInfo("TO BE IMPLEMENTED") ;
168 //____________________________________________________________________________
169 void AliCorrQADataMakerRec::MakeRaws(AliRawReader *)
171 //Fill prepared histograms with Raw digit properties
173 if ( ! fCorrNt[AliRecoParam::AConvert(fEventSpecie)])
176 if ( fMaxRawVar > 0 ) {
178 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
179 AliQADataMaker * qadm = fqadm[detIndex] ;
182 TList * list = qadm->GetParameterList() ;
184 TParameter<double> * p ;
185 while ( (p = static_cast<TParameter<double>*>(next()) ) ) {
186 fVarvalue[index] = p->GetVal() ;
190 static_cast<TNtupleD*>(fCorrNt[AliRecoParam::AConvert(fEventSpecie)])->Fill(fVarvalue);
194 //____________________________________________________________________________
195 void AliCorrQADataMakerRec::MakeRecPoints(TTree * /*clustersTree*/)
197 AliInfo("TO BE IMPLEMENTED") ;
200 //____________________________________________________________________________
201 void AliCorrQADataMakerRec::StartOfDetectorCycle()
203 //Detector specific actions at start of cycle