![]() |
|
|||
File indexing completed on 2025-02-22 10:31:29
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2023-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/ParticleParamsOutput.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <memory> 0011 0012 #include "corecel/io/OutputInterface.hh" 0013 0014 namespace celeritas 0015 { 0016 class ParticleParams; 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Save detailed debugging information about particles in use. 0020 */ 0021 class ParticleParamsOutput final : public OutputInterface 0022 { 0023 public: 0024 //!@{ 0025 //! \name Type aliases 0026 using SPConstParticleParams = std::shared_ptr<ParticleParams const>; 0027 //!@} 0028 0029 public: 0030 // Construct from shared physics data 0031 explicit ParticleParamsOutput(SPConstParticleParams particles); 0032 0033 //! Category of data to write 0034 Category category() const final { return Category::internal; } 0035 0036 //! Name of the entry inside the category. 0037 std::string_view label() const final { return "particle"; } 0038 0039 // Write output to the given JSON object 0040 void output(JsonPimpl*) const final; 0041 0042 private: 0043 SPConstParticleParams particles_; 0044 }; 0045 0046 //---------------------------------------------------------------------------// 0047 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |