{ // ROOT Script to calculate the magnetic field at any given point. gROOT->Reset(); gSystem.Load( "libBlast.so" ); Setup(); float x, y, z; float * b; cout << "\nEnter x, y, and z coordinates in [cm].\n" << endl; while( cin >> x >> y >> z ) { b = gField->Field( x, y, z ); cout << "\n" << "Bx = " << 1000.0 * (*(b )) << " [G] " << "By = " << 1000.0 * (*(b+1)) << " [G] " << "Bz = " << 1000.0 * (*(b+2)) << " [G] " << endl; cout << "\nEnter x, y, and z coordinates in [cm].\n" << endl; } }