39 :
G4Material(name, baseMaterial->GetDensity(), baseMaterial, baseMaterial->GetState(),
40 baseMaterial->GetTemperature(), baseMaterial->GetPressure())
47 :
G4Material(name, z, a, density, state, temp, pressure)
55 :
G4Material(name, density, nComponents, state, temp, pressure)
62 :
G4Material(name, density, bmat, state, temp, pressure)
69 auto iter = fExtensionMap.find(extension->GetName());
70 if (iter != fExtensionMap.end()) {
72 msg <<
"G4ExtendedMaterial <" <<
GetName() <<
"> already has extension for "
73 << extension->GetName() <<
". Extension is replaced.";
76 fExtensionMap.insert(std::make_pair(extension->GetName(), std::move(extension)));
83 const auto iter = fExtensionMap.find(name);
84 if (iter != fExtensionMap.end()) {
85 return iter->second.get();
89 msg <<
"G4ExtendedMAterial <" <<
GetName() <<
"> cannot find extension for " << name;
98 flux <<
"\n Registered material extensions :\n";
99 auto iter = fExtensionMap.begin();
100 for (; iter != fExtensionMap.end(); iter++) {
101 flux <<
" " << iter->first <<
"\n";
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4ExtendedMaterial(const G4String &name, const G4Material *baseMaterial)
void Print(std::ostream &flux) const
void RegisterExtension(std::unique_ptr< G4VMaterialExtension > extension)
G4bool IsExtended() const override
G4VMaterialExtension * RetrieveExtension(const G4String &name)
const G4String & GetName() const