Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PAffineTransform.ddl,v 1.4 1999/12/15 14:51:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// persistenet class of G4AffineTransform
|
||||
//
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVSolid.ddl,v 1.3 1999/12/15 14:51:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PVSolid.ddl,v 1.4 2000/11/02 12:42:06 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PVSolid
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef G4PVSOLID_DDL
|
||||
#define G4PVSOLID_DDL
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Pglobals.hh"
|
||||
#include "geomdefs.hh"
|
||||
#include "G4PersistentTypes.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PAffineTransform.cc,v 1.2 1999/12/15 14:51:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PAffineTransform
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVSolid.cc,v 1.2 1999/12/15 14:51:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PVSolid
|
||||
//
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4LogVolRefArray.hh,v 1.1 2000/11/17 05:10:02 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a class which implements G4RWTPtrVector with
|
||||
// G4LogicalVolume.
|
||||
//
|
||||
|
||||
// History:
|
||||
// 00.11.17 Y.Morita Initial version
|
||||
|
||||
#ifndef G4LogVolRefArray_hh
|
||||
#define G4LogVolRefArray_hh 1
|
||||
|
||||
#include "g4rw/tpvector.h"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
typedef G4RWTPtrVector<G4LogicalVolume> G4LogVolRefVArray;
|
||||
|
||||
class G4LogVolRefArray
|
||||
{
|
||||
public: // with description
|
||||
G4LogVolRefArray();
|
||||
~G4LogVolRefArray();
|
||||
// The constructor and the destructor.
|
||||
|
||||
private:
|
||||
G4LogVolRefVArray transLogVolPtrs;
|
||||
|
||||
public: // with description
|
||||
inline void Insert(G4int i, G4LogicalVolume* aVol)
|
||||
{ transLogVolPtrs[i] = aVol; }
|
||||
// Insert aVol as i-th element.
|
||||
inline G4LogicalVolume* Get(G4int i)
|
||||
{ return transLogVolPtrs[i]; }
|
||||
// return the i-th element.
|
||||
inline void Resize(size_t n)
|
||||
{ transLogVolPtrs.resize(n); }
|
||||
// Resize the vector with n.
|
||||
|
||||
};
|
||||
|
||||
G4LogVolRefArray::G4LogVolRefArray()
|
||||
{;}
|
||||
|
||||
G4LogVolRefArray::~G4LogVolRefArray()
|
||||
{;}
|
||||
|
||||
#endif
|
||||
@@ -5,62 +5,38 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PGeometryObjectMap.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PGeometryObjectMap.ddl,v 1.7 2000/11/22 15:29:39 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PGeometryObjectMap
|
||||
|
||||
// class description:
|
||||
//
|
||||
// A Class responsible for keeping track of the geometry object map.
|
||||
//
|
||||
// This class is persistent-capable.
|
||||
//
|
||||
// Member functions:
|
||||
// =================
|
||||
// G4PGeometryObjectMap( G4PString theGeometryName );
|
||||
// ~G4PGeometryObjectMap();
|
||||
//
|
||||
// protected:
|
||||
// G4PVPhysicalVolume* LookUp( G4VPhysicalVolume* aPhysVol );
|
||||
// void Add( const G4VPhysicalVolume* aPhysVol,
|
||||
// const G4PVPhysicalVolume* persPhysVol );
|
||||
// G4PLogicalVolume* LookUp(G4LogicalVolume* aLogVol);
|
||||
// void Add( const G4LogicalVolume* aLogVol,
|
||||
// const G4PLogicalVolume* persLogVol );
|
||||
// G4PVSolid* LookUp(G4VSolid* aSolid);
|
||||
// void Add( const G4VSolid* aSolid,
|
||||
// const G4PVSolid* persSolid );
|
||||
// G4int GetNoSolids();
|
||||
// G4VSolid* GetSolid(G4int n);
|
||||
// G4PVSolid* GetPSolid(G4int n);
|
||||
// This is a class which is responsible for keeping track of the
|
||||
// persistent geometry object in storing and retrieving geometry.
|
||||
// This class inherits HepPersObj and is persistent-capable.
|
||||
//
|
||||
|
||||
// Note:
|
||||
// =====
|
||||
// This class contains G4RWTPtrVector of the transient classes.
|
||||
// As a result, ooddlx compiler will issue warnings as follows, but it's okay.
|
||||
// The value of G4RWTPtrVector is used only in transient case
|
||||
// This class contains pointers of some transient classes.
|
||||
// As a result, ooddlx compiler will issue warnings as follows.
|
||||
// The value of the pointers are used only in transient case
|
||||
// in this class, and you can safely ignore these warnings.
|
||||
// ----
|
||||
// "include/G4PGeometryObjectMap.ddl", line xxx: warning: persistent-capable
|
||||
// class member type is a problem
|
||||
// The type of base class RWPtrVector is a problem
|
||||
// The type of member RWPtrVector::array_ is pointer
|
||||
// The type of base class G4RWTPtrVector<G4VPhysicalVolume > is a
|
||||
// problem
|
||||
// The type of base class RWPtrVector is a problem
|
||||
// G4PhysVolRefVArray transPhysVolPtrs;
|
||||
// ^
|
||||
// "include/G4PGeometryObjectMap.ddl", line 136: warning: persistent-capable
|
||||
// class member type is pointer
|
||||
// G4VPhysVolRefArray* transPhysVolPtrs;
|
||||
// ^
|
||||
// ----
|
||||
//
|
||||
//
|
||||
// History:
|
||||
// 98.06.20 Y.Morita Initial version
|
||||
|
||||
#ifndef G4PGeometryObjectMap_h
|
||||
#define G4PGeometryObjectMap_h 1
|
||||
|
||||
#include "g4rw/tpvector.h"
|
||||
#include "G4Pglobals.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VSolid.hh"
|
||||
@@ -75,9 +51,9 @@ class G4PLogicalVolume;
|
||||
class G4PVSolid;
|
||||
#pragma ooclassref G4PVSolid "G4PVSolid_ref.hh"
|
||||
|
||||
typedef G4RWTPtrVector<G4VPhysicalVolume> G4VPhysVolRefVArray;
|
||||
typedef G4RWTPtrVector<G4LogicalVolume> G4LogVolRefVArray;
|
||||
typedef G4RWTPtrVector<G4VSolid> G4VSolidRefVArray;
|
||||
class G4VPhysVolRefArray;
|
||||
class G4LogVolRefArray;
|
||||
class G4VSolidRefArray;
|
||||
|
||||
typedef d_Varray< d_Ref<G4PVPhysicalVolume> > G4PVPhysVolRefVArray;
|
||||
typedef d_Varray< d_Ref<G4PLogicalVolume> > G4PLogVolRefVArray;
|
||||
@@ -88,19 +64,23 @@ class G4PGeometryObjectMap
|
||||
{
|
||||
public:
|
||||
G4PGeometryObjectMap();
|
||||
public: // with description
|
||||
G4PGeometryObjectMap( const G4String theGeometryName );
|
||||
~G4PGeometryObjectMap();
|
||||
// The constructor and the destructor.
|
||||
|
||||
// template cannot be used in class scope!!
|
||||
// template<class T_IN, class T_OUT> T_OUT LookUp( const T_IN aGeomObj );
|
||||
|
||||
public: // with description
|
||||
HepRef(G4PVPhysicalVolume) LookUp( G4VPhysicalVolume* aPhysVol );
|
||||
G4VPhysicalVolume* LookUp( HepRef(G4PVPhysicalVolume) aPhysVol );
|
||||
HepRef(G4PLogicalVolume) LookUp( G4LogicalVolume* aLogVol);
|
||||
G4LogicalVolume* LookUp( HepRef(G4PLogicalVolume) aLogVol);
|
||||
HepRef(G4PVSolid) LookUp( G4VSolid* aSolid);
|
||||
G4VSolid* LookUp( HepRef(G4PVSolid) persSolid);
|
||||
// Method LookUp() will check if the pair of transient/persistent
|
||||
// geometry objects is already registered in the geometry map.
|
||||
// It returns the pointer of the pairing object if the pair exists.
|
||||
|
||||
public: // with description
|
||||
void Add( G4VPhysicalVolume* aPhysVol,
|
||||
HepRef(G4PVPhysicalVolume) persPhysVol );
|
||||
void Add( HepRef(G4PVPhysicalVolume) persPhysVol,
|
||||
@@ -113,19 +93,30 @@ class G4PGeometryObjectMap
|
||||
HepRef(G4PVSolid) persSolid );
|
||||
void Add( HepRef(G4PVSolid) persSolid,
|
||||
G4VSolid* aSolid );
|
||||
// Method Add() will register the transient and persistent geometry
|
||||
// objects into the geometry map.
|
||||
|
||||
public: // with description
|
||||
inline void SetWorldVolume( const HepRef(G4PVPhysicalVolume) aWorld )
|
||||
{ thePersistentWorldVolume = aWorld; }
|
||||
inline HepRef(G4PVPhysicalVolume) GetWorldVolume()
|
||||
{ return thePersistentWorldVolume; }
|
||||
// Set and Get methods for setting and getting a smart pointer
|
||||
// for the persistent world volume of the geometry.
|
||||
|
||||
public: // with description
|
||||
inline G4int GetNoPhysVol() const { return noPhysVol; }
|
||||
inline G4int GetNoLogVol() const { return noLogVol; }
|
||||
inline G4int GetNoSolids() const { return noSolids; }
|
||||
// returns the number of the registered transient/persistent pairs
|
||||
// in the geometry map.
|
||||
|
||||
public: // with description
|
||||
G4VSolid* GetSolid(G4int n);
|
||||
HepRef(G4PVSolid) GetPSolid(G4int n);
|
||||
// returns the pointer of n-th transient/persistent solid.
|
||||
|
||||
public:
|
||||
void InitTransientMap();
|
||||
|
||||
private:
|
||||
@@ -134,17 +125,17 @@ class G4PGeometryObjectMap
|
||||
|
||||
// Physics Volume Pointer Array
|
||||
G4Pint noPhysVol;
|
||||
G4VPhysVolRefVArray transPhysVolPtrs;
|
||||
G4VPhysVolRefArray* transPhysVolPtrs;
|
||||
G4PVPhysVolRefVArray persPhysVolPtrs;
|
||||
|
||||
// Logical Volume Pointer Array
|
||||
G4Pint noLogVol;
|
||||
G4LogVolRefVArray transLogVolPtrs;
|
||||
G4LogVolRefArray* transLogVolPtrs;
|
||||
G4PLogVolRefVArray persLogVolPtrs;
|
||||
|
||||
// Solid Pointer Array
|
||||
G4Pint noSolids;
|
||||
G4VSolidRefVArray transSolidPtrs;
|
||||
G4VSolidRefArray* transSolidPtrs;
|
||||
G4PVSolidRefVArray persSolidPtrs;
|
||||
|
||||
};
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PLogicalVolume.ddl,v 1.8 2000/06/09 12:56:01 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PLogicalVolume.ddl,v 1.9 2000/11/02 12:42:11 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PLogicalVolume
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef G4PLOGICALVOLUME_DDL
|
||||
#define G4PLOGICALVOLUME_DDL 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Pglobals.hh"
|
||||
#include "G4PersistentTypes.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
#include "G4VMaterialMap.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPVParameterised.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PPVParameterised
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPVPlacement.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// P-versieon of G4PVPlacement Takashi.Sasaki@kek.jp
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPVReplica.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PPVReplica.ddl,v 1.5 2000/11/02 12:42:11 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PPVReplica
|
||||
@@ -19,10 +19,12 @@
|
||||
#ifndef G4PPVREPLICA_DDL
|
||||
#define G4PPVREPLICA_DDL
|
||||
|
||||
#include "G4Pglobals.hh"
|
||||
|
||||
#include "G4PersistentTypes.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
// #include "G4RotationMatrix.hh"
|
||||
|
||||
#include "G4PVPhysicalVolume.hh"
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVPhysicalVolume.ddl,v 1.4 1999/12/15 14:51:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PVPhysicalVolume.ddl,v 1.5 2000/11/02 12:42:11 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PVPhysicalVolume
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef G4PVPHYSICALVOLUME_DDL
|
||||
#define G4PVPHYSICALVOLUME_DDL 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Pglobals.hh"
|
||||
#include "geomdefs.hh"
|
||||
#include "G4PersistentTypes.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
@@ -5,15 +5,17 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PersistentGeomMan.hh,v 1.9 2000/06/09 12:56:01 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PersistentGeomMan.hh,v 1.10 2000/12/15 07:56:35 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PersistentGeomMan
|
||||
|
||||
// Class Description:
|
||||
// A Utility class to be used by G4PersistencyManager.
|
||||
// Average users do not need to use this class.
|
||||
//
|
||||
// A Utility class for storing and retrieving the geometry objects.
|
||||
//
|
||||
// This class is not persistent-capable.
|
||||
// This class is not persistent-capable.
|
||||
//
|
||||
|
||||
// History:
|
||||
// 98.10.30 Y.Morita Splited from G4PersistencyManager
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPhysVolRefArray.hh,v 1.1 2000/11/17 05:10:02 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a class which implements G4RWTPtrVector with
|
||||
// G4VPhysicalVolume.
|
||||
//
|
||||
|
||||
// History:
|
||||
// 00.11.17 Y.Morita Initial version
|
||||
|
||||
#ifndef G4VPhysVolRefArray_hh
|
||||
#define G4VPhysVolRefArray_hh 1
|
||||
|
||||
#include "g4rw/tpvector.h"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
typedef G4RWTPtrVector<G4VPhysicalVolume> G4VPhysVolRefVArray;
|
||||
|
||||
class G4VPhysVolRefArray
|
||||
{
|
||||
public: // with description
|
||||
G4VPhysVolRefArray();
|
||||
~G4VPhysVolRefArray();
|
||||
// The constructor and the destructor.
|
||||
|
||||
private:
|
||||
G4VPhysVolRefVArray transPhysVolPtrs;
|
||||
|
||||
public: // with description
|
||||
inline void Insert(G4int i, G4VPhysicalVolume* aVol)
|
||||
{ transPhysVolPtrs[i] = aVol; }
|
||||
// Insert aVol as i-th element.
|
||||
inline G4VPhysicalVolume* Get(G4int i)
|
||||
{ return transPhysVolPtrs[i]; }
|
||||
// return the i-th element.
|
||||
inline void Resize(size_t n)
|
||||
{ transPhysVolPtrs.resize(n); }
|
||||
// Resize the vector with n.
|
||||
|
||||
};
|
||||
|
||||
G4VPhysVolRefArray::G4VPhysVolRefArray()
|
||||
{;}
|
||||
|
||||
G4VPhysVolRefArray::~G4VPhysVolRefArray()
|
||||
{;}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VSolidRefArray.hh,v 1.1 2000/11/17 05:10:03 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a class which implements G4RWTPtrVector with
|
||||
// G4VSolid.
|
||||
//
|
||||
|
||||
// History:
|
||||
// 00.11.17 Y.Morita Initial version
|
||||
|
||||
#ifndef G4VSolidRefArray_hh
|
||||
#define G4VSolidRefArray_hh 1
|
||||
|
||||
#include "g4rw/tpvector.h"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VSolid.hh"
|
||||
|
||||
typedef G4RWTPtrVector<G4VSolid> G4VSolidRefVArray;
|
||||
|
||||
class G4VSolidRefArray
|
||||
{
|
||||
public: // with description
|
||||
G4VSolidRefArray();
|
||||
~G4VSolidRefArray();
|
||||
// The constructor and the destructor.
|
||||
|
||||
private:
|
||||
G4VSolidRefVArray transSolidPtrs;
|
||||
|
||||
public: // with description
|
||||
inline void Insert(G4int i, G4VSolid* aSolid)
|
||||
{ transSolidPtrs[i] = aSolid; }
|
||||
// Insert aVol as i-th element.
|
||||
inline G4VSolid* Get(G4int i)
|
||||
{ return transSolidPtrs[i]; }
|
||||
// return the i-th element.
|
||||
inline void Resize(size_t n)
|
||||
{ transSolidPtrs.resize(n); }
|
||||
// Resize the vector with n.
|
||||
|
||||
};
|
||||
|
||||
G4VSolidRefArray::G4VSolidRefArray()
|
||||
{;}
|
||||
|
||||
G4VSolidRefArray::~G4VSolidRefArray()
|
||||
{;}
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PGeometryObjectMap.cc,v 1.5 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PGeometryObjectMap.cc,v 1.6 2000/11/17 05:10:03 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PGeometryObjectMap
|
||||
//
|
||||
@@ -24,19 +24,31 @@
|
||||
#include "G4PLogicalVolume.hh"
|
||||
#include "G4PVSolid.hh"
|
||||
|
||||
#include "G4VPhysVolRefArray.hh"
|
||||
#include "G4LogVolRefArray.hh"
|
||||
#include "G4VSolidRefArray.hh"
|
||||
|
||||
G4PGeometryObjectMap::G4PGeometryObjectMap()
|
||||
: noPhysVol(0),noLogVol(0),noSolids(0)
|
||||
{
|
||||
transPhysVolPtrs = new G4VPhysVolRefArray;
|
||||
transLogVolPtrs = new G4LogVolRefArray;
|
||||
transSolidPtrs = new G4VSolidRefArray;
|
||||
}
|
||||
|
||||
G4PGeometryObjectMap::G4PGeometryObjectMap( const G4String theGeometryName )
|
||||
: noPhysVol(0),noLogVol(0),noSolids(0)
|
||||
{
|
||||
noPhysVol = 0;
|
||||
noLogVol = 0;
|
||||
noSolids = 0;
|
||||
transPhysVolPtrs = new G4VPhysVolRefArray;
|
||||
transLogVolPtrs = new G4LogVolRefArray;
|
||||
transSolidPtrs = new G4VSolidRefArray;
|
||||
}
|
||||
|
||||
G4PGeometryObjectMap::~G4PGeometryObjectMap()
|
||||
{
|
||||
delete transPhysVolPtrs;
|
||||
delete transLogVolPtrs;
|
||||
delete transSolidPtrs;
|
||||
}
|
||||
|
||||
// -------- LookUp() and Add() functions for each class -------- //
|
||||
@@ -46,8 +58,12 @@ HepRef(G4PVPhysicalVolume) G4PGeometryObjectMap::LookUp(
|
||||
{
|
||||
assert(inGeomObj != NULL);
|
||||
for(G4int i=0;i<noPhysVol;i++)
|
||||
if( transPhysVolPtrs[i] == inGeomObj )
|
||||
{
|
||||
if( transPhysVolPtrs->Get(i) == inGeomObj )
|
||||
{
|
||||
return persPhysVolPtrs[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -61,9 +77,9 @@ void G4PGeometryObjectMap::Add( G4VPhysicalVolume* inGeomObj,
|
||||
{
|
||||
// assert( inGeomObj == aGeomObj );
|
||||
noPhysVol++;
|
||||
transPhysVolPtrs.resize(noPhysVol);
|
||||
transPhysVolPtrs[noPhysVol-1] = inGeomObj;
|
||||
persPhysVolPtrs.insert_element(outGeomObj);
|
||||
transPhysVolPtrs->Resize(noPhysVol);
|
||||
transPhysVolPtrs->Insert(noPhysVol-1, inGeomObj);
|
||||
persPhysVolPtrs.insert_element(outGeomObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +90,12 @@ G4VPhysicalVolume* G4PGeometryObjectMap::LookUp(
|
||||
{
|
||||
assert(inGeomObj != NULL);
|
||||
for(G4int i=0;i<noPhysVol;i++)
|
||||
{
|
||||
if( persPhysVolPtrs[i] == inGeomObj )
|
||||
return transPhysVolPtrs[i];
|
||||
{
|
||||
return transPhysVolPtrs->Get(i);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -88,7 +108,7 @@ void G4PGeometryObjectMap::Add( HepRef(G4PVPhysicalVolume) inGeomObj,
|
||||
{
|
||||
if( persPhysVolPtrs[i] == inGeomObj )
|
||||
{
|
||||
transPhysVolPtrs[i] = outGeomObj;
|
||||
transPhysVolPtrs->Insert(i, outGeomObj);
|
||||
break;
|
||||
}
|
||||
G4cerr << "G4PGeometryObjectMap::Add -- transient solid not assigned" << G4endl;
|
||||
@@ -102,8 +122,12 @@ HepRef(G4PLogicalVolume) G4PGeometryObjectMap::LookUp(
|
||||
{
|
||||
assert(inGeomObj != NULL);
|
||||
for(G4int i=0;i<noLogVol;i++)
|
||||
if( transLogVolPtrs[i] == inGeomObj )
|
||||
{
|
||||
if( transLogVolPtrs->Get(i) == inGeomObj )
|
||||
{
|
||||
return persLogVolPtrs[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -117,9 +141,9 @@ void G4PGeometryObjectMap::Add( G4LogicalVolume* inGeomObj,
|
||||
{
|
||||
// assert( inGeomObj == aGeomObj );
|
||||
noLogVol++;
|
||||
transLogVolPtrs.resize(noLogVol);
|
||||
transLogVolPtrs[noLogVol-1] = inGeomObj;
|
||||
persLogVolPtrs.insert_element(outGeomObj);
|
||||
transLogVolPtrs->Resize(noLogVol);
|
||||
transLogVolPtrs->Insert(noLogVol-1, inGeomObj);
|
||||
persLogVolPtrs.insert_element(outGeomObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,8 +154,12 @@ G4LogicalVolume* G4PGeometryObjectMap::LookUp(
|
||||
{
|
||||
assert(inGeomObj != NULL);
|
||||
for(G4int i=0;i<noLogVol;i++)
|
||||
{
|
||||
if( persLogVolPtrs[i] == inGeomObj )
|
||||
return transLogVolPtrs[i];
|
||||
{
|
||||
return transLogVolPtrs->Get(i);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -144,7 +172,7 @@ void G4PGeometryObjectMap::Add( HepRef(G4PLogicalVolume) inGeomObj,
|
||||
{
|
||||
if( persLogVolPtrs[i] == inGeomObj )
|
||||
{
|
||||
transLogVolPtrs[i] = outGeomObj;
|
||||
transLogVolPtrs->Insert(i, outGeomObj);
|
||||
break;
|
||||
}
|
||||
G4cerr << "G4PGeometryObjectMap::Add -- transient solid not assigned" << G4endl;
|
||||
@@ -165,15 +193,17 @@ HepRef(G4PVSolid) G4PGeometryObjectMap::LookUp( G4VSolid* inGeomObj )
|
||||
for(G4int i=0;i<noSolids;i++)
|
||||
{
|
||||
#ifdef G4PERSISTENCY_DEBUG
|
||||
G4VSolid* tmpSolid = transSolidPtrs[i];
|
||||
G4VSolid* tmpSolid = transSolidPtrs->Get(i);
|
||||
cout << "[" << i << "] transSolidPtrs[i]=" << tmpSolid <<G4endl;
|
||||
cout << " persSolidPtrs[i]=";
|
||||
HepRef(G4PVSolid) tmpPSolid = persSolidPtrs[i];
|
||||
tmpPSolid.print();
|
||||
#endif
|
||||
|
||||
if( transSolidPtrs[i] == inGeomObj )
|
||||
if( transSolidPtrs->Get(i) == inGeomObj )
|
||||
{
|
||||
return persSolidPtrs[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -188,9 +218,9 @@ void G4PGeometryObjectMap::Add( G4VSolid* inGeomObj,
|
||||
{
|
||||
// assert( inGeomObj == aGeomObj );
|
||||
noSolids++;
|
||||
transSolidPtrs.resize(noSolids);
|
||||
transSolidPtrs[noSolids-1] = inGeomObj;
|
||||
persSolidPtrs.insert_element(outGeomObj);
|
||||
transSolidPtrs->Resize(noSolids);
|
||||
transSolidPtrs->Insert(noSolids-1, inGeomObj);
|
||||
persSolidPtrs.insert_element(outGeomObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,11 +244,13 @@ G4VSolid* G4PGeometryObjectMap::LookUp(
|
||||
cout << "[" << i << "] persSolidPtrs[i]=";
|
||||
HepRef(G4PVSolid) tmpPSolid = persSolidPtrs[i];
|
||||
tmpPSolid.print();
|
||||
G4VSolid* tmpSolid = transSolidPtrs[i];
|
||||
G4VSolid* tmpSolid = transSolidPtrs->Get(i);
|
||||
cout << " transSolidPtrs[i]=" << tmpSolid <<G4endl;
|
||||
#endif
|
||||
if( persSolidPtrs[i] == inGeomObj )
|
||||
return transSolidPtrs[i];
|
||||
{
|
||||
return transSolidPtrs->Get(i);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -232,7 +264,7 @@ void G4PGeometryObjectMap::Add( HepRef(G4PVSolid) inGeomObj,
|
||||
{
|
||||
if( persSolidPtrs[i] == inGeomObj )
|
||||
{
|
||||
transSolidPtrs[i] = outGeomObj;
|
||||
transSolidPtrs->Insert(i, outGeomObj);
|
||||
break;
|
||||
}
|
||||
G4cerr << "G4PGeometryObjectMap::Add -- transient solid not assigned" << G4endl;
|
||||
@@ -244,38 +276,53 @@ void G4PGeometryObjectMap::Add( HepRef(G4PVSolid) inGeomObj,
|
||||
G4VSolid* G4PGeometryObjectMap::GetSolid(G4int i)
|
||||
{
|
||||
if( i >= 0 && i < noSolids)
|
||||
return transSolidPtrs[i];
|
||||
{
|
||||
return transSolidPtrs->Get(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
HepRef(G4PVSolid) G4PGeometryObjectMap::GetPSolid(G4int i)
|
||||
{
|
||||
if( i >= 0 && i < noSolids)
|
||||
{
|
||||
return persSolidPtrs[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void G4PGeometryObjectMap::InitTransientMap()
|
||||
{
|
||||
transPhysVolPtrs.resize(noPhysVol);
|
||||
transLogVolPtrs.resize(noLogVol);
|
||||
transSolidPtrs.resize(noSolids);
|
||||
transPhysVolPtrs->Resize(noPhysVol);
|
||||
transLogVolPtrs->Resize(noLogVol);
|
||||
transSolidPtrs->Resize(noSolids);
|
||||
|
||||
#ifdef G4PERSISTENCY_DEBUG
|
||||
cout << "G4PGeometryObjectMap::InitTransientMap()" << G4endl;
|
||||
cout << " -- noPhysVol: " << noPhysVol << G4endl;
|
||||
cout << " -- transPhysVolPtrs.length: " << transPhysVolPtrs.length() << G4endl;
|
||||
cout << " -- transLogVolPtrs.length: " << transLogVolPtrs.length() << G4endl;
|
||||
cout << " -- transSolidPtrs.length: " << transSolidPtrs.length() << G4endl;
|
||||
cout << " -- transPhysVolPtrs.length: " << transPhysVolPtrs->length() << G4endl;
|
||||
cout << " -- transLogVolPtrs.length: " << transLogVolPtrs->length() << G4endl;
|
||||
cout << " -- transSolidPtrs.length: " << transSolidPtrs->length() << G4endl;
|
||||
#endif
|
||||
|
||||
G4int i;
|
||||
for(i=0;i<noPhysVol;i++)
|
||||
transPhysVolPtrs[i] = NULL;
|
||||
{
|
||||
transPhysVolPtrs->Insert(i, NULL);
|
||||
}
|
||||
for(i=0;i<noLogVol;i++)
|
||||
transLogVolPtrs[i] = NULL;
|
||||
{
|
||||
transLogVolPtrs->Insert(i, NULL);
|
||||
}
|
||||
for(i=0;i<noSolids;i++)
|
||||
transSolidPtrs[i] = NULL;
|
||||
{
|
||||
transSolidPtrs->Insert(i, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PLogicalVolume.cc,v 1.5 2000/06/09 12:56:44 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// Takashi.Sasaki@kek.jp
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPVParameterised.cc,v 1.2 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPVPlacement.cc,v 1.2 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPVReplica.cc,v 1.2 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PVPhysicalVolume.cc,v 1.3 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// Takashi.Sasaki@kek.jp
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PersistentGeomMan.cc,v 1.14 2000/06/09 12:56:44 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PersistentGeomMan
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PBox.ddl,v 1.3 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PBox
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PCSGSolid.ddl,v 1.3 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4CSGSolid
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PCons.ddl,v 1.3 1999/12/15 14:51:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4Cons
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPara.ddl,v 1.4 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PPara
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PSphere.ddl,v 1.4 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PSphere
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTorus.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PTorus
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTrap.ddl,v 1.4 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PTrap
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTrd.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PTrd
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTubs.ddl,v 1.3 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PTubs
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PBox.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PCSGSolid.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// History:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PCons.cc,v 1.2 1999/11/17 10:49:02 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PCons
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PPara.cc,v 1.2 1999/11/17 10:49:03 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PPara
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PSphere.cc,v 1.3 1999/11/17 10:49:03 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PSphere
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTorus.cc,v 1.3 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PTorus
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTrap.cc,v 1.2 1999/11/17 10:49:03 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PTrap
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTrd.cc,v 1.3 1999/12/15 14:51:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// Implementation for G4Trd class
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PTubs.cc,v 1.2 1999/11/17 10:49:03 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// class G4PTubs
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PHype.ddl,v 1.1 2000/05/11 10:10:11 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PHype
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PHype.cc,v 1.1 2000/05/11 10:10:16 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class G4PHype
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user