Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -24,18 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Track.icc 69005 2013-04-15 09:26:47Z gcosmo $
|
||||
//
|
||||
//-----------------------------------------------------------------
|
||||
// Definitions of inline functions
|
||||
//-----------------------------------------------------------------
|
||||
// change GetMaterial 16 Feb. 2000 H.Kurashige
|
||||
|
||||
#if defined G4TRACK_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4Track> aTrackAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4Track> aTrackAllocator;
|
||||
#endif
|
||||
extern G4TRACK_DLL G4ThreadLocal G4Allocator<G4Track> *aTrackAllocator;
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// To implement bi-directional association between G4Step and
|
||||
@@ -47,18 +43,18 @@
|
||||
// Operators
|
||||
|
||||
inline void* G4Track::operator new(size_t)
|
||||
{ void *aTrack;
|
||||
aTrack = (void *) aTrackAllocator.MallocSingle();
|
||||
return aTrack;
|
||||
{
|
||||
if (!aTrackAllocator) aTrackAllocator = new G4Allocator<G4Track>;
|
||||
return (void *) aTrackAllocator->MallocSingle();
|
||||
}
|
||||
// Override "new" for "G4Allocator".
|
||||
|
||||
inline void G4Track::operator delete(void *aTrack)
|
||||
{ aTrackAllocator.FreeSingle((G4Track *) aTrack);}
|
||||
{ aTrackAllocator->FreeSingle((G4Track *) aTrack); }
|
||||
// Override "delete" for "G4Allocator".
|
||||
|
||||
inline G4bool G4Track::operator==( const G4Track& trk)
|
||||
{ return (this==&trk); }
|
||||
{ return (this==&trk); }
|
||||
// Define "==" operator because "G4TrackVector" uses
|
||||
// "RWPtrOrderdVector" which requires this.
|
||||
|
||||
@@ -162,49 +158,31 @@
|
||||
|
||||
// touchable
|
||||
inline const G4VTouchable* G4Track::GetTouchable() const
|
||||
{
|
||||
return fpTouchable();
|
||||
}
|
||||
{ return fpTouchable(); }
|
||||
|
||||
inline const G4TouchableHandle& G4Track::GetTouchableHandle() const
|
||||
{
|
||||
return fpTouchable;
|
||||
}
|
||||
{ return fpTouchable; }
|
||||
|
||||
inline void G4Track::SetTouchableHandle( const G4TouchableHandle& apValue)
|
||||
{
|
||||
fpTouchable = apValue;
|
||||
}
|
||||
{ fpTouchable = apValue; }
|
||||
|
||||
inline const G4VTouchable* G4Track::GetNextTouchable() const
|
||||
{
|
||||
return fpNextTouchable();
|
||||
}
|
||||
{ return fpNextTouchable(); }
|
||||
|
||||
inline const G4TouchableHandle& G4Track::GetNextTouchableHandle() const
|
||||
{
|
||||
return fpNextTouchable;
|
||||
}
|
||||
{ return fpNextTouchable; }
|
||||
|
||||
inline void G4Track::SetNextTouchableHandle( const G4TouchableHandle& apValue)
|
||||
{
|
||||
fpNextTouchable = apValue;
|
||||
}
|
||||
{ fpNextTouchable = apValue; }
|
||||
|
||||
inline const G4VTouchable* G4Track::GetOriginTouchable() const
|
||||
{
|
||||
return fpOriginTouchable();
|
||||
}
|
||||
{ return fpOriginTouchable(); }
|
||||
|
||||
inline const G4TouchableHandle& G4Track::GetOriginTouchableHandle() const
|
||||
{
|
||||
return fpOriginTouchable;
|
||||
}
|
||||
{ return fpOriginTouchable; }
|
||||
|
||||
inline void G4Track::SetOriginTouchableHandle( const G4TouchableHandle& apValue)
|
||||
{
|
||||
fpOriginTouchable = apValue;
|
||||
}
|
||||
{ fpOriginTouchable = apValue; }
|
||||
|
||||
// kinetic energy
|
||||
inline G4double G4Track::GetKineticEnergy() const
|
||||
@@ -331,4 +309,3 @@
|
||||
|
||||
inline void G4Track::SetStep(const G4Step* aValue)
|
||||
{ fpStep = aValue; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user