Some cleaning and simplification in container-related classes and
[u/mrichter/AliRoot.git] / CORRFW / AliCFFrame.h
CommitLineData
563113d0 1#ifndef ALICFFRAME_H
2#define ALICFFRAME_H
3
4/* $Id$ */
5
6//--------------------------------------------------------------------//
7// //
8// AliCFFrame.cxx Class //
9// Class to handle input data for correction Framework //
10// //
11//--------------------------------------------------------------------//
12
9f6be3a2 13#include "TNamed.h"
1e9dad92 14
563113d0 15class AliCFFrame : public TNamed
16{
17 public:
18 AliCFFrame();
19 AliCFFrame(const Char_t* name,const Char_t* title);
1e9dad92 20 AliCFFrame(const Char_t* name, const Char_t* title, const Int_t nVarIn, const Int_t* nBinIn, const Double_t *binLimitsIn=0);
563113d0 21 AliCFFrame(const AliCFFrame & c);
22
23 virtual ~AliCFFrame();
24 AliCFFrame& operator=(const AliCFFrame& corr);
25 virtual void PrintBinLimits();
26 virtual void PrintNBins();
1e9dad92 27 virtual void SetBinLimits(Int_t ivar, Double_t * array);
28 virtual void GetBinLimits(Int_t ivar, Double_t * array) const;
563113d0 29 virtual Int_t GetBinIndex(Int_t *ibin) const;
30 virtual void GetBinIndex(Int_t iel, Int_t *ibin) const;
31 virtual Int_t GetBinIndex(Int_t ivar, Int_t ind) const;
32 virtual Int_t GetNDim() const {return fNDim;};
33 virtual Int_t GetNVar() const {return fNVar;};
34 virtual Int_t GetNBins(Int_t ivar) const {return fNVarBins[ivar];};
35 virtual Int_t GetNBinLimits() const {return fNVarBinLimits;};
36 virtual Int_t *GetNBins() const {return fNVarBins;};
1e9dad92 37 virtual Double_t *GetBinLimits() const {return fVarBinLimits;};
38 virtual Double_t GetBinCenter(Int_t ivar,Int_t ibin) const;
39 virtual Double_t GetBinSize(Int_t ivar,Int_t ibin) const;
40 virtual void GetBinCenters(Int_t *ibin, Double_t *binCenter) const;
41 virtual void GetBinSizes(Int_t *ibin, Double_t *binSizes) const;
563113d0 42
43 //basic operations
44
45 virtual void Copy(TObject& c) const;
46 virtual void Save(const Char_t *outfile) const;
47
48 protected:
49 Int_t fNVar; //number of variables in the grid
50 Int_t fNDim; //Overall number of elements in the grid
51 Int_t fNVarBinLimits; //total number of bin limits
52 Int_t *fNVarBins; //[fNVar] size of the grid in each dimension (binning)
53 Int_t *fIndex;//[fNVar] current N-dim index on the grid
54 Int_t *fProduct;//[fNVar] current N-dim index on the grid
55 Int_t *fOffset;//[fNVar] current N-dim index on the grid
1e9dad92 56 Double_t *fVarBinLimits;//[fNVarBinLimits] array defining the binLimits
563113d0 57
58
1e9dad92 59 ClassDef(AliCFFrame,2);
563113d0 60};
61
62#endif
63