Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 09:44:12

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Utilities/AxisSpec.hpp"
0012 #include "Acts/Utilities/MultiAxisSpec.hpp"
0013 #include "ActsPlugins/Json/ActsJson.hpp"
0014 
0015 #include <nlohmann/json.hpp>
0016 
0017 /// @namespace Acts::AxisSpecJsonConverter
0018 /// @ingroup json_plugin
0019 
0020 namespace Acts::AxisSpecJsonConverter {
0021 
0022 /// @addtogroup json_plugin
0023 /// @{
0024 
0025 /// Write the AxisSpec to a json object
0026 ///
0027 /// @param axisSpec the axis spec to be written out
0028 /// @return JSON object representing the axis spec
0029 nlohmann::json toJson(const AxisSpec& axisSpec);
0030 
0031 /// Create an AxisSpec from a json object
0032 ///
0033 /// @param j the json object to be read from
0034 /// @return AxisSpec created from the JSON object
0035 AxisSpec fromJson(const nlohmann::json& j);
0036 
0037 /// @}
0038 
0039 }  // namespace Acts::AxisSpecJsonConverter
0040 
0041 /// @namespace Acts::MultiAxisSpecJsonConverter
0042 /// @ingroup json_plugin
0043 
0044 namespace Acts::MultiAxisSpecJsonConverter {
0045 
0046 /// @addtogroup json_plugin
0047 /// @{
0048 
0049 /// Write the MultiAxisSpec to a json object
0050 ///
0051 /// @param multiAxisSpec the multi-axis spec to be written out
0052 /// @return JSON object representing the multi-axis spec
0053 nlohmann::json toJson(const MultiAxisSpec& multiAxisSpec);
0054 
0055 /// Create a MultiAxisSpec from a json object
0056 ///
0057 /// @param j the json object to be read from
0058 /// @return MultiAxisSpec created from the JSON object
0059 MultiAxisSpec fromJson(const nlohmann::json& j);
0060 
0061 /// @}
0062 
0063 }  // namespace Acts::MultiAxisSpecJsonConverter