Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:29

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2022-2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file celeritas/phys/PhysicsParamsOutput.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 #include <memory>
0010 
0011 #include "corecel/io/OutputInterface.hh"
0012 
0013 namespace celeritas
0014 {
0015 class PhysicsParams;
0016 //---------------------------------------------------------------------------//
0017 /*!
0018  * Save detailed debugging information about the physics in use.
0019  */
0020 class PhysicsParamsOutput final : public OutputInterface
0021 {
0022   public:
0023     //!@{
0024     //! \name Type aliases
0025     using SPConstPhysicsParams = std::shared_ptr<PhysicsParams const>;
0026     //!@}
0027 
0028   public:
0029     // Construct from shared physics data
0030     explicit PhysicsParamsOutput(SPConstPhysicsParams physics);
0031 
0032     //! Category of data to write
0033     Category category() const final { return Category::internal; }
0034 
0035     //! Name of the entry inside the category.
0036     std::string_view label() const final { return "physics"; }
0037 
0038     // Write output to the given JSON object
0039     void output(JsonPimpl*) const final;
0040 
0041   private:
0042     SPConstPhysicsParams physics_;
0043 };
0044 
0045 //---------------------------------------------------------------------------//
0046 }  // namespace celeritas