Lets assume I have a .txt file with the following content:
New entry.
R 445.24
Z 4713.5
Data
-218.474 -1127.02 261.511
-268.049 -1384.29 245.665
-275.05 -1420.62 243.428
-285.106 -1472.8 240.214
-301.545 -1558.11 234.959
-366.24 -1893.84 214.281
-380.351 -1967.07 209.771
-436.455 -2258.21 191.838
-493.221 -2552.79 173.694
-652.165 -3377.61 122.891
-724.069 -3750.75 99.9089
-806.379 -4177.89 73.6002
Result -85.4974 -436.954 304.014
New entry.
R 2600
Z 3428.47
Data
-218.474 -1127.02 261.511
-268.049 -1384.29 245.665
-275.05 -1420.62 243.428
-285.106 -1472.8 240.214
-301.545 -1558.11 234.959
-366.24 -1893.84 214.281
-380.351 -1967.07 209.771
-436.455 -2258.21 191.838
-493.221 -2552.79 173.694
-652.165 -3377.61 122.891
-724.069 -3750.75 99.9089
-806.379 -4177.89 73.6002
Result -493.221 -2552.79 173.694
...
I would now like to read in the values and save the R, Z, Data and Result values and keep them connected so I can access them easily. The data and result entries are 3D vectors and while Result, R and Z always have exactly one entry, the number of entries in Data can vary. What is the best way to do this? Thanks!