Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:35

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 geocel/GeoParamsOutput.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <memory>
0011 
0012 #include "corecel/io/OutputInterface.hh"
0013 
0014 namespace celeritas
0015 {
0016 //---------------------------------------------------------------------------//
0017 class GeoParamsInterface;
0018 
0019 //---------------------------------------------------------------------------//
0020 /*!
0021  * Save geometry diagnostic data.
0022  */
0023 class GeoParamsOutput final : public OutputInterface
0024 {
0025   public:
0026     //!@{
0027     //! \name Type aliases
0028     using SPConstGeoParams = std::shared_ptr<GeoParamsInterface const>;
0029     //!@}
0030 
0031   public:
0032     // Construct from shared geometry data
0033     explicit GeoParamsOutput(SPConstGeoParams geo);
0034 
0035     //! Category of data to write
0036     Category category() const final { return Category::internal; }
0037 
0038     //! Name of the entry inside the category.
0039     std::string_view label() const final { return "geometry"; }
0040 
0041     // Write output to the given JSON object
0042     void output(JsonPimpl*) const final;
0043 
0044   private:
0045     SPConstGeoParams geo_;
0046 };
0047 
0048 //---------------------------------------------------------------------------//
0049 }  // namespace celeritas