Streamable data members required for PROOF.
[u/mrichter/AliRoot.git] / CORRFW / AliCFGridSparse.h
CommitLineData
db6722a5 1#ifndef ALICFGRIDSPARSE_H
2#define ALICFGRIDSPARSE_H
3//--------------------------------------------------------------------//
4// //
5// AliCFGridSparse.cxx Class //
6// Class to handle N-dim maps for the correction Framework //
7// uses a THnSparse to store the grid //
8// Author:S.Arcelli, silvia.arcelli@cern.ch
9//--------------------------------------------------------------------//
10
11#include "AliCFVGrid.h"
12#include "THnSparse.h"
13#include "AliLog.h"
14class TH1D;
15class TH2D;
16class TH3D;
17
18class AliCFGridSparse : public AliCFVGrid
19{
20 public:
21 AliCFGridSparse();
22 AliCFGridSparse(const Char_t* name,const Char_t* title);
23 AliCFGridSparse(const Char_t* name, const Char_t* title, const Int_t nVarIn, const Int_t* nBinIn, const Double_t *binLimitsIn=0);
24 AliCFGridSparse(const AliCFGridSparse & c);
25
26 virtual ~AliCFGridSparse();
27 AliCFGridSparse& operator=(const AliCFGridSparse& corr) ;
28 virtual void SetBinLimits(Int_t ivar, Double_t * array);
db6722a5 29
30 virtual void Fill(Double_t *var, Double_t weight=1.);
31
32 virtual Float_t GetOverFlows(Int_t var) const;
33 virtual Float_t GetUnderFlows(Int_t var)const;
34 virtual Float_t GetEntries()const;
35
36 virtual Float_t GetElement(Int_t iel)const;
37 virtual Float_t GetElement(Int_t *bin)const;
38 virtual Float_t GetElement(Double_t *var)const;
39
40 virtual Float_t GetElementError(Int_t iel)const;
41 virtual Float_t GetElementError(Int_t *bin)const;
42 virtual Float_t GetElementError(Double_t *var)const;
43
44 virtual void SetElement(Int_t iel, Float_t val);
45 virtual void SetElement(Int_t *bin, Float_t val);
46 virtual void SetElement(Double_t *var, Float_t val);
47 virtual void SetElementError(Int_t iel, Float_t val);
48 virtual void SetElementError(Int_t *bin, Float_t val) ;
49 virtual void SetElementError(Double_t *var, Float_t val);
50
51 virtual TH1D* Project( Int_t ivar) const;
52 virtual TH2D* Project( Int_t ivar1, Int_t ivar2) const;
53 virtual TH3D* Project( Int_t ivar1, Int_t ivar2,Int_t ivar3) const;
54 virtual TH1D* Slice( Int_t, Double_t *, Double_t *) const {AliInfo("Not yet implemented!"); return 0x0;};
55
56
57 //basic operations
58
59 virtual void SumW2();
60 virtual void Add(AliCFVGrid* aGrid, Double_t c=1.);
61 virtual void Add(AliCFVGrid* aGrid1 ,AliCFVGrid* aGrid2, Double_t c1=1.,Double_t c2=1.);
62 virtual void Multiply(AliCFVGrid* aGrid, Double_t c=1.);
63 virtual void Multiply(AliCFVGrid* aGrid1,AliCFVGrid* aGrid2, Double_t c1=1.,Double_t c2=1.);
64 virtual void Divide(AliCFVGrid* aGrid, Double_t c=1.);
65 virtual void Divide(AliCFVGrid* aGrid1, AliCFVGrid* aGrid2, Double_t c1=1., Double_t c2=1.,Option_t *option=0);
66
7411edfd 67 virtual void Rebin(const Int_t* group);
68
db6722a5 69 THnSparse *GetGrid() const {return fData;};// Getter for the data Container: a THnSparse
70
71 virtual void Copy(TObject& c) const;
72
73
74 protected:
75
db6722a5 76 THnSparse *fData;// The data Container: a THnSparse
318f64b1 77 ClassDef(AliCFGridSparse,2);
db6722a5 78};
79
80#endif
81