|
|
|||
Warning, file /include/Geant4/G4NavigationLevelRep.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 // G4NavigationLevelRep 0027 // 0028 // Class description: 0029 // 0030 // A data representation class, used to hold the data for a single level 0031 // of the Navigation history tree. 0032 // 0033 // This is the body of a handle/body pair of classes, that implement 0034 // reference counting for NavigationLevels. 0035 // The corresponding handle class is G4NavigationLevel 0036 0037 // Author: John Apostolakis (CERN), 01.10.1997- Initial version 0038 // ---------------------------------------------------------------------- 0039 #ifndef G4NAVIGATIONLEVELREP_HH 0040 #define G4NAVIGATIONLEVELREP_HH 0041 0042 #include "G4Types.hh" 0043 0044 #include "G4AffineTransform.hh" 0045 #include "G4VPhysicalVolume.hh" 0046 #include "G4Allocator.hh" 0047 0048 #include "geomwdefs.hh" 0049 0050 /** 0051 * @brief G4NavigationLevelRep is a data representation class, used to hold 0052 * the data for a single level of the nvigation history tree. 0053 * This is the body of a handle/body pair of classes, that implement reference 0054 * counting for navigation levels. The corresponding handle class is 0055 * G4NavigationLevel. 0056 */ 0057 0058 class G4NavigationLevelRep 0059 { 0060 public: 0061 0062 /** 0063 * Constructor for G4NavigationLevelRep. 0064 * @param[in] newPtrPhysVol Pointer to the new physical volume. 0065 * @param[in] newT The associated affine transformation. 0066 * @param[in] newVolTp The volume type. 0067 * @param[in] newRepNo The replica number. 0068 */ 0069 inline G4NavigationLevelRep( G4VPhysicalVolume* newPtrPhysVol, 0070 const G4AffineTransform& newT, 0071 EVolume newVolTp, 0072 G4int newRepNo = -1 ); 0073 0074 /** 0075 * Alternative Constructor for G4NavigationLevelRep, as the previous 0076 * constructor, but instead of giving the new transformation, give 0077 * the affine transformation to the level above and the current level's 0078 * transformation relative to that. 0079 * @param[in] newPtrPhysVol Pointer to the new physical volume. 0080 * @param[in] levelAbove The affine transformation to the level above. 0081 * @param[in] relativeCurrent The affine transformation at current level. 0082 * @param[in] newVolTp The volume type. 0083 * @param[in] newRepNo The replica number. 0084 */ 0085 inline G4NavigationLevelRep( G4VPhysicalVolume* newPtrPhysVol, 0086 const G4AffineTransform& levelAbove, 0087 const G4AffineTransform& relativeCurrent, 0088 EVolume newVolTp, 0089 G4int newRepNo = -1 ); 0090 0091 /** 0092 * Default Constructor & Destructor. 0093 */ 0094 inline G4NavigationLevelRep(); 0095 inline ~G4NavigationLevelRep(); 0096 0097 /** 0098 * Copy constructor and assignment operator. 0099 */ 0100 inline G4NavigationLevelRep( G4NavigationLevelRep& ); 0101 inline G4NavigationLevelRep& operator=(const G4NavigationLevelRep& ); 0102 0103 /** 0104 * Returns a pointer to the physical volume at the current level. 0105 */ 0106 inline G4VPhysicalVolume* GetPhysicalVolume(); 0107 0108 /** 0109 * Methods to return the associated affine transformation. 0110 */ 0111 inline const G4AffineTransform* GetTransformPtr() const ; // New 0112 inline const G4AffineTransform& GetTransform() const ; // Old 0113 0114 /** 0115 * Returns the volume type. 0116 */ 0117 inline EVolume GetVolumeType() const ; 0118 0119 /** 0120 * Returns the replica number. 0121 */ 0122 inline G4int GetReplicaNo() const ; 0123 0124 0125 /** 0126 * Methods taking care of the reference counts. 0127 */ 0128 inline void AddAReference(); 0129 inline G4bool RemoveAReference(); 0130 0131 /** 0132 * New/delete operator overrides for use by "G4Allocator". 0133 */ 0134 inline void* operator new(size_t); 0135 inline void operator delete(void* aTrack); 0136 0137 private: 0138 0139 /** Compounded global->local transformation; takes a point in the 0140 global reference system to the system of the volume at this level. */ 0141 G4AffineTransform sTransform; 0142 0143 /** Physical volume pointer, for this level's volume. */ 0144 G4VPhysicalVolume* sPhysicalVolumePtr = nullptr; 0145 0146 /** Replica number. */ 0147 G4int sReplicaNo = -1; 0148 0149 /** Volume type. */ 0150 EVolume sVolumeType; 0151 0152 /** Reference counter. */ 0153 G4int fCountRef = 1; 0154 }; 0155 0156 #include "G4NavigationLevelRep.icc" 0157 0158 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|