Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4GeometryManager.hh
이 파일의 문서화 페이지로 가기
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 //
27 // $Id: G4GeometryManager.hh 103235 2017-03-22 15:53:48Z gcosmo $
28 //
29 // class G4GeometryManager
30 //
31 // Class description:
32 //
33 // A class responsible for high level geometrical functions, and for
34 // high level objects in the geometry subdomain.
35 // The class is a `singleton', with access via the static method
36 // G4GeometryManager::GetInstance().
37 //
38 // Member data:
39 //
40 // - fgInstance
41 // Ptr to the unique instance of class
42 
43 // Author:
44 // 26.07.95 P.Kent Initial version, including optimisation Build
45 // --------------------------------------------------------------------
46 #ifndef G4GEOMETRYMANAGER_HH
47 #define G4GEOMETRYMANAGER_HH
48 
49 #include <vector>
50 #include "G4Types.hh"
51 #include "G4SmartVoxelStat.hh"
52 
53 class G4VPhysicalVolume;
54 
56 {
57  public: // with description
58 
59  G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false,
60  G4VPhysicalVolume* vol=0);
61  // Close (`lock') the geometry: perform sanity and `completion' checks
62  // and optionally [default=yes] build optimisation information.
63  // Applies to just a specific subtree if a physical volume is specified.
64 
65  void OpenGeometry(G4VPhysicalVolume* vol=0);
66  // Open (`unlock') the geometry and remove optimisation information if
67  // present. Applies to just a specific subtree if a physical volume is
68  // specified.
69 
70  static G4bool IsGeometryClosed();
71  // Return true/false according to state of optimised geoemtry.
72 
73  void SetWorldMaximumExtent(G4double worldExtent);
74  // Set the maximum extent of the world volume. The operation is
75  // allowed only if NO solids have been created already.
76 
78  // Return ptr to singleton instance of the class, creating it if
79  // not existing.
80 
82  // Return ptr to singleton instance.
83 
84  public: // without description
85 
87  // Destructor.
88 
89  protected:
90 
92  // Protected constructor
93 
94  private:
95 
96  void BuildOptimisations(G4bool allOpt, G4bool verbose=false);
97  void BuildOptimisations(G4bool allOpt, G4VPhysicalVolume* vol);
98  void DeleteOptimisations();
100  static void ReportVoxelStats( std::vector<G4SmartVoxelStat> & stats,
101  G4double totalCpuTime );
104 };
105 
106 #endif
static G4GeometryManager * GetInstanceIfExist()
#define G4ThreadLocal
Definition: tls.hh:69
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
static G4GeometryManager * GetInstance()
static G4ThreadLocal G4GeometryManager * fgInstance
void OpenGeometry(G4VPhysicalVolume *vol=0)
void SetWorldMaximumExtent(G4double worldExtent)
static G4ThreadLocal G4bool fIsClosed
static void ReportVoxelStats(std::vector< G4SmartVoxelStat > &stats, G4double totalCpuTime)
static G4bool IsGeometryClosed()
void BuildOptimisations(G4bool allOpt, G4bool verbose=false)
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=0)