00001 00002 // $Id: BfldHandler.h,v 1.7 2005/02/03 22:35:49 rhatcher Exp $ 00003 // 00004 // BfldHandler 00005 // 00006 // BfldHandler searches BfldMesh structures (geometry) and interpolates 00007 // the values found in BfldMap structures (field values). 00008 // 00009 // Author: R. Hatcher 2000.06.20 00010 // 00012 00013 #ifndef BFLDHANDLER_H 00014 #define BFLDHANDLER_H 00015 00016 #include "BField/BfldInterpMethod.h" 00017 00018 #include "TVector3.h" 00019 00020 class BfldCache; 00021 class BfldMap; 00022 class BfldMesh; 00023 00024 class BfldHandler : public TObject { 00025 00026 public: 00027 BfldHandler(); 00028 virtual ~BfldHandler(); 00029 00030 // this the usual method a user calls 00031 // it should NOT be overloaded/specialized 00032 TVector3 GetBField(const TVector3& position, Bool_t isUVZ); 00033 00034 // all handlers must implement this method 00035 // this is where the actual interpolation occurs 00036 virtual TVector3 GetBFieldMeshCoord(const TVector3& position) = 0; 00037 00038 BfldMap* GetMap() const { return fMap; } 00039 00040 void SetCache(BfldCache* cache) { fCache = cache; } 00041 void SetLastPolygAsSeed() { fUseLastAsSeed = kTRUE; } 00042 00043 // each specialized class will have a different handling of kDefault 00044 // and disallow values that don't make sense 00045 virtual void SetInterpMethod(const BfldInterpMethod::InterpMethod_t method); 00046 00047 // these must be virtual since Voronoi version does something special 00048 virtual void SetMap(BfldMap* map); 00049 virtual void SetMesh(BfldMesh* mesh); 00050 00051 protected: 00052 00053 BfldInterpMethod::InterpMethod_t fInterpMethod; 00054 Bool_t fUseLastAsSeed; 00055 00056 BfldCache *fCache; 00057 BfldMap *fMap; 00058 BfldMesh *fMesh; 00059 00060 private: 00061 00062 ClassDef(BfldHandler,1) 00063 }; 00064 00065 #endif // BFLDHANDLER_H
1.3.9.1