1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice
6 // Class for AliHFEcollection
7 // Serves as a data container - currently based on internal TList
10 // Markus Fasel <M.Fasel@gsi.de>
11 // Matus Kalisky <matus.kalisky@cern.ch> (contact)
16 // Provides an option for storing and creating histograms outside the
18 // the performance will be improved once the TMap is used insted of TTree
26 #ifndef ALIHFECOLLECTION_H
27 #define ALIHFECOLLECTION_H
33 #ifndef ROOT_THashList
34 #include "THashList.h"
40 class AliHFEcollection : public TNamed{
44 AliHFEcollection(const char* name, const char* title);
45 AliHFEcollection(const AliHFEcollection &c);
46 AliHFEcollection &operator=(const AliHFEcollection &c);
47 virtual ~AliHFEcollection();
50 virtual void Browse(TBrowser *b);
51 virtual Bool_t IsFolder() const { return kTRUE; }
53 // Set & Create functions
54 Bool_t CreateTH1F(const char* name, const char* title, Int_t nBin, Float_t nMin, Float_t nMax, Int_t logAxis = -1);
55 Bool_t CreateTH1Farray(const char* name, const char* title, Int_t nBin, const Double_t* xbins);
57 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);
58 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);
59 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);
61 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);
62 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);
63 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);
64 Bool_t CreateProfile(const char* name, const char* title, Int_t nbins, Double_t xmin, Double_t xmax);
65 Bool_t CreateTHnSparse(const char* name, const char* title, Int_t dim, const Int_t* nbins, const Double_t* xmin, const Double_t* xmax);
66 Bool_t CreateTHnSparseNoLimits(const char* name, const char* title, Int_t dim, const Int_t* nbins);
68 Bool_t BinLogAxis(const char* name, Int_t dim);
69 Bool_t Sumw2(const char*name);
72 Long64_t Merge(const TCollection *list);
73 virtual void Print(Option_t *) const;
76 TList* GetList() const { return fList; }
77 TObject* Get(const char* name);
80 Bool_t Fill(const char* name, Double_t v);
81 Bool_t Fill(const char* name, Int_t v);
82 Bool_t Fill(const char* name, Int_t X, Double_t v);
83 Bool_t Fill(const char* name, Int_t X, Int_t Y, Double_t v);
84 Bool_t Fill(const char* name, Double_t v1, Double_t v2);
85 Bool_t Fill(const char* name, Int_t X, Double_t v1, Double_t v2);
86 Bool_t Fill(const char* name, Double_t v1, Double_t v2, Double_t v3);
87 Bool_t Fill(const char* name, Double_t* entry, Double_t weight = 1);
89 Bool_t CheckObject(const char* name);
90 void Copy(TObject &ref) const;
93 THashList* fList; // Object container
95 ClassDef(AliHFEcollection, 1)