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"),
51 fCorrNt = new TNtupleD *[AliRecoParam::kNSpecies] ;
52 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
53 fCorrNt[specie] = NULL ;
56 //____________________________________________________________________________
57 AliCorrQADataMakerRec::AliCorrQADataMakerRec(const AliCorrQADataMakerRec& qadm) :
59 fMaxRawVar(qadm.fMaxRawVar),
63 SetName((const char*)qadm.GetName()) ;
64 SetTitle((const char*)qadm.GetTitle());
67 //__________________________________________________________________
68 AliCorrQADataMakerRec& AliCorrQADataMakerRec::operator = (const AliCorrQADataMakerRec& qadm )
71 this->~AliCorrQADataMakerRec();
72 new(this) AliCorrQADataMakerRec(qadm);
76 //____________________________________________________________________________
77 AliCorrQADataMakerRec::~AliCorrQADataMakerRec()
79 // dtor only destroy the ntuple
81 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
82 if ( fCorrNt[specie] != NULL )
83 delete fCorrNt[specie] ;
90 //____________________________________________________________________________
91 void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** /*list*/)
93 //Detector specific actions at end of cycle
95 if (task == AliQAv1::kRAWS) {
96 AliQAChecker::Instance()->Run(AliQAv1::kCORR, task, fCorrNt) ;
100 //____________________________________________________________________________
101 void AliCorrQADataMakerRec::InitESDs()
103 //Create histograms to controll ESD
105 AliInfo("TO BE IMPLEMENTED") ;
108 //____________________________________________________________________________
109 void AliCorrQADataMakerRec::InitRecPoints()
111 // create Reconstructed Points histograms in RecPoints subdir
113 AliInfo("TO BE IMPLEMENTED") ;
116 //____________________________________________________________________________
117 void AliCorrQADataMakerRec::InitRaws()
119 // createa ntuple taking all the parameters declared by detectors
122 delete fRawsQAList ; // not needed for the time being
124 TString varlist("") ;
125 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
126 AliQADataMaker * qadm = fqadm[detIndex] ;
129 TList * list = qadm->GetParameterList() ;
132 TParameter<double> * p ;
133 while ( (p = static_cast<TParameter<double>*>(next()) ) ) {
134 varlist.Append(p->GetName()) ;
135 varlist.Append(":") ;
140 varlist = varlist.Strip(TString::kTrailing, ':') ;
141 if (fMaxRawVar == 0) {
142 AliWarning("NTUPLE not created") ;
144 char * name = Form("%s_%s", AliQAv1::GetQACorrName(), AliRecoParam::GetEventSpecieName(fEventSpecie)) ;
145 fCorrNt[AliRecoParam::AConvert(fEventSpecie)] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;
149 //____________________________________________________________________________
150 void AliCorrQADataMakerRec::MakeESDs(AliESDEvent * /*esd*/)
152 // make QA data from ESDs
154 AliInfo("TO BE IMPLEMENTED") ;
158 //____________________________________________________________________________
159 void AliCorrQADataMakerRec::MakeRaws(AliRawReader *)
161 //Fill prepared histograms with Raw digit properties
163 if ( ! fCorrNt[AliRecoParam::AConvert(fEventSpecie)])
166 if ( fMaxRawVar > 0 ) {
167 const Int_t kSize = fMaxRawVar ;
168 Double_t *varvalue = new Double_t[kSize] ;
170 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
171 AliQADataMaker * qadm = fqadm[detIndex] ;
174 TList * list = qadm->GetParameterList() ;
176 TParameter<double> * p ;
177 while ( (p = static_cast<TParameter<double>*>(next()) ) ) {
178 varvalue[index++] = p->GetVal() ;
181 static_cast<TNtupleD*>(fCorrNt[AliRecoParam::AConvert(fEventSpecie)])->Fill(varvalue);
186 //____________________________________________________________________________
187 void AliCorrQADataMakerRec::MakeRecPoints(TTree * /*clustersTree*/)
189 AliInfo("TO BE IMPLEMENTED") ;
192 //____________________________________________________________________________
193 void AliCorrQADataMakerRec::StartOfDetectorCycle()
195 //Detector specific actions at start of cycle