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

//                                                                      
// Class for AliHFEcollection                                           
// Serves as a data container - currently based on internal TList      
//                                                                      
// Authors:                                                             
//   Markus Fasel  <M.Fasel@gsi.de>                                    
//   Matus Kalisky <matus.kalisky@cern.ch>  (contact)                   
//


//
// Provides an option for storing and creating histograms outside the
// analysis class
// the performance will be improved once the TMap is used insted of TTree
//

/*
 * vesion: 1.0.1
 */


#ifndef ALIHFECOLLECTION_H
#define ALIHFECOLLECTION_H

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

#ifndef ROOT_THashList
#include "THashList.h"
#endif

class TCollection;
class TBrowser;

class AliHFEcollection : public TNamed{

 public:
  AliHFEcollection();
  AliHFEcollection(const char* name, const char* title);
  AliHFEcollection(const AliHFEcollection &c);
  AliHFEcollection &operator=(const AliHFEcollection &c);
  virtual ~AliHFEcollection();
  

  virtual void Browse(TBrowser *b);
  virtual Bool_t IsFolder() const { return kTRUE; }

  // Set & Create functions
  Bool_t CreateTH1F(const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
  Bool_t CreateTH1Farray(const char* name, const char* title, Int_t nBin, const Double_t* xbins);

  Bool_t CreateTH2F(const char* name, const char* title, Int_t nBinX, Float_t nMinX, Float_t nMaxX, Int_t nBinY, Float_t nMinY, Float_t nMaxY, Int_t logAxis = -1);
  Bool_t CreateTH2Farray(const char* name, const char* title, Int_t nBin, const Double_t* xbins, Int_t nBinY, Float_t nMinY, Float_t nMaxY);
  Bool_t CreateTH3F(const char* name, const char* title, Int_t nBinX, Float_t nMinX, Float_t nMaxX, Int_t nBinY, Float_t nMinY, Float_t nMaxY, Int_t nBinZ, Float_t minZ, Float_t maxZ, Int_t logAxis = -1);

  Bool_t CreateTH1Fvector1(Int_t X, const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
  Bool_t CreateTH1Fvector2(Int_t X, Int_t Y, const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
  Bool_t CreateTH2Fvector1(Int_t X, const char* name, const char* title, Int_t nBinX, Float_t nMinX, Float_t nMaxX, Int_t nBinY, Float_t nMinY, Float_t nMaxY, Int_t logAxis = -1);
  Bool_t CreateProfile(const char* name, const char* title, Int_t nbins, Double_t xmin, Double_t xmax);
  Bool_t CreateTHnSparse(const char* name, const char* title, Int_t dim, const Int_t* nbins, const Double_t* xmin, const Double_t* xmax);
  Bool_t CreateTHnSparseNoLimits(const char* name, const char* title, Int_t dim, const Int_t* nbins);

  Bool_t BinLogAxis(const char* name, Int_t dim);
  Bool_t Sumw2(const char*name);
    

  Long64_t Merge(const TCollection *list);
  virtual void Print(Option_t *) const;

  // Get functions
  TList* GetList() const { return fList; }
  TObject* Get(const char* name); 

  // Fill functions
  Bool_t Fill(const char* name, Double_t v);
  Bool_t Fill(const char* name, Int_t v);
  Bool_t Fill(const char* name, Int_t X, Double_t v);
  Bool_t Fill(const char* name, Int_t X, Int_t Y, Double_t v);
  Bool_t Fill(const char* name, Double_t v1, Double_t v2);
  Bool_t Fill(const char* name, Int_t X, Double_t v1, Double_t v2);
  Bool_t Fill(const char* name, Double_t v1, Double_t v2, Double_t v3);
  Bool_t Fill(const char* name, Double_t* entry, Double_t weight = 1);
 private:
  Bool_t CheckObject(const char* name);
   void Copy(TObject &ref) const;

 private:
  THashList*                           fList;      // Object container

  ClassDef(AliHFEcollection, 1)

};

#endif
 AliHFEcollection.h:1
 AliHFEcollection.h:2
 AliHFEcollection.h:3
 AliHFEcollection.h:4
 AliHFEcollection.h:5
 AliHFEcollection.h:6
 AliHFEcollection.h:7
 AliHFEcollection.h:8
 AliHFEcollection.h:9
 AliHFEcollection.h:10
 AliHFEcollection.h:11
 AliHFEcollection.h:12
 AliHFEcollection.h:13
 AliHFEcollection.h:14
 AliHFEcollection.h:15
 AliHFEcollection.h:16
 AliHFEcollection.h:17
 AliHFEcollection.h:18
 AliHFEcollection.h:19
 AliHFEcollection.h:20
 AliHFEcollection.h:21
 AliHFEcollection.h:22
 AliHFEcollection.h:23
 AliHFEcollection.h:24
 AliHFEcollection.h:25
 AliHFEcollection.h:26
 AliHFEcollection.h:27
 AliHFEcollection.h:28
 AliHFEcollection.h:29
 AliHFEcollection.h:30
 AliHFEcollection.h:31
 AliHFEcollection.h:32
 AliHFEcollection.h:33
 AliHFEcollection.h:34
 AliHFEcollection.h:35
 AliHFEcollection.h:36
 AliHFEcollection.h:37
 AliHFEcollection.h:38
 AliHFEcollection.h:39
 AliHFEcollection.h:40
 AliHFEcollection.h:41
 AliHFEcollection.h:42
 AliHFEcollection.h:43
 AliHFEcollection.h:44
 AliHFEcollection.h:45
 AliHFEcollection.h:46
 AliHFEcollection.h:47
 AliHFEcollection.h:48
 AliHFEcollection.h:49
 AliHFEcollection.h:50
 AliHFEcollection.h:51
 AliHFEcollection.h:52
 AliHFEcollection.h:53
 AliHFEcollection.h:54
 AliHFEcollection.h:55
 AliHFEcollection.h:56
 AliHFEcollection.h:57
 AliHFEcollection.h:58
 AliHFEcollection.h:59
 AliHFEcollection.h:60
 AliHFEcollection.h:61
 AliHFEcollection.h:62
 AliHFEcollection.h:63
 AliHFEcollection.h:64
 AliHFEcollection.h:65
 AliHFEcollection.h:66
 AliHFEcollection.h:67
 AliHFEcollection.h:68
 AliHFEcollection.h:69
 AliHFEcollection.h:70
 AliHFEcollection.h:71
 AliHFEcollection.h:72
 AliHFEcollection.h:73
 AliHFEcollection.h:74
 AliHFEcollection.h:75
 AliHFEcollection.h:76
 AliHFEcollection.h:77
 AliHFEcollection.h:78
 AliHFEcollection.h:79
 AliHFEcollection.h:80
 AliHFEcollection.h:81
 AliHFEcollection.h:82
 AliHFEcollection.h:83
 AliHFEcollection.h:84
 AliHFEcollection.h:85
 AliHFEcollection.h:86
 AliHFEcollection.h:87
 AliHFEcollection.h:88
 AliHFEcollection.h:89
 AliHFEcollection.h:90
 AliHFEcollection.h:91
 AliHFEcollection.h:92
 AliHFEcollection.h:93
 AliHFEcollection.h:94
 AliHFEcollection.h:95
 AliHFEcollection.h:96
 AliHFEcollection.h:97
 AliHFEcollection.h:98
 AliHFEcollection.h:99