File indexing completed on 2026-07-26 08:22:19
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "read_surfaces.hpp"
0010
0011 #include "traccc/io/csv/dfe.hpp"
0012 #include "traccc/io/csv/make_surface_reader.hpp"
0013
0014 namespace traccc::io::csv {
0015
0016 std::map<geometry_id, transform3> read_surfaces(std::string_view filename) {
0017
0018 auto reader = make_surface_reader(filename);
0019
0020
0021 std::map<geometry_id, transform3> result;
0022 surface surf;
0023 while (reader.read(surf)) {
0024 result.insert({surf.geometry_id,
0025 transform3{vector3{surf.cx, surf.cy, surf.cz},
0026 vector3{surf.rot_xw, surf.rot_yw, surf.rot_zw},
0027 vector3{surf.rot_xu, surf.rot_yu, surf.rot_zu}}});
0028 }
0029 return result;
0030 }
0031
0032 }