Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 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/io/detail/ImportDataConverter.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "celeritas/Types.hh"
0011 
0012 namespace celeritas
0013 {
0014 struct ImportData;
0015 struct ImportElement;
0016 struct ImportEmParameters;
0017 struct ImportPhysMaterial;
0018 struct ImportModel;
0019 struct ImportModelMaterial;
0020 struct ImportMscModel;
0021 struct ImportOpticalMaterial;
0022 struct ImportOpticalModel;
0023 struct ImportParticle;
0024 struct ImportPhysicsTable;
0025 struct ImportProcess;
0026 struct ImportGeoMaterial;
0027 
0028 namespace detail
0029 {
0030 //---------------------------------------------------------------------------//
0031 /*!
0032  * Convert imported data from one unit system to another.
0033  */
0034 class ImportDataConverter
0035 {
0036   public:
0037     // Construct with a unit system
0038     explicit ImportDataConverter(UnitSystem usys);
0039 
0040     //!@{
0041     //! Convert imported data to the native unit type
0042     void operator()(ImportData* data);
0043     void operator()(ImportElement* data);
0044     void operator()(ImportEmParameters* data);
0045     void operator()(ImportGeoMaterial* data);
0046     void operator()(ImportPhysMaterial* data);
0047     void operator()(ImportOpticalMaterial* data);
0048     void operator()(ImportOpticalModel* data);
0049     void operator()(ImportModel* data);
0050     void operator()(ImportModelMaterial* data);
0051     void operator()(ImportMscModel* data);
0052     void operator()(ImportParticle* data);
0053     void operator()(ImportPhysicsTable* data);
0054     void operator()(ImportProcess* data);
0055     //!@}
0056 
0057   private:
0058     UnitSystem usys_;
0059     double len_;
0060     double numdens_;
0061     double time_;
0062     double xs_;
0063     double inv_pressure_;
0064 };
0065 
0066 //---------------------------------------------------------------------------//
0067 }  // namespace detail
0068 }  // namespace celeritas