#ifndef HRTGRID_H
#define HRTGRID_H
#include "TObject.h"
#include "hrtmatrix.h"
#include "hrttypes.h"
#include "hrtmeasurement.h"
class HRtGrid : public TObject {
public:
enum EState {kOk,kOutOfBounds};
HRtGrid(void);
~HRtGrid(void);
void setDimension(Int_t d, const UInt_t siz[]);
void setRange(UInt_t i, Float_t min, Float_t max);
Float_t getMinimum(UInt_t i) { return fMin[i]; }
Float_t getMaximum(UInt_t i) { return fMax[i]; }
Float_t getBinCenter(UInt_t var, UInt_t bin);
Float_t getBinSize(UInt_t var) { return fStep[var]; }
Float_t getMidValue(UInt_t var) { return (fMax[var]-fMin[var])/2.; }
UInt_t getBins(UInt_t i) { return fBins[i]; }
HRtMeasurement &bin(UInt_t point[]);
HRtMeasurement &bin(Float_t point[]);
HRtMeasurement &bin(const HRtVector &v);
UInt_t *getCurrentBin(void) { return fIdx; }
UInt_t getCurrentAddress(void) { return fCurrentAddress; }
void fillCurrentBinCoord(HRtVector &out);
Int_t getDimension(void) { return fDimension; }
EState getStatus(void) { return fState; }
void print(Int_t v,UInt_t point[]) { printf("%f\n",bin(point)[v]); }
protected:
UInt_t fDimension;
Int_t fSize;
HRtMeasurement *fCells;
UInt_t *fBins;
UInt_t *fIdx;
Float_t *fMin;
Float_t *fFirstBin;
Float_t *fMax;
Float_t *fStep;
UInt_t fCurrentAddress;
Int_t fTotalBins;
void freeMemory(void);
enum EState fState;
public:
ClassDef(HRtGrid,1)
};
#endif
Last change: Sat May 22 13:11:38 2010
Last generated: 2010-05-22 13:11
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.