Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:53:37

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