// Test to load field map and dump out field at a point #include #include #include #include "IFieldManager.hxx" #include "IFieldMap.hxx" #include "IFieldMapList.hxx" #include "IFieldPlotter.hxx" #include "IFieldMapLoader.hxx" #include #include #include "Rtypes.h" #include "TVector3.h" #include "TFile.h" #include "TH1.h" #include "TH2.h" #include "TRotation.h" using std::cout; using std::endl; std::ostream& operator<<(std::ostream& stream,const TVector3& vect){ stream<<"("< Set the output filename. \n" " -o Set the centre of the plane to draw from (in input file units, typically mm). \n" " -u Set the up-vector for the output plane. Used to define the output plot's y-axis. \n" " -N Set the normal of the plane to work in. \n" " -n Set the number of steps to used in either direction \n" " -d Set the step size (in input file units, typically mm) \n" " -p Set the number of planes to scan through \n" "\n" "Examples: \n" "Load in three fieldmap files and flip the field for each one.\n" "Then plot the field looking down onto the X-Z plane and centred at\n" "(5600,10,1800) in global ICEDUST coordinates, in steps of 10 mm, with 610\n" "points in either direction (ie. 1220 points for each dimension). \n" "\n" " oaEMField_PlotFieldMaps.exe -f seg_1.map -s-1 -f seg_2.map -s-1 -f arc_1.map -s-1 -o '5600 10 1800' -N '0 1 0' -u '0 0 1' -d10 -n610 \n" "\n" "Reload a field description from a root file (an output oaEvent file or previous "<>vect[0]>>vect[1]>>vect[2]; plotter.SetOrigin(vect[0],vect[1],vect[2]); break; } case 'N': { double vect[3]; stream>>vect[0]>>vect[1]>>vect[2]; plotter.SetNormal(vect[0],vect[1],vect[2]); break; } case 'u': { double vect[3]; stream>>vect[0]>>vect[1]>>vect[2]; plotter.SetUpVector(vect[0],vect[1],vect[2]); break; } case 'n': { int n_steps=0; stream>>n_steps; plotter.SetNSteps(n_steps); break; } case 'O': { stream>>outfilename; break; } case 'p': { stream>>n_planes; break; } case 'd': { double step_size; stream>>step_size; plotter.SetStepSize(step_size); break; } case 'h':case '?': Usage(argv[0], loader.UsageMessage()); return 0; default: cout<<"Error: Unknown option: "<Write(); outfile->Close(); return 0; }