MCPcopy Create free account
hub / github.com/Geant4/geant4 / insertAt

Method insertAt

source/processes/management/src/G4ProcessVector.cc:125–139  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

123// --------------------------------------------------------------------
124//
125G4bool G4ProcessVector::insertAt(G4int i, G4VProcess* aProcess)
126{
127 if ( (i<0) || (i>G4int(pProcVector->size())) ) return false;
128 if (i==G4int(pProcVector->size()))
129 {
130 pProcVector->push_back(aProcess);
131 }
132 else
133 {
134 auto it=pProcVector->cbegin();
135 for(G4int j=0; j!=i; ++j) ++it;
136 pProcVector->insert(it, aProcess);
137 }
138 return true;
139}
140
141// --------------------------------------------------------------------
142//

Callers 15

BuildAngleTableMethod · 0.80
TestAngleTableMethod · 0.80
InitialiseMethod · 0.80
BuildAngleTableMethod · 0.80
TestAngleTableMethod · 0.80
BuildTableTMethod · 0.80
BuildTableTestMethod · 0.80
BuildPrEnergyTableMethod · 0.80
BuildElEnergyTableMethod · 0.80
InitialiseMethod · 0.80
InitialiseMethod · 0.80
BuildPhysicsTableMethod · 0.80

Calls 4

sizeMethod · 0.45
push_backMethod · 0.45
cbeginMethod · 0.45
insertMethod · 0.45

Tested by 2

TestAngleTableMethod · 0.64
TestAngleTableMethod · 0.64