Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4SmartVoxelStat.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4SmartVoxelStat
27//
28// Class description:
29//
30// Stores information on the performance of the smart voxel algorithm
31// for an individual logical volume.
32
33// Author: D.C.Williams (UCSC), 1998
34// --------------------------------------------------------------------
35#ifndef G4SmartVoxelStat_hh
36#define G4SmartVoxelStat_hh
37
38#include "G4Types.hh"
39
40class G4LogicalVolume;
42
43/**
44 * @brief G4SmartVoxelStat stores the information on the performance of the
45 * smart voxel optimisation algorithm for an individual logical volume.
46 */
47
49{
50 public:
51
52 /**
53 * Constructs the information on one volume's voxels.
54 * @param[in] theVolume Pointer to the logical volume concerned.
55 * @param[in] theVoxel Pointer to the associated voxel header.
56 * @param[in] theSysTime System time.
57 * @param[in] theUserTime User time.
58 */
59 G4SmartVoxelStat( const G4LogicalVolume* theVolume,
60 const G4SmartVoxelHeader* theVoxel,
61 G4double theSysTime,
62 G4double theUserTime );
63
64 /**
65 * Returns a pointer to the logical volume.
66 */
67 const G4LogicalVolume* GetVolume() const;
68
69 /**
70 * Returns a pointer to the voxel header.
71 */
72 const G4SmartVoxelHeader* GetVoxel() const;
73
74 /**
75 * Gets the amount of system CPU time needed to build voxels.
76 */
77 G4double GetSysTime() const;
78
79 /**
80 * Gets the amount of user CPU time needed to build voxels.
81 */
82 G4double GetUserTime() const;
83
84 /**
85 * Gets the total amount of CPU time needed to build voxels.
86 */
87 G4double GetTotalTime() const;
88
89 /**
90 * Gets the number of voxel headers used in the volume.
91 */
92 G4long GetNumberHeads() const;
93
94 /**
95 * Gets the number of voxel slices used in the volume.
96 */
97 G4long GetNumberNodes() const;
98
99 /**
100 * Gets the number of voxel proxy pointers used in the volume.
101 */
103
104 /**
105 * Gets the number of bytes needed to store voxel information.
106 */
107 G4long GetMemoryUse() const;
108
109
110 private:
111
112 /**
113 * Counts headers and nodes from provided 'head' header.
114 */
115 void CountHeadsAndNodes( const G4SmartVoxelHeader* head );
116
117 private:
118
119 const G4LogicalVolume* volume;
120 const G4SmartVoxelHeader* voxel;
121
122 G4double sysTime;
123 G4double userTime;
124
125 G4long heads = 1;
126 G4long nodes = 0;
127 G4long pointers = 0;
128};
129
130#endif
double G4double
Definition G4Types.hh:83
long G4long
Definition G4Types.hh:87
G4LogicalVolume represents a leaf node or unpositioned subtree in the geometry hierarchy....
G4SmartVoxelHeader represents a set of voxels, created by a single axis of virtual division....
const G4SmartVoxelHeader * GetVoxel() const
G4SmartVoxelStat(const G4LogicalVolume *theVolume, const G4SmartVoxelHeader *theVoxel, G4double theSysTime, G4double theUserTime)
G4double GetUserTime() const
G4long GetMemoryUse() const
G4double GetTotalTime() const
G4long GetNumberPointers() const
G4long GetNumberHeads() const
G4double GetSysTime() const
const G4LogicalVolume * GetVolume() const
G4long GetNumberNodes() const