File indexing completed on 2025-01-30 09:15:19
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/Json/VolumeJsonConverter.hpp"
0010
0011 #include "Acts/Geometry/TrackingVolume.hpp"
0012 #include "Acts/Plugins/Json/GeometryJsonKeys.hpp"
0013 #include "Acts/Plugins/Json/MaterialJsonConverter.hpp"
0014
0015 void Acts::to_json(
0016 nlohmann::json& j,
0017 const std::pair<const Acts::TrackingVolume*,
0018 std::shared_ptr<const Acts::IVolumeMaterial>>& volume) {
0019 j[Acts::jsonKey().namekey] = volume.first->volumeName();
0020 to_json(j, volume.second.get());
0021 }
0022
0023 void Acts::to_json(nlohmann::json& j, const Acts::TrackingVolume& volume) {
0024 j[Acts::jsonKey().namekey] = volume.volumeName();
0025 if (volume.volumeMaterial() != nullptr) {
0026 to_json(j, volume.volumeMaterial());
0027 }
0028 return;
0029 }