ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
surface_grid_reader.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s)
12#include "detray/builders/detector_builder.hpp"
13#include "detray/builders/grid_builder.hpp"
14#include "detray/core/concepts.hpp"
15#include "detray/io/backend/detail/grid_reader.hpp"
16#include "detray/io/frontend/payloads.hpp"
17
18// System include(s)
19#include <string_view>
20
21namespace detray::io {
22
26template <class surface_descriptor_t,
27 typename CAP = std::integral_constant<std::size_t, 9>,
28 typename DIM = std::integral_constant<std::size_t, 2>>
30 : public detail::grid_reader<surface_descriptor_t, grid_builder, CAP, DIM> {
31 using grid_reader_t =
32 detail::grid_reader<surface_descriptor_t, grid_builder, CAP, DIM>;
33 using base_type = grid_reader_t;
34
35 public:
37 static constexpr std::string_view tag = "surface_grids";
38
41
43 using base_type::base_type;
44
50 template <concepts::detector detector_t>
51 static void from_payload(detector_builder<typename detector_t::metadata,
52 volume_builder> &det_builder,
53 const payload_type &grids_data) {
54 DETRAY_VERBOSE_HOST("Reading payload object...");
55
56 grid_reader_t::template from_payload<detector_t>(det_builder, grids_data);
57 }
58};
59
60} // namespace detray::io
Provides functionality to build a detray detector volume by volume.
Definition detector_builder.hpp:40
Surface grid reader backend.
Definition surface_grid_reader.hpp:30
static constexpr std::string_view tag
Tag the reader as "surface_grids".
Definition surface_grid_reader.hpp:37
static void from_payload(detector_builder< typename detector_t::metadata, volume_builder > &det_builder, const payload_type &grids_data)
Convert the detector grids grids_data from their IO payload.
Definition surface_grid_reader.hpp:51
detector_grids_payload< std::size_t, io::accel_id > payload_type
Payload type that the reader processes.
Definition surface_grid_reader.hpp:40
Provides basic functionality to build detector volumes.
Definition volume_builder.hpp:36
The following enums are global for all detectors.
Definition concepts.hpp:18
A payload for the grid collections of a detector.
Definition payloads.hpp:344