]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/UNICOR/AliUnicorHN.h
Modifications to flag fake tracks (Ruben)
[u/mrichter/AliRoot.git] / PWG2 / UNICOR / AliUnicorHN.h
index 9839e00c063069962756ffe58cc3bea1df5db5aa..7efebcc8a3b2ea688f7129b7cdc9f3c47d7601ca 100644 (file)
@@ -19,33 +19,31 @@ class TAxis;
 class AliUnicorHN : public TH1D {
 
  public:
-  AliUnicorHN() : TH1D(), fNdim(0) {}               // default contructor
-  AliUnicorHN(Char_t *nam, Int_t ndim, TAxis **ax); // constructor from scratch
-  AliUnicorHN(Char_t *filename, Char_t *name);      // constructor from file
-  virtual ~AliUnicorHN() {}                         // destructor
+  AliUnicorHN(const char *nam="muhi", Int_t ndim=0, TAxis **ax=0);     // constructor
+  AliUnicorHN(TRootIOCtor *) : TH1D(), fNdim(0) {for (int i=0; i<fgkMaxNdim; i++) fNbins[i]=fMbins[i]=0;}  // default constructor
+  virtual ~AliUnicorHN() {}                                            // destructor
+  static AliUnicorHN* Retrieve(const char *filnam, const char *nam);   // read from file
+
   Int_t GetNdim() const                     {return fNdim;}
   TAxis *GetAxis(Int_t i) const             {return (TAxis*) &fAxis[i];}
 
   Int_t Fill(Double_t *xx, Double_t y=1);   // fill histo
   Int_t Fill(Double_t)                      {return -1;} // insufficient number of arguments
-  Int_t Fill(Double_t x0, Double_t w)       {return Fill(&x0,w);} // 1-dim histo fill
+  Int_t Fill(Double_t x0, Double_t w)       {Double_t x[1]={x0}; return Fill(x,w);} // 1-dim histo fill
   Int_t Fill(Double_t x0, Double_t x1, ...);// 2 or more dim histo fill
   Int_t Fill(const char*, Double_t)         {return -1;} // overload TH1
 
-  Int_t Write() const;                      // save histo and axis on file 
-  Int_t Write()                             {return ((const AliUnicorHN*)this)->Write();}
-  Int_t Write(const char *, Int_t, Int_t)   {return Write();} // overload TObject
-  Int_t Write(const char *, Int_t, Int_t) const {return Write();} 
+  Int_t Save() const;                      // save histo and axis on file 
 
   // project along (integrate over) one axis
-  AliUnicorHN  *ProjectAlong(char *nam, Int_t dim, Int_t first=-1, Int_t last=-1);
-  // project on 1-dim histogram
-  TH1D *ProjectOn(char *nam, Int_t dim, const Int_t * const first=0, const Int_t * const last=0) const;
+  AliUnicorHN  *ProjectAlong(const char *nam, Int_t dim, Int_t first=0, Int_t last=0);
   // project on 1-dim histogram
-  TH1D *ProjectOn(char *nam, Int_t dim, const Double_t * const first, const Double_t * const last);
+  TH1D *ProjectOn(const char *nam, Int_t dim, const Int_t * const first=0, const Int_t * const last=0) const;
+  TH1D *ProjectOn(const char *nam, Int_t dim, const Double_t * const first, const Double_t * const last) const;
   // project on 2-dim histogram
-  TH2D *ProjectOn(char *nam, Int_t dim0, Int_t dim1, const Int_t * const first=0, const Int_t * const last=0) const;
-  void  OneToMul(Int_t n, Int_t *k) const;      // calc n-dim indices from 1-dim index
+  TH2D *ProjectOn(const char *nam, Int_t dim0, Int_t dim1, const Int_t * const first=0, const Int_t * const last=0) const;
+  TH2D *ProjectOn(const char *nam, Int_t dim0, Int_t dim1, const Double_t * const first, const Double_t * const last) const;
+  void OneToMul(Int_t n, Int_t *k) const;      // calc n-dim indices from 1-dim index
 
  protected: