ROOT logo
#ifndef ALIFLOWVZEROQA_H
#define ALIFLOWVZEROQA_H


/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id: AliFlowVZEROQA.h 49869 2011-05-18 04:49:51Z fnoferin $ */

/////////////////////////////////////////////////
//                                             //
//         output v2-VZERO Class               //
//           noferini@bo.infn.it               //
/////////////////////////////////////////////////

#include "TH2F.h"
#include "TClonesArray.h"
#include "TArrayI.h"
#include "TArrayF.h"

class AliFlowVZEROQA : public TNamed
{
 public:
  AliFlowVZEROQA(const char *name,const Int_t nvar,const Int_t* binVar);
  AliFlowVZEROQA();
  ~AliFlowVZEROQA();
  AliFlowVZEROQA(const AliFlowVZEROQA &old);
  AliFlowVZEROQA& operator=(const AliFlowVZEROQA &source);

  Int_t GetNhistos() const {return fQA->GetEntries();};
  Int_t GetNspecies() const;
  TH2F *GetQA(Int_t histo) const {return ((TH2F *) fQA->At(histo));};
  TH2F *GetQA(Int_t species,Float_t x[]) const;
  TH2F *GetQA(Int_t species,Float_t xMin[],Float_t xMax[]) const;
  void DirectFill(Int_t histo,Float_t var1,Float_t var2){GetQA(histo)->Fill(var1,var2);};
  void Fill(Int_t species,Float_t var1,Float_t var2,Float_t x[]);

  void AddSpecies(const char *name,Int_t nXbin,const Double_t *xbin,Int_t nYbin,const Double_t *ybin);

  const char *GetSpeciesName(Int_t species){if(species<GetNspecies()) return GetQA(species*GetNhistos()/GetNspecies())->GetName();else return "";};

  Int_t Add(const AliFlowVZEROQA *oth);

  Int_t GetNvar() const {return fNbinVar->GetSize();};
  Int_t GetNbinVar(Int_t ivar) const {return (*fNbinVar)[ivar];};

  void SetVarRange(Int_t ivar,Float_t xMin,Float_t xMax);
  void SetVarName(Int_t ivar,const char *name){TNamed *atemp = (TNamed *) fNameVar->At(ivar); atemp->SetName(name);};

  Float_t GetXmin(Int_t ivar) const {return (*fXmin)[ivar];};
  Float_t GetXmax(Int_t ivar) const {return (*fXmax)[ivar];};
  const char *GetVarName(Int_t ivar) const {TNamed *atemp = (TNamed *) fNameVar->At(ivar); return atemp->GetName();};

  Int_t GetBin(Int_t ivar,Float_t x) const {return Int_t((x-(*fXmin)[ivar])/((*fXmax)[ivar]-(*fXmin)[ivar])*(*fNbinVar)[ivar]);};

  Long64_t Merge(TCollection* list);

  void Reset();

 private:
  TArrayI *fNbinVar;
  TArrayF *fXmin,*fXmax;
  TClonesArray *fNameVar;

  TClonesArray *fQA;


  ClassDef(AliFlowVZEROQA,1)  // qa vzero outuput object
};
#endif


 AliFlowVZEROQA.h:1
 AliFlowVZEROQA.h:2
 AliFlowVZEROQA.h:3
 AliFlowVZEROQA.h:4
 AliFlowVZEROQA.h:5
 AliFlowVZEROQA.h:6
 AliFlowVZEROQA.h:7
 AliFlowVZEROQA.h:8
 AliFlowVZEROQA.h:9
 AliFlowVZEROQA.h:10
 AliFlowVZEROQA.h:11
 AliFlowVZEROQA.h:12
 AliFlowVZEROQA.h:13
 AliFlowVZEROQA.h:14
 AliFlowVZEROQA.h:15
 AliFlowVZEROQA.h:16
 AliFlowVZEROQA.h:17
 AliFlowVZEROQA.h:18
 AliFlowVZEROQA.h:19
 AliFlowVZEROQA.h:20
 AliFlowVZEROQA.h:21
 AliFlowVZEROQA.h:22
 AliFlowVZEROQA.h:23
 AliFlowVZEROQA.h:24
 AliFlowVZEROQA.h:25
 AliFlowVZEROQA.h:26
 AliFlowVZEROQA.h:27
 AliFlowVZEROQA.h:28
 AliFlowVZEROQA.h:29
 AliFlowVZEROQA.h:30
 AliFlowVZEROQA.h:31
 AliFlowVZEROQA.h:32
 AliFlowVZEROQA.h:33
 AliFlowVZEROQA.h:34
 AliFlowVZEROQA.h:35
 AliFlowVZEROQA.h:36
 AliFlowVZEROQA.h:37
 AliFlowVZEROQA.h:38
 AliFlowVZEROQA.h:39
 AliFlowVZEROQA.h:40
 AliFlowVZEROQA.h:41
 AliFlowVZEROQA.h:42
 AliFlowVZEROQA.h:43
 AliFlowVZEROQA.h:44
 AliFlowVZEROQA.h:45
 AliFlowVZEROQA.h:46
 AliFlowVZEROQA.h:47
 AliFlowVZEROQA.h:48
 AliFlowVZEROQA.h:49
 AliFlowVZEROQA.h:50
 AliFlowVZEROQA.h:51
 AliFlowVZEROQA.h:52
 AliFlowVZEROQA.h:53
 AliFlowVZEROQA.h:54
 AliFlowVZEROQA.h:55
 AliFlowVZEROQA.h:56
 AliFlowVZEROQA.h:57
 AliFlowVZEROQA.h:58
 AliFlowVZEROQA.h:59
 AliFlowVZEROQA.h:60
 AliFlowVZEROQA.h:61
 AliFlowVZEROQA.h:62
 AliFlowVZEROQA.h:63
 AliFlowVZEROQA.h:64
 AliFlowVZEROQA.h:65
 AliFlowVZEROQA.h:66
 AliFlowVZEROQA.h:67
 AliFlowVZEROQA.h:68
 AliFlowVZEROQA.h:69
 AliFlowVZEROQA.h:70
 AliFlowVZEROQA.h:71
 AliFlowVZEROQA.h:72