]>
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 | //__________________________________________________________________ |
fa5a224b | 48 | void 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 | // | |
6ceca4ef | 63 | |
fa5a224b | 64 | // Double_t* rv = new Double_t[AliRecoParam::kNSpecies] ; |
6ceca4ef | 65 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { |
fa5a224b | 66 | Int_t count = 0; |
67 | rv[specie] = 0.; | |
68 | ||
6ceca4ef | 69 | if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) |
70 | continue ; | |
71 | ||
72 | if(!list[specie]) continue; | |
73 | ||
584d4c54 | 74 | TH1F* hist = 0; |
75 | Int_t nHist = list[specie]->GetEntriesFast(); | |
76 | for(Int_t i= 0; i< nHist; i++) { | |
6ceca4ef | 77 | |
584d4c54 | 78 | if (!(hist = static_cast<TH1F*>(list[specie]->At(i)))) continue; |
6ceca4ef | 79 | |
fa5a224b | 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; | |
6ceca4ef | 90 | } |
fa5a224b | 91 | // return rv; |
6ceca4ef | 92 | } |
93 | ||
94 | ||
c9dd1c4d | 95 | |
96 | //__________________________________________________________________ | |
97 | // | |
98 | // EOF | |
99 | // |