Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:20:32

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file larceler/detail/LarRunnerDiagnosticsIO.json.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <nlohmann/json.hpp>
0010 
0011 #include "corecel/io/JsonUtils.json.hh"
0012 #include "celeritas/phys/GeneratorCountersIO.json.hh"  // IWYU pragma: keep
0013 
0014 #include "LarRunnerDiagnostics.hh"
0015 
0016 namespace celeritas
0017 {
0018 namespace detail
0019 {
0020 //---------------------------------------------------------------------------//
0021 
0022 void to_json(nlohmann::json& j, LarTiming const& v)
0023 {
0024     j = {
0025         CELER_JSON_PAIR(v, setup),
0026         CELER_JSON_PAIR(v, run),
0027         CELER_JSON_PAIR(v, teardown),
0028         CELER_JSON_PAIR(v, actions),
0029         CELER_JSON_PAIR(v, steps),
0030     };
0031 }
0032 
0033 void to_json(nlohmann::json& j, LarRunnerDiagnostics const& v)
0034 {
0035     j = {
0036         CELER_JSON_PAIR(v, time),
0037         CELER_JSON_PAIR(v, counters),
0038     };
0039 }
0040 
0041 //---------------------------------------------------------------------------//
0042 }  // namespace detail
0043 }  // namespace celeritas