Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 08:54:44

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/inp/ProcessBuilder.hh
0006 //! \todo Process building needs a total rewrite
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <functional>
0011 #include <memory>
0012 #include <unordered_map>
0013 
0014 #include "celeritas/io/ImportProcess.hh"
0015 
0016 namespace celeritas
0017 {
0018 class ImportedProcesses;
0019 class MaterialParams;
0020 class ParticleParams;
0021 class Process;
0022 
0023 namespace inp
0024 {
0025 //---------------------------------------------------------------------------//
0026 //! Input argument for user-provided process construction
0027 struct ProcessBuilderInput
0028 {
0029     using SPConstParticle = std::shared_ptr<ParticleParams const>;
0030     using SPConstMaterial = std::shared_ptr<MaterialParams const>;
0031     using SPConstImported = std::shared_ptr<ImportedProcesses const>;
0032 
0033     SPConstMaterial material;
0034     SPConstParticle particle;
0035     SPConstImported imported;
0036 };
0037 
0038 //!@{
0039 //! \name User builder type aliases
0040 using ProcessBuilderFunction
0041     = std::function<std::shared_ptr<Process>(ProcessBuilderInput const&)>;
0042 using ProcessBuilderMap
0043     = std::unordered_map<ImportProcessClass, ProcessBuilderFunction>;
0044 //!@}
0045 
0046 //---------------------------------------------------------------------------//
0047 }  // namespace inp
0048 }  // namespace celeritas