52 elm2Data[i] =
nullptr;
64 size_t n = compLength[i];
66 for(
size_t j=0; j<n; ++j) {
68 delete (compData[i])[j];
76 G4cout <<
"G4ElementData::InitialiseForElement ERROR for " << name
77 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
78 G4Exception(
"G4ElementData::InitialiseForElement()",
"mat601",
82 if(elmData[Z]) {
delete elmData[Z]; }
89 G4cout <<
"G4ElementData::InitialiseForElement ERROR for " << name
90 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
91 G4Exception(
"G4ElementData::InitialiseForElement()",
"mat601",
95 if(elm2Data[Z]) {
delete elm2Data[Z]; }
102 G4cout <<
"G4ElementData::InitialiseForComponent ERROR for " << name
103 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
104 G4Exception(
"G4ElementData::InitialiseForComponent()",
"mat602",
110 size_t n = compLength[Z];
112 for(
size_t i=0; i<n; ++i) {
delete (compData[Z])[i]; }
113 (compData[Z]).clear();
116 (compData[Z]).reserve(nComponents);
117 (compID[Z]).reserve(nComponents);
124 G4cout <<
"G4ElementData::AddComponent ERROR for " << name
125 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
126 G4Exception(
"G4ElementData::AddComponent()",
"mat603",
130 (compData[Z]).push_back(v);
131 (compID[Z]).push_back(
id);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const G4int maxNumElements
G4GLOB_DLL std::ostream G4cout
void InitialiseForComponent(G4int Z, G4int nComponents=0)
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
void AddComponent(G4int Z, G4int id, G4PhysicsVector *v)