Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-11 09:40:23

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/Geometry/TrackingVolume.hpp"
0012 #include "Acts/Material/IVolumeMaterial.hpp"
0013 #include "ActsPlugins/Json/ActsJson.hpp"
0014 
0015 #include <memory>
0016 #include <string>
0017 #include <utility>
0018 #include <vector>
0019 
0020 #include <nlohmann/json.hpp>
0021 
0022 // Custom Json encoder/decoders. Naming is mandated by nlohmann::json and thus
0023 // can not match our naming guidelines.
0024 namespace Acts {
0025 class IVolumeMaterial;
0026 class TrackingVolume;
0027 
0028 /// Convert tracking volume and material pair to JSON
0029 /// @param j Destination JSON object
0030 /// @param volume Source tracking volume and material pair to convert
0031 void to_json(
0032     nlohmann::json& j,
0033     const std::pair<const Acts::TrackingVolume*,
0034                     std::shared_ptr<const Acts::IVolumeMaterial>>& volume);
0035 
0036 /// Convert TrackingVolume to JSON
0037 /// @param j Destination JSON object
0038 /// @param volume Source TrackingVolume to convert
0039 void to_json(nlohmann::json& j, const Acts::TrackingVolume& volume);
0040 
0041 }  // namespace Acts