]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Tasks/AliFlowVZEROQA.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWG / FLOW / Tasks / AliFlowVZEROQA.h
1 #ifndef ALIFLOWVZEROQA_H
2 #define ALIFLOWVZEROQA_H
3
4
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8 /* $Id: AliFlowVZEROQA.h 49869 2011-05-18 04:49:51Z fnoferin $ */
9
10 /////////////////////////////////////////////////
11 //                                             //
12 //         output v2-VZERO Class               //
13 //           noferini@bo.infn.it               //
14 /////////////////////////////////////////////////
15
16 #include "TH2F.h"
17 #include "TClonesArray.h"
18 #include "TArrayI.h"
19 #include "TArrayF.h"
20
21 class AliFlowVZEROQA : public TNamed
22 {
23  public:
24   AliFlowVZEROQA(const char *name,const Int_t nvar,const Int_t* binVar);
25   AliFlowVZEROQA();
26   ~AliFlowVZEROQA();
27   AliFlowVZEROQA(const AliFlowVZEROQA &old);
28   AliFlowVZEROQA& operator=(const AliFlowVZEROQA &source);
29
30   Int_t GetNhistos() const {return fQA->GetEntries();};
31   Int_t GetNspecies() const;
32   TH2F *GetQA(Int_t histo) const {return ((TH2F *) fQA->At(histo));};
33   TH2F *GetQA(Int_t species,Float_t x[]) const;
34   TH2F *GetQA(Int_t species,Float_t xMin[],Float_t xMax[]) const;
35   void DirectFill(Int_t histo,Float_t var1,Float_t var2){GetQA(histo)->Fill(var1,var2);};
36   void Fill(Int_t species,Float_t var1,Float_t var2,Float_t x[]);
37
38   void AddSpecies(const char *name,Int_t nXbin,const Double_t *xbin,Int_t nYbin,const Double_t *ybin);
39
40   const char *GetSpeciesName(Int_t species){if(species<GetNspecies()) return GetQA(species*GetNhistos()/GetNspecies())->GetName();else return "";};
41
42   Int_t Add(const AliFlowVZEROQA *oth);
43
44   Int_t GetNvar() const {return fNbinVar->GetSize();};
45   Int_t GetNbinVar(Int_t ivar) const {return (*fNbinVar)[ivar];};
46
47   void SetVarRange(Int_t ivar,Float_t xMin,Float_t xMax);
48   void SetVarName(Int_t ivar,const char *name){TNamed *atemp = (TNamed *) fNameVar->At(ivar); atemp->SetName(name);};
49
50   Float_t GetXmin(Int_t ivar) const {return (*fXmin)[ivar];};
51   Float_t GetXmax(Int_t ivar) const {return (*fXmax)[ivar];};
52   const char *GetVarName(Int_t ivar) const {TNamed *atemp = (TNamed *) fNameVar->At(ivar); return atemp->GetName();};
53
54   Int_t GetBin(Int_t ivar,Float_t x) const {return Int_t((x-(*fXmin)[ivar])/((*fXmax)[ivar]-(*fXmin)[ivar])*(*fNbinVar)[ivar]);};
55
56   Long64_t Merge(TCollection* list);
57
58   void Reset();
59
60  private:
61   TArrayI *fNbinVar;
62   TArrayF *fXmin,*fXmax;
63   TClonesArray *fNameVar;
64
65   TClonesArray *fQA;
66
67
68   ClassDef(AliFlowVZEROQA,1)  // qa vzero outuput object
69 };
70 #endif
71
72