00001 #ifndef StMagF_H
00002 #define StMagF_H
00003 #include "Rtypes.h"
00004 #include "TNamed.h"
00005 #include "StarMagField/StarMagField.h"
00006 #ifndef __CINT__
00007 #include "StarCallf77.h"
00008 #define gufld F77_NAME(gufld,GUFLD)
00009 R__EXTERN "C" {
00010 void type_of_call gufld(Float_t *x, Float_t *bf);
00011 }
00012 #endif
00013 class StMagF : public TNamed {
00014 public:
00015 static void Agufld(float *x, float *b);
00016 ClassDef(StMagF,0)
00017 };
00018 inline void StMagF::Agufld(float *x, float *b) {
00019 static StarMagField *mag = StarMagField::Instance();
00020 double xx[3]={x[0],x[1],x[2]}, bb[3];
00021 mag->BField(xx,bb);
00022 b[0]=bb[0]; b[1]=bb[1]; b[2]=bb[2];
00023 }
00024 #endif