]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - FMD/AliFMDQAChecker.cxx
Fixing violations and warnings motivated by FC
[u/mrichter/AliRoot.git] / FMD / AliFMDQAChecker.cxx
... / ...
CommitLineData
1/**************************************************************************
2 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15//__________________________________________________________________
16//
17// Yves?
18// What
19// is
20// this
21// class
22// supposed
23// to
24// do?
25//__________________________________________________________________
26//
27// --- ROOT system ---
28#include <TClass.h>
29#include <TH1F.h>
30#include <TH1I.h>
31#include <TIterator.h>
32#include <TKey.h>
33#include <TFile.h>
34#include <iostream>
35
36// --- AliRoot header files ---
37#include "AliLog.h"
38#include "AliQAv1.h"
39#include "AliQAChecker.h"
40#include "AliFMDQAChecker.h"
41#include "AliRecoParam.h"
42
43ClassImp(AliFMDQAChecker)
44#if 0
45; // This is for Emacs! - do not delete
46#endif
47//__________________________________________________________________
48void AliFMDQAChecker::Check(Double_t* rv,
49 AliQAv1::ALITASK_t what,
50 TObjArray** list,
51 const AliDetectorRecoParam* /*t*/)
52{
53 //
54 // Member function called to do the actual checking
55 //
56 // Parameters:
57 // rv Array of return values.
58 // what What to check
59 // list Array of arrays of histograms. There's one arrat for
60 // each 'specie'
61 // t Reconstruction parameters - not used.
62 //
63
64 // Double_t* rv = new Double_t[AliRecoParam::kNSpecies] ;
65 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
66 Int_t count = 0;
67 rv[specie] = 0.;
68
69 if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
70 continue ;
71
72 if(!list[specie]) continue;
73
74 TH1F* hist = 0;
75 Int_t nHist = list[specie]->GetEntriesFast();
76 for(Int_t i= 0; i< nHist; i++) {
77
78 if (!(hist = static_cast<TH1F*>(list[specie]->At(i)))) continue;
79
80 if(what == AliQAv1::kESD)
81 rv[specie] += (hist->GetMean() > 0 ? 1 : 0);
82 if(what == AliQAv1::kRAW)
83 rv[specie] += (hist->GetMean() > 0 ? 1 : 0);
84 if(what == AliQAv1::kSIM)
85 rv[specie] += (hist->GetMean() > 0 ? 1 : 0);
86 if(what == AliQAv1::kREC)
87 rv[specie] += (hist->GetMean() > 0 ? 1 : 0);
88 } // for (int i ...)
89 if (count != 0) rv[specie] /= count;
90 }
91 // return rv;
92}
93
94
95
96//__________________________________________________________________
97//
98// EOF
99//