|
||||
Warning, file /include/Geant4/G4ITTransportationManager.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 /// \brief {Duplicated version of G4TransportationManager. 0028 /// This class just contains the pointer to the navigator object of the 0029 /// simulation.} 0030 // 0031 // ------------------------------------------------------------------- 0032 // Author: Mathieu Karamitros 0033 0034 // The code is developed in the framework of the ESA AO7146 0035 // 0036 // We would be very happy hearing from you, send us your feedback! :) 0037 // 0038 // In order for Geant4-DNA to be maintained and still open-source, 0039 // article citations are crucial. 0040 // If you use Geant4-DNA chemistry and you publish papers about your software, 0041 // in addition to the general paper on Geant4-DNA: 0042 // 0043 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178 0044 // 0045 // we would be very happy if you could please also cite the following 0046 // reference papers on chemistry: 0047 // 0048 // J. Comput. Phys. 274 (2014) 841-882 0049 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508 0050 0051 #ifndef G4ITTRANSPORTATIONMANAGER_HH 0052 #define G4ITTRANSPORTATIONMANAGER_HH 0053 0054 #include "globals.hh" 0055 #include "G4ITNavigator.hh" 0056 #include <vector> 0057 0058 class G4ITSafetyHelper; 0059 class G4VPhysicalVolume; 0060 0061 class G4ITTransportationManager 0062 { 0063 public: 0064 static void DeleteInstance(); 0065 static G4ITTransportationManager* GetTransportationManager(); 0066 0067 G4ITNavigator* GetNavigatorForTracking() const; 0068 0069 inline void SetWorldForTracking(G4VPhysicalVolume* theWorld); 0070 // Set the world volume for tracking 0071 // This method is to be invoked by G4RunManagerKernel. 0072 0073 inline size_t GetNoActiveNavigators() const; 0074 inline std::vector<G4ITNavigator*>::iterator GetActiveNavigatorsIterator(); 0075 // Return an iterator to the list of active navigators 0076 0077 inline size_t GetNoWorlds() const; 0078 inline std::vector<G4VPhysicalVolume*>::iterator GetWorldsIterator(); 0079 // Return an iterator to the list of registered worlds 0080 0081 inline G4ITSafetyHelper* GetSafetyHelper() const; 0082 0083 G4VPhysicalVolume* GetParallelWorld ( const G4String& worldName ); 0084 // Return an exact copy of the tracking world volume. If already 0085 // existing just return the pointer 0086 0087 G4VPhysicalVolume* IsWorldExisting ( const G4String& worldName ); 0088 // Verify existance or not of an istance of the world volume with 0089 // same name in the collection 0090 0091 G4ITNavigator* GetNavigator ( const G4String& worldName ); 0092 G4ITNavigator* GetNavigator ( G4VPhysicalVolume* aWorld ); 0093 // Return a navigator associated to either the world volume name 0094 // or the pointer to world physical volume. If not existing already 0095 // create it and register it in the collection 0096 0097 G4bool RegisterWorld( G4VPhysicalVolume* aWorld ); 0098 void DeRegisterNavigator( G4ITNavigator* aNavigator ); 0099 G4int ActivateNavigator( G4ITNavigator* aNavigator ); 0100 void DeActivateNavigator( G4ITNavigator* aNavigator ); 0101 void InactivateAll(); 0102 // Methods for handling navigators. Navigator for tracking is always the 0103 // first, i.e. position 0 in the collection and cannot be de-registered 0104 0105 private: 0106 0107 void ClearNavigators(); 0108 // Clear collection of navigators and delete allocated objects 0109 void DeRegisterWorld( G4VPhysicalVolume* aWorld ); 0110 // Register/de-register an already allocated world volume. 0111 // The pointed object is not deleted. 0112 0113 private: 0114 G4ITTransportationManager(); 0115 ~G4ITTransportationManager(); 0116 static G4ThreadLocal G4ITTransportationManager* fpInstance; 0117 void Initialize(); 0118 //G4ITNavigator* fpNavigator; 0119 G4ITSafetyHelper* fpSafetyHelper; 0120 std::vector<G4ITNavigator*> fNavigators; 0121 // The collection of all navigators registered 0122 std::vector<G4ITNavigator*> fActiveNavigators; 0123 // The collection of only active navigators 0124 std::vector<G4VPhysicalVolume*> fWorlds; 0125 // The collection of worlds associated to the registered navigators 0126 0127 }; 0128 0129 #include "G4ITTransportationManager.icc" 0130 0131 #endif // G4ITTRANSPORTATIONMANAGER_HH
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |