Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:19

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2022 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 // Local include(s).
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   // Construct the surface reader object.
0018   auto reader = make_surface_reader(filename);
0019 
0020   // Fill an std::map with entries from the file.
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 }  // namespace traccc::io::csv