////////////////////////////////////////////////////////////////////////////
// $Id: BfldValidate.h,v 1.7 2005/08/26 19:14:53 rhatcher Exp $
// 
// BfldValidate
// 
// BfldValidate tests the Bfld structures
//
// Author:  R. Hatcher 2000.06.20
//
////////////////////////////////////////////////////////////////////////////

#ifndef BFLDVALIDATE_H
#define BFLDVALIDATE_H

#include "TObject.h"

#include "BField/BField.h"
#include "Conventions/Munits.h"
#include "Validity/VldContext.h"

class BfldValidate : public TObject {

 public:

   BfldValidate();
   virtual ~BfldValidate();

   void SetDetector(Detector::Detector_t detector 
                        = Detector::kNear);

   void TestLoanPool();
   void TestInterpMethods(Int_t coarseness = -1,
                          Float_t x = 22.5*Munits::cm,
                          Float_t y = 22.5*Munits::cm);
   void DrawMap(Int_t coarseness=-1, Int_t mapid=142, 
                Float_t x0=0.*Munits::cm, Float_t y0=0.*Munits::cm,
                Float_t half=420.*Munits::cm, Float_t spacing=5.*Munits::cm,
                Int_t interpolant=1);

 protected:

   void PrintPair(const Char_t *tag, TVector3 &xyz, TVector3 &bxyz); 
   void DrawOutline(const Detector::Detector_t detector);
   void DrawNearOutline();
   void DrawFarOutline();

   Detector::Detector_t      fDetector;
   VldContext                fVldContext;

 private:

   ClassDef(BfldValidate,1)  // BfldValidate version 1
};

#endif // BFLDVALIDATE_H
