12 int main(
int argc,
char* argv[])
14 ifstream fin(argv[1]);
17 TFile saveFile(argv[2],
"recreate");
18 TTree* saveTree =
new TTree(
"fieldmap",
"fieldmap");
20 float x, y, z, bx, by, bz;
22 saveTree->Branch(
"x", &x,
"x/F");
23 saveTree->Branch(
"y", &y,
"y/F");
24 saveTree->Branch(
"z", &z,
"z/F");
25 saveTree->Branch(
"Bx", &bx,
"Bx/F");
26 saveTree->Branch(
"By", &by,
"By/F");
27 saveTree->Branch(
"Bz", &bz,
"Bz/F");
30 while(getline(fin, line))
32 stringstream ss(line);
33 ss >> x >> y >> z >> bx >> by >> bz;
int main(int argc, char *argv[])