]>
Commit | Line | Data |
---|---|---|
c9dd1c4d | 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> | |
6ceca4ef | 34 | #include <iostream> |
c9dd1c4d | 35 | |
36 | // --- AliRoot header files --- | |
37 | #include "AliLog.h" | |
4e25ac79 | 38 | #include "AliQAv1.h" |
c9dd1c4d | 39 | #include "AliQAChecker.h" |
40 | #include "AliFMDQAChecker.h" | |
6ceca4ef | 41 | #include "AliRecoParam.h" |
c9dd1c4d | 42 | |
43 | ClassImp(AliFMDQAChecker) | |
44 | #if 0 | |
45 | ; // This is for Emacs! - do not delete | |
46 | #endif | |
c9dd1c4d | 47 | //__________________________________________________________________ |
486788fc | 48 | Double_t* AliFMDQAChecker::Check(AliQAv1::ALITASK_t what, TObjArray ** list, const AliDetectorRecoParam* /*t*/) { |
6ceca4ef | 49 | |
50 | Double_t* rv = new Double_t[AliRecoParam::kNSpecies] ; | |
51 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { | |
52 | rv[specie] = 0.0 ; | |
53 | if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) | |
54 | continue ; | |
55 | ||
56 | if(!list[specie]) continue; | |
57 | ||
58 | TIter next1(list[specie]); | |
59 | TH1F* hist = 0; | |
60 | ||
61 | for(Int_t i= 0; i<list[specie]->GetEntriesFast(); i++) { | |
62 | ||
63 | hist = (TH1F*)list[specie]->At(i); | |
64 | if(!hist) continue; | |
65 | ||
66 | if(what == AliQAv1::kESD) { | |
67 | if(hist->GetMean() > 0) | |
68 | rv[specie] = 1.; | |
69 | else rv[specie] = 0.; | |
70 | } | |
71 | if(what == AliQAv1::kRAW) { | |
72 | if(hist->GetMean() > 0) | |
73 | rv[specie] = 1.; | |
74 | else rv[specie] = 0.; | |
75 | } | |
76 | if(what == AliQAv1::kSIM) { | |
77 | if(hist->GetMean() > 0) | |
78 | rv[specie] = 1.; | |
79 | else rv[specie] = 0.; | |
80 | } | |
81 | if(what == AliQAv1::kREC) { | |
82 | if(hist->GetMean() > 0) | |
83 | rv[specie] = 1.; | |
84 | else rv[specie] = 0.; | |
85 | } | |
86 | ||
87 | } | |
88 | } | |
89 | ||
90 | return rv; | |
91 | ||
92 | } | |
93 | ||
94 | ||
c9dd1c4d | 95 | |
96 | //__________________________________________________________________ | |
97 | // | |
98 | // EOF | |
99 | // |