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>
34 // --- Standard library ---
36 // --- AliRoot header files ---
38 #include "AliCorrQADataMakerRec.h"
39 #include "AliQAChecker.h"
41 ClassImp(AliCorrQADataMakerRec)
43 //____________________________________________________________________________
44 AliCorrQADataMakerRec::AliCorrQADataMakerRec(AliQADataMaker ** qadm ) :
45 AliQADataMakerRec(AliQA::GetDetName(AliQA::kCORR), "Corr Quality Assurance Data Maker"),
53 //____________________________________________________________________________
54 AliCorrQADataMakerRec::AliCorrQADataMakerRec(const AliCorrQADataMakerRec& qadm) :
56 fMaxRawVar(qadm.fMaxRawVar),
60 SetName((const char*)qadm.GetName()) ;
61 SetTitle((const char*)qadm.GetTitle());
64 //__________________________________________________________________
65 AliCorrQADataMakerRec& AliCorrQADataMakerRec::operator = (const AliCorrQADataMakerRec& qadm )
68 this->~AliCorrQADataMakerRec();
69 new(this) AliCorrQADataMakerRec(qadm);
73 //____________________________________________________________________________
74 void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * /*list*/)
76 //Detector specific actions at end of cycle
78 if (task == AliQA::kRAWS) {
79 AliQAChecker::Instance()->Run(AliQA::kCORR, task, fObject) ;
83 //____________________________________________________________________________
84 void AliCorrQADataMakerRec::InitESDs()
86 //Create histograms to controll ESD
88 AliInfo("TO BE IMPLEMENTED") ;
91 //____________________________________________________________________________
92 void AliCorrQADataMakerRec::InitRecPoints()
94 // create Reconstructed Points histograms in RecPoints subdir
96 AliInfo("TO BE IMPLEMENTED") ;
99 //____________________________________________________________________________
100 void AliCorrQADataMakerRec::InitRaws()
102 // createa ntuple taking all the parameters declared by detectors
105 delete fRawsQAList ; // not needed for the time being
107 TString varlist("") ;
108 for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++ ) {
109 AliQADataMaker * qadm = fqadm[detIndex] ;
112 TList * list = qadm->GetParameterList() ;
115 TParameter<double> * p ;
116 while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
117 varlist.Append(p->GetName()) ;
118 varlist.Append(":") ;
123 varlist = varlist.Strip(TString::kTrailing, ':') ;
124 if (fMaxRawVar == 0) {
125 AliWarning("NTUPLE not created") ;
127 fObject = new TNtupleD(AliQA::GetQACorrName(), "Raws data correlation among detectors", varlist.Data()) ;
131 //____________________________________________________________________________
132 void AliCorrQADataMakerRec::MakeESDs(AliESDEvent * /*esd*/)
134 // make QA data from ESDs
136 AliInfo("TO BE IMPLEMENTED") ;
140 //____________________________________________________________________________
141 void AliCorrQADataMakerRec::MakeRaws(AliRawReader *)
143 //Fill prepared histograms with Raw digit properties
144 if ( fMaxRawVar > 0 ) {
145 const Int_t kSize = fMaxRawVar ;
146 Double_t *varvalue = new Double_t[kSize] ;
148 for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++ ) {
149 AliQADataMaker * qadm = fqadm[detIndex] ;
152 TList * list = qadm->GetParameterList() ;
154 TParameter<double> * p ;
155 while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
156 varvalue[index++] = p->GetVal() ;
159 (dynamic_cast<TNtupleD*>(fObject))->Fill(varvalue);
164 //____________________________________________________________________________
165 void AliCorrQADataMakerRec::MakeRecPoints(TTree * /*clustersTree*/)
167 AliInfo("TO BE IMPLEMENTED") ;
170 //____________________________________________________________________________
171 void AliCorrQADataMakerRec::StartOfDetectorCycle()
173 //Detector specific actions at start of cycle