Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4SmartVoxelStat Class Reference

G4SmartVoxelStat stores the information on the performance of the smart voxel optimisation algorithm for an individual logical volume. More...

#include <G4SmartVoxelStat.hh>

Public Member Functions

 G4SmartVoxelStat (const G4LogicalVolume *theVolume, const G4SmartVoxelHeader *theVoxel, G4double theSysTime, G4double theUserTime)
const G4LogicalVolumeGetVolume () const
const G4SmartVoxelHeaderGetVoxel () const
G4double GetSysTime () const
G4double GetUserTime () const
G4double GetTotalTime () const
G4long GetNumberHeads () const
G4long GetNumberNodes () const
G4long GetNumberPointers () const
G4long GetMemoryUse () const

Detailed Description

G4SmartVoxelStat stores the information on the performance of the smart voxel optimisation algorithm for an individual logical volume.

Definition at line 48 of file G4SmartVoxelStat.hh.

Constructor & Destructor Documentation

◆ G4SmartVoxelStat()

G4SmartVoxelStat::G4SmartVoxelStat ( const G4LogicalVolume * theVolume,
const G4SmartVoxelHeader * theVoxel,
G4double theSysTime,
G4double theUserTime )

Constructs the information on one volume's voxels.

Parameters
[in]theVolumePointer to the logical volume concerned.
[in]theVoxelPointer to the associated voxel header.
[in]theSysTimeSystem time.
[in]theUserTimeUser time.

Definition at line 42 of file G4SmartVoxelStat.cc.

46 : volume(theVolume),
47 voxel(theVoxel),
48 sysTime(theSysTime),
49 userTime(theUserTime)
50{
51 CountHeadsAndNodes( voxel );
52}

Member Function Documentation

◆ GetMemoryUse()

G4long G4SmartVoxelStat::GetMemoryUse ( ) const

Gets the number of bytes needed to store voxel information.

Definition at line 100 of file G4SmartVoxelStat.cc.

101{
102 static const G4long headSize = sizeof(G4SmartVoxelHeader)
103 + sizeof(G4SmartVoxelProxy);
104
105 static const G4long nodeSize = sizeof(G4SmartVoxelNode)
106 + sizeof(G4SmartVoxelProxy);
107
108 static const G4long pointerSize = sizeof(G4SmartVoxelProxy*);
109
110 return nodes*nodeSize + heads*headSize + pointers*pointerSize;
111}
long G4long
Definition G4Types.hh:87

Referenced by G4RunManager::ReOptimize().

◆ GetNumberHeads()

G4long G4SmartVoxelStat::GetNumberHeads ( ) const

Gets the number of voxel headers used in the volume.

Definition at line 82 of file G4SmartVoxelStat.cc.

83{
84 return heads;
85}

Referenced by G4RunManager::ReOptimize().

◆ GetNumberNodes()

G4long G4SmartVoxelStat::GetNumberNodes ( ) const

Gets the number of voxel slices used in the volume.

Definition at line 87 of file G4SmartVoxelStat.cc.

88{
89 return nodes;
90}

Referenced by G4RunManager::ReOptimize().

◆ GetNumberPointers()

G4long G4SmartVoxelStat::GetNumberPointers ( ) const

Gets the number of voxel proxy pointers used in the volume.

Definition at line 92 of file G4SmartVoxelStat.cc.

93{
94 return pointers;
95}

Referenced by G4RunManager::ReOptimize().

◆ GetSysTime()

G4double G4SmartVoxelStat::GetSysTime ( ) const

Gets the amount of system CPU time needed to build voxels.

Definition at line 67 of file G4SmartVoxelStat.cc.

68{
69 return sysTime;
70}

Referenced by G4RunManager::ReOptimize().

◆ GetTotalTime()

G4double G4SmartVoxelStat::GetTotalTime ( ) const

Gets the total amount of CPU time needed to build voxels.

Definition at line 77 of file G4SmartVoxelStat.cc.

78{
79 return sysTime + userTime;
80}

Referenced by G4RunManager::ReOptimize().

◆ GetUserTime()

G4double G4SmartVoxelStat::GetUserTime ( ) const

Gets the amount of user CPU time needed to build voxels.

Definition at line 72 of file G4SmartVoxelStat.cc.

73{
74 return userTime;
75}

◆ GetVolume()

const G4LogicalVolume * G4SmartVoxelStat::GetVolume ( ) const

Returns a pointer to the logical volume.

Definition at line 57 of file G4SmartVoxelStat.cc.

58{
59 return volume;
60}

◆ GetVoxel()

const G4SmartVoxelHeader * G4SmartVoxelStat::GetVoxel ( ) const

Returns a pointer to the voxel header.

Definition at line 62 of file G4SmartVoxelStat.cc.

63{
64 return voxel;
65}

The documentation for this class was generated from the following files: