Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4FieldManagerStore.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: G4FieldManagerStore.hh 103228 2017-03-22 14:52:32Z gcosmo $
28 //
29 // class G4FieldManagerStore
30 //
31 // Class description:
32 //
33 // Container for all FieldManagers, with functionality derived from
34 // std::vector<T>. The class is a `singleton', in that only
35 // one can exist, and access is provided via the static function
36 // G4FieldManagerStore::GetInstance()
37 //
38 // All FieldManagers should be registered with G4FieldManagerStore,
39 // and removed on their destruction.
40 // Intended principally to enable resetting of 'state' at start of event.
41 // The underlying container initially has a capacity of 100.
42 //
43 // Member data:
44 //
45 // static G4FieldManagerStore* fgInstance
46 // - Ptr to the single G4FieldManagerStore.
47 
48 // History:
49 // 07.12.07 J.Apostolakis Initial version
50 // --------------------------------------------------------------------
51 #ifndef G4FIELDMANAGERSTORE_HH
52 #define G4FIELDMANAGERSTORE_HH
53 
54 #include <vector>
55 
56 #include "G4FieldManager.hh"
57 
58 class G4FieldManagerStore : public std::vector<G4FieldManager*>
59 {
60  public: // with description
61 
62  static void Register(G4FieldManager* pVolume);
63  // Add the logical volume to the collection.
64  static void DeRegister(G4FieldManager* pVolume);
65  // Remove the logical volume from the collection.
67  // Get a ptr to the unique G4FieldManagerStore, creating it if necessary.
69  // Get a ptr to the unique G4FieldManagerStore.
70  static void Clean();
71  // Delete all volumes from the store.
72 
74  // Looping over all field managers, call each one to reset step estimate
75 
77  // Destructor: takes care to delete allocated field managers.
78 
79  protected:
80 
82 
83  private:
84 
87 };
88 
89 #endif
static G4FieldManagerStore * GetInstanceIfExist()
static G4FieldManagerStore * GetInstance()
#define G4ThreadLocal
Definition: tls.hh:69
static G4ThreadLocal G4bool locked
static G4ThreadLocal G4FieldManagerStore * fgInstance
static void Register(G4FieldManager *pVolume)
bool G4bool
Definition: G4Types.hh:79
static void DeRegister(G4FieldManager *pVolume)