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("Corr", "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) ;
82 //____________________________________________________________________________
83 void AliCorrQADataMakerRec::InitESDs()
85 //Create histograms to controll ESD
87 AliInfo("TO BE IMPLEMENTED") ;
90 //____________________________________________________________________________
91 void AliCorrQADataMakerRec::InitRecPoints()
93 // create Reconstructed Points histograms in RecPoints subdir
95 AliInfo("TO BE IMPLEMENTED") ;
98 //____________________________________________________________________________
99 void AliCorrQADataMakerRec::InitRaws()
101 // createa ntuple taking all the parameters declared by detectors
104 delete fRawsQAList ; // not needed for the time being
106 TString varlist("") ;
107 for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++ ) {
108 AliQADataMaker * qadm = fqadm[detIndex] ;
111 TList * list = qadm->GetParameterList() ;
114 TParameter<double> * p ;
115 while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
116 varlist.Append(p->GetName()) ;
117 varlist.Append(":") ;
122 varlist = varlist.Strip(TString::kTrailing, ':') ;
123 if (fMaxRawVar == 0) {
124 AliWarning("NTUPLE not created") ;
126 fObject = new TNtupleD(AliQA::GetQACorrName(), "Raws data correlation among detectors", varlist.Data()) ;
130 //____________________________________________________________________________
131 void AliCorrQADataMakerRec::MakeESDs(AliESDEvent * /*esd*/)
133 // make QA data from ESDs
135 AliInfo("TO BE IMPLEMENTED") ;
139 //____________________________________________________________________________
140 void AliCorrQADataMakerRec::MakeRaws()
142 //Fill prepared histograms with Raw digit properties
143 if ( fMaxRawVar > 0 ) {
144 const Int_t kSize = fMaxRawVar ;
145 Double_t varvalue[kSize] ;
147 for ( Int_t detIndex = 0 ; detIndex < AliQA::kNDET ; detIndex++ ) {
148 AliQADataMaker * qadm = fqadm[detIndex] ;
151 TList * list = qadm->GetParameterList() ;
153 TParameter<double> * p ;
154 while ( (p = dynamic_cast<TParameter<double>*>(next()) ) ) {
155 varvalue[index++] = p->GetVal() ;
158 (dynamic_cast<TNtupleD*>(fObject))->Fill(varvalue);
162 //____________________________________________________________________________
163 void AliCorrQADataMakerRec::MakeRecPoints(TTree * /*clustersTree*/)
165 AliInfo("TO BE IMPLEMENTED") ;
168 //____________________________________________________________________________
169 void AliCorrQADataMakerRec::StartOfDetectorCycle()
171 //Detector specific actions at start of cycle