53 elm2Data[i] =
nullptr;
65 size_t n = compLength[i];
67 for(
size_t j=0; j<
n; ++j) {
69 delete (compData[i])[j];
77 G4cout <<
"G4ElementData::InitialiseForElement ERROR for " <<
name
78 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
79 G4Exception(
"G4ElementData::InitialiseForElement()",
"mat601",
83 if(elmData[Z]) {
delete elmData[
Z]; }
90 G4cout <<
"G4ElementData::InitialiseForElement ERROR for " <<
name
91 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
92 G4Exception(
"G4ElementData::InitialiseForElement()",
"mat601",
96 if(elm2Data[Z]) {
delete elm2Data[
Z]; }
103 G4cout <<
"G4ElementData::InitialiseForComponent ERROR for " <<
name
104 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
105 G4Exception(
"G4ElementData::InitialiseForComponent()",
"mat602",
111 size_t n = compLength[
Z];
113 for(
size_t i=0; i<
n; ++i) {
delete (compData[
Z])[i]; }
114 (compData[
Z]).clear();
117 (compData[
Z]).reserve(nComponents);
118 (compID[
Z]).reserve(nComponents);
125 G4cout <<
"G4ElementData::AddComponent ERROR for " <<
name
126 <<
" Z = " << Z <<
" is out of range!" <<
G4endl;
127 G4Exception(
"G4ElementData::AddComponent()",
"mat603",
131 (compData[
Z]).push_back(v);
132 (compID[
Z]).push_back(
id);
void AddComponent(G4int Z, G4int id, G4PhysicsVector *v)
const G4int maxNumElements
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void InitialiseForComponent(G4int Z, G4int nComponents=0)