ATLAS Offline Software
|
a user action to debug G4 geometries More...
#include <VolumeDebugger.h>
Classes | |
struct | Config |
Public Member Functions | |
VolumeDebugger (const Config &config) | |
virtual void | BeginOfRunAction (const G4Run *) override |
hook for G4 UA functionality More... | |
bool | msgLvl (const MSG::Level lvl) const |
Test the output level. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Member Functions | |
void | DumpGeometry () const |
wrapper function for the gdml dump More... | |
void | PullVolumes (G4LogicalVolume *v) const |
volume filter More... | |
bool | recursiveCheck (G4VPhysicalVolume *pv) const |
Returns true if there were overlaps. More... | |
std::string | printVolume (const G4VPhysicalVolume *pv, const std::string &delim="") const |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
Private Attributes | |
Config | m_config |
configuration data More... | |
std::string | m_nm |
Message source name. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
a user action to debug G4 geometries
It looks for the volume specified by the user in the TargetVolume parameter. (If it does not find it, it prints a very long list of possibilities, and exits without doing a check). The user can specifiy whether or not to make a GDML dump (I found it a waste of time and disk-space). It checks the specified volume, then does a recursive search through all child volumes. But it only enters into each LogVol once (no point in rechecking inside a LogVol over and over again for each PhysVol that points to it), saving quite some time. Furthermore, the user can specify a new parameter, MaxCopiesToCheck, as a double. Setting this to say 1.e20 will check all PhysVols are inside their MotherVol, and do not collide with any sisters. Setting it to say 10. means max. 10 copies of a LogVol checked. The others are skipped. The 10 chosen are spread out through the list of PhysVols that use the LogVol in question. Setting this parameter to say 2.0 gives a very fast check, while still checking every single type of LogVol at least once. Finds most overlaps very fast.
Definition at line 36 of file VolumeDebugger.h.
Definition at line 34 of file VolumeDebugger.cxx.
|
overridevirtual |
|
private |
wrapper function for the gdml dump
Definition at line 63 of file VolumeDebugger.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
lvl | The message level to test against |
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
private |
Definition at line 190 of file VolumeDebugger.cxx.
|
private |
|
private |
Returns true if there were overlaps.
Definition at line 138 of file VolumeDebugger.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
configuration data
Definition at line 62 of file VolumeDebugger.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.