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] ;
89 //____________________________________________________________________________
90 void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** /*list*/)
92 //Detector specific actions at end of cycle
94 if (task == AliQAv1::kRAWS) {
95 AliQAChecker::Instance()->Run(AliQAv1::kCORR, task, fCorrNt) ;
99 //____________________________________________________________________________
100 void AliCorrQADataMakerRec::InitESDs()
102 //Create histograms to controll ESD
104 AliInfo("TO BE IMPLEMENTED") ;
107 //____________________________________________________________________________
108 void AliCorrQADataMakerRec::InitRecPoints()
110 // create Reconstructed Points histograms in RecPoints subdir
112 AliInfo("TO BE IMPLEMENTED") ;
115 //____________________________________________________________________________
116 void AliCorrQADataMakerRec::InitRaws()
118 // createa ntuple taking all the parameters declared by detectors
121 delete fRawsQAList ; // not needed for the time being
123 TString varlist("") ;
124 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
125 AliQADataMaker * qadm = fqadm[detIndex] ;
128 TList * list = qadm->GetParameterList() ;
131 TParameter<double> * p ;
132 while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
133 varlist.Append(p->GetName()) ;
134 varlist.Append(":") ;
139 varlist = varlist.Strip(TString::kTrailing, ':') ;
140 if (fMaxRawVar == 0) {
141 AliWarning("NTUPLE not created") ;
143 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
144 char * name = Form("%s_%s", AliQAv1::GetQACorrName(), AliRecoParam::GetEventSpecieName(specie)) ;
145 fCorrNt[specie] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;
150 //____________________________________________________________________________
151 void AliCorrQADataMakerRec::MakeESDs(AliESDEvent * /*esd*/)
153 // make QA data from ESDs
155 AliInfo("TO BE IMPLEMENTED") ;
159 //____________________________________________________________________________
160 void AliCorrQADataMakerRec::MakeRaws(AliRawReader *)
162 //Fill prepared histograms with Raw digit properties
163 if ( fMaxRawVar > 0 ) {
164 const Int_t kSize = fMaxRawVar ;
165 Double_t *varvalue = new Double_t[kSize] ;
167 for ( Int_t detIndex = 0 ; detIndex < AliQAv1::kNDET ; detIndex++ ) {
168 AliQADataMaker * qadm = fqadm[detIndex] ;
171 TList * list = qadm->GetParameterList() ;
173 TParameter<double> * p ;
174 while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
175 varvalue[index++] = p->GetVal() ;
178 (dynamic_cast<TNtupleD*>(fCorrNt[(Int_t)TMath::Log2(fEventSpecie)]))->Fill(varvalue);
183 //____________________________________________________________________________
184 void AliCorrQADataMakerRec::MakeRecPoints(TTree * /*clustersTree*/)
186 AliInfo("TO BE IMPLEMENTED") ;
189 //____________________________________________________________________________
190 void AliCorrQADataMakerRec::StartOfDetectorCycle()
192 //Detector specific actions at start of cycle