Warning, file /include/orange/g4org/LogicalVolumeConverter.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <memory>
0010 #include <unordered_map>
0011 #include <vector>
0012
0013 #include "corecel/io/Label.hh"
0014 #include "geocel/Types.hh"
0015 #include "orange/orangeinp/ObjectInterface.hh"
0016
0017
0018
0019
0020
0021 class G4LogicalVolume;
0022
0023 namespace celeritas
0024 {
0025 namespace g4org
0026 {
0027
0028 struct LogicalVolume;
0029 class SolidConverter;
0030
0031
0032
0033
0034
0035
0036
0037
0038 class LogicalVolumeConverter
0039 {
0040 public:
0041
0042
0043 using arg_type = G4LogicalVolume const&;
0044 using VecLabel = std::vector<Label>;
0045 using SPLV = std::shared_ptr<LogicalVolume>;
0046 using result_type = std::pair<SPLV, bool>;
0047
0048
0049 public:
0050 LogicalVolumeConverter(VecLabel const& labels,
0051 SolidConverter& convert_solid);
0052
0053
0054 result_type operator()(arg_type);
0055
0056 private:
0057 using WPLV = std::weak_ptr<LogicalVolume>;
0058
0059
0060
0061 VecLabel const& labels_;
0062 SolidConverter& convert_solid_;
0063 std::unordered_map<G4LogicalVolume const*, WPLV> cache_;
0064
0065
0066
0067
0068 SPLV construct_impl(arg_type);
0069 };
0070
0071
0072 }
0073 }