G4NavigationLevel.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // class G4NavigationLevel
00030 //
00031 // Class description:
00032 //
00033 // Maintains one level of the geometrical hierarchy.
00034 // A utility class for use by G4NavigationHistory.
00035 
00036 // History:
00037 //
00038 // 30.09.97 J.Apostolakis Initial version. Services derived from
00039 //                        requirements of touchables & G4NavigatorHistory.
00040 // ----------------------------------------------------------------------
00041 #ifndef G4NAVIGATIONLEVEL_HH
00042 #define G4NAVIGATIONLEVEL_HH
00043 
00044 #include "G4Types.hh"
00045 
00046 #include "G4AffineTransform.hh"
00047 #include "G4VPhysicalVolume.hh"
00048 
00049 #include "G4NavigationLevelRep.hh"
00050 #include "G4Allocator.hh"
00051 
00052 class G4NavigationLevel
00053 {
00054 
00055  public:  // with description
00056 
00057    G4NavigationLevel(G4VPhysicalVolume*       newPtrPhysVol,
00058                      const G4AffineTransform& newT,
00059                      EVolume                  newVolTp,
00060                      G4int                    newRepNo= -1);
00061 
00062    G4NavigationLevel(G4VPhysicalVolume*       newPtrPhysVol,
00063                      const G4AffineTransform& levelAbove,
00064                      const G4AffineTransform& relativeCurrent,
00065                      EVolume                  newVolTp,
00066                      G4int                    newRepNo= -1);
00067      // As the previous constructor, but instead of giving Transform, give 
00068      // the AffineTransform to the level above and the current level's 
00069      // Transform relative to that.
00070 
00071    G4NavigationLevel();
00072    G4NavigationLevel( const G4NavigationLevel& );
00073 
00074    ~G4NavigationLevel();
00075 
00076    G4NavigationLevel& operator=(const G4NavigationLevel &right);
00077 
00078    inline G4VPhysicalVolume*       GetPhysicalVolume() const;
00079    inline const G4AffineTransform* GetTransformPtr() const ;  // New
00080    inline const G4AffineTransform& GetTransform() const ;     // Old
00081 
00082    inline EVolume                  GetVolumeType() const ;
00083    inline G4int                    GetReplicaNo() const ;
00084 
00085  public:  // without description
00086 
00087    inline const G4AffineTransform* GetPtrTransform() const;
00088      // To try to resolve the possible problem with returning a reference.
00089 
00090    inline void *operator new(size_t);
00091    inline void operator delete(void *aLevel);
00092      // Override "new" and "delete" to use "G4Allocator".
00093 
00094    inline void *operator new(size_t, void *);
00095 #ifndef G4NOT_ISO_DELETES
00096    inline void operator delete(void *ptr, void*);  // Not accepted Sun/HP
00097 #endif
00098      // Pre-allocated 'new' and 'delete' for use with STL 
00099      // Do not (directly) use Allocator
00100 
00101  private:
00102 
00103    G4NavigationLevelRep*  fLevelRep;
00104 };
00105 
00106 #include "G4NavigationLevel.icc"
00107 
00108 #endif

Generated on Mon May 27 17:48:56 2013 for Geant4 by  doxygen 1.4.7