| 129 | } |
| 130 | |
| 131 | void G4GeneralParticleSource::SetCurrentSourceto(G4int aV) |
| 132 | { |
| 133 | G4int id = aV; |
| 134 | if ( id < GPSData->GetIntensityVectorSize() ) |
| 135 | { |
| 136 | // currentSourceIdx = aV; |
| 137 | // currentSource = GPSData->GetCurrentSource(id); |
| 138 | theMessenger->SetParticleGun(GPSData->GetCurrentSource(id)); |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | G4ExceptionDescription msg; |
| 143 | msg << "Trying to set source to index " << aV << " but only " |
| 144 | << GPSData->GetIntensityVectorSize() << " sources are defined."; |
| 145 | G4Exception("G4GeneralParticleSoruce::SetCurrentSourceto", "G4GPS004", |
| 146 | FatalException, msg); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | void G4GeneralParticleSource::SetCurrentSourceIntensity(G4double aV) |
| 151 | { |
no test coverage detected