// $Header: LookUp2d.h $
// one dimensional lookup table
// Version 1.0 7-Jan-1999 Richard creation

#ifndef LOOKUP2D_H
#define LOOKUP2D_H

#include "TObject.h"
#include "TString.h"

class LookUp2d : public TObject {

public:
  LookUp2d(TString name, Float_t* key1, Float_t* key2, Float_t* matrix, 
	   Int_t numBins1, Int_t numBins2); // constructor
  ~LookUp2d(); // destructor

  Float_t interpolateVal(Float_t val1, Float_t val2, Int_t* rc); // do the interpolation
  TString* getName() {return &m_name;} // get name of table

private:

  TString m_name; // name of table
  Int_t m_numBins1; // number of bins in first dimension
  Int_t m_numBins2; // number of bins in second dimension
  Float_t *m_key1; //  coordinates of table in first dim
  Float_t *m_key2; //  coordinates of table in second dim
  Float_t *m_matrix; // values of table at gridpoints

public:
  ClassDef(LookUp2d,0)    //  Class for a single 2-d lookup table
};

#endif
