Author: [log in to unmask]
Date: Thu Oct 1 11:27:27 2015
New Revision: 3666
Log:
Throw exception if an MCParticle was incorrectly mapped to a null primary particle.
Modified:
projects/slic/trunk/src/TrackManager.cc
Modified: projects/slic/trunk/src/TrackManager.cc
=============================================================================
--- projects/slic/trunk/src/TrackManager.cc (original)
+++ projects/slic/trunk/src/TrackManager.cc Thu Oct 1 11:27:27 2015
@@ -33,6 +33,9 @@
/* Copy MCParticle pointers into the corresponding TrackSummary objects for primary particles. */
PrimaryParticleMap* particleMap = MCParticleManager::instance()->getPrimaryParticleMap();
for (PrimaryParticleMapIterator it = particleMap->begin(); it != particleMap->end(); it++) {
+ if (it->second == 0) {
+ G4Exception("", "", FatalException, "MCParticle was mapped to null G4PrimaryParticle.");
+ }
if (it->second->GetTrackID() < 0) continue;
for(int j = _trackSummaries->size() - 1; j >= 0; j--){
if( _trackSummaries->operator[](j)->getTrackID() == it->second->GetTrackID() ) {
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1
|