Skip to content

Commit

Permalink
Have better validity checks of the Geant4VolumeManager when checking …
Browse files Browse the repository at this point in the history
…volume id
  • Loading branch information
MarkusFrankATcernch committed Jan 25, 2025
1 parent 1336432 commit 4114265
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions DDG4/src/Geant4VolumeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// C/C++ include files
#include <sstream>

#define VOLMGR_HAVE_DEBUG_INFO 1
//#define VOLMGR_HAVE_DEBUG_INFO 1

#ifdef VOLMGR_HAVE_DEBUG_INFO
/// Namespace for the AIDA detector description toolkit
Expand Down Expand Up @@ -84,7 +84,16 @@ namespace {
}
#endif
}

/// Default destructor
~Populator() {
#ifdef VOLMGR_HAVE_DEBUG_INFO
if ( g.g4DebugInfo ) {
delete g.g4DebugInfo;
g.g4DebugInfo = nullptr;
}
#endif
}

typedef std::pair<VolumeID, VolumeID> Encoding;
/// Compute the encoding for a set of VolIDs within a readout descriptor
static Encoding encoding(const IDDescriptor iddesc, const PlacedVolume::VolIDs& ids) {
Expand Down

0 comments on commit 4114265

Please sign in to comment.