46 :
G4Material(name,baseMaterial->GetDensity(),baseMaterial,
47 baseMaterial->GetState(),baseMaterial->GetTemperature(),
48 baseMaterial->GetPressure())
56 :
G4Material(name,z,a,density,state,temp,pressure)
67 :
G4Material(name,density,nComponents,state,temp,pressure)
77 :
G4Material(name,density,bmat,state,temp,pressure)
87 auto iter = fExtensionMap.find(extension->GetName());
88 if(iter!=fExtensionMap.end())
91 msg <<
"G4ExtendedMaterial <"<<
GetName()<<
"> already has extension for "
92 << extension->GetName()
93 <<
". Extension is replaced.";
96 fExtensionMap.insert(std::make_pair(extension->GetName(),std::move(extension)));
105 const auto iter = fExtensionMap.find(name);
106 if(iter!=fExtensionMap.end())
107 {
return iter->second.get(); }
111 msg <<
"G4ExtendedMAterial <"<<
GetName()<<
"> cannot find extension for "
127 flux <<
"\n Registered material extensions :\n";
128 auto iter = fExtensionMap.begin();
129 for(;iter!=fExtensionMap.end();iter++)
130 { 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)
virtual G4bool IsExtended() const
G4VMaterialExtension * RetrieveExtension(const G4String &name)
const G4String & GetName() const