| 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: G4NavigationLevelRep.hh,v 1.9 2006/06/29 18:57:27 gunter Exp $
|
|---|
| 28 | // GEANT4 tag $Name: HEAD $
|
|---|
| 29 | //
|
|---|
| 30 | // class G4NavigationLevelRep
|
|---|
| 31 | //
|
|---|
| 32 | // Class description:
|
|---|
| 33 | //
|
|---|
| 34 | // A data representation class, used to hold the data for a single level
|
|---|
| 35 | // of the Navigation history tree.
|
|---|
| 36 | //
|
|---|
| 37 | // This is the body of a handle/body pair of classes, that implement
|
|---|
| 38 | // reference counting for NavigationLevels.
|
|---|
| 39 | // The corresponding handle class is G4NavigationLevel
|
|---|
| 40 |
|
|---|
| 41 | // History:
|
|---|
| 42 | //
|
|---|
| 43 | // - 1 October 1997, J.Apostolakis: initial version.
|
|---|
| 44 | // ----------------------------------------------------------------------
|
|---|
| 45 | #ifndef G4NAVIGATIONLEVELREP_HH
|
|---|
| 46 | #define G4NAVIGATIONLEVELREP_HH
|
|---|
| 47 |
|
|---|
| 48 | #include "G4Types.hh"
|
|---|
| 49 |
|
|---|
| 50 | #include "G4AffineTransform.hh"
|
|---|
| 51 | #include "G4VPhysicalVolume.hh"
|
|---|
| 52 | #include "G4Allocator.hh"
|
|---|
| 53 |
|
|---|
| 54 | class G4NavigationLevelRep
|
|---|
| 55 | {
|
|---|
| 56 |
|
|---|
| 57 | public: // with description
|
|---|
| 58 |
|
|---|
| 59 | G4NavigationLevelRep( G4VPhysicalVolume* newPtrPhysVol,
|
|---|
| 60 | const G4AffineTransform& newT,
|
|---|
| 61 | EVolume newVolTp,
|
|---|
| 62 | G4int newRepNo= -1 );
|
|---|
| 63 |
|
|---|
| 64 | G4NavigationLevelRep( G4VPhysicalVolume* newPtrPhysVol,
|
|---|
| 65 | const G4AffineTransform& levelAbove,
|
|---|
| 66 | const G4AffineTransform& relativeCurrent,
|
|---|
| 67 | EVolume newVolTp,
|
|---|
| 68 | G4int newRepNo= -1 );
|
|---|
| 69 | // As the previous constructor, but instead of giving Transform, give
|
|---|
| 70 | // the AffineTransform to the level above and the current level's
|
|---|
| 71 | // Transform relative to that.
|
|---|
| 72 |
|
|---|
| 73 | G4NavigationLevelRep();
|
|---|
| 74 | G4NavigationLevelRep( G4NavigationLevelRep& );
|
|---|
| 75 |
|
|---|
| 76 | ~G4NavigationLevelRep();
|
|---|
| 77 |
|
|---|
| 78 | G4NavigationLevelRep& operator=(const G4NavigationLevelRep &right);
|
|---|
| 79 |
|
|---|
| 80 | inline G4VPhysicalVolume* GetPhysicalVolume();
|
|---|
| 81 |
|
|---|
| 82 | inline const G4AffineTransform* GetTransformPtr() const ; // New
|
|---|
| 83 | inline const G4AffineTransform& GetTransform() const ; // Old
|
|---|
| 84 |
|
|---|
| 85 | inline EVolume GetVolumeType() const ;
|
|---|
| 86 | inline G4int GetReplicaNo() const ;
|
|---|
| 87 |
|
|---|
| 88 | inline void AddAReference();
|
|---|
| 89 | inline G4bool RemoveAReference();
|
|---|
| 90 | // Take care of the reference counts.
|
|---|
| 91 |
|
|---|
| 92 | inline void *operator new(size_t);
|
|---|
| 93 | // Override "new" to use "G4Allocator".
|
|---|
| 94 | inline void operator delete(void *aTrack);
|
|---|
| 95 | // Override "delete" to use "G4Allocator".
|
|---|
| 96 |
|
|---|
| 97 | private:
|
|---|
| 98 |
|
|---|
| 99 | G4AffineTransform sTransform;
|
|---|
| 100 | // Compounded global->local transformation (takes a point in the
|
|---|
| 101 | // global reference system to the system of the volume at this level)
|
|---|
| 102 |
|
|---|
| 103 | G4VPhysicalVolume* sPhysicalVolumePtr;
|
|---|
| 104 | // Physical volume ptrs, for this level's volume
|
|---|
| 105 |
|
|---|
| 106 | G4int sReplicaNo;
|
|---|
| 107 | EVolume sVolumeType;
|
|---|
| 108 | // Volume `type'
|
|---|
| 109 |
|
|---|
| 110 | G4int fCountRef;
|
|---|
| 111 |
|
|---|
| 112 | };
|
|---|
| 113 |
|
|---|
| 114 | #include "G4NavigationLevelRep.icc"
|
|---|
| 115 |
|
|---|
| 116 | #endif
|
|---|