Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file persistency/P03/include/ExTGTrackerHit.hh
|
||||
/// \brief Definition of the ExTGTrackerHit class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: ExTGTrackerHit.hh 76481 2013-11-11 10:49:21Z gcosmo $
|
||||
|
||||
#ifndef ExTGTrackerHit_h
|
||||
#define ExTGTrackerHit_h 1
|
||||
@@ -76,22 +76,22 @@ class ExTGTrackerHit : public G4VHit
|
||||
|
||||
typedef G4THitsCollection<ExTGTrackerHit> ExTGTrackerHitsCollection;
|
||||
|
||||
extern G4Allocator<ExTGTrackerHit> ExTGTrackerHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<ExTGTrackerHit>* ExTGTrackerHitAllocator;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
inline void* ExTGTrackerHit::operator new(size_t)
|
||||
{
|
||||
void *aHit;
|
||||
aHit = (void *) ExTGTrackerHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
if(!ExTGTrackerHitAllocator)
|
||||
ExTGTrackerHitAllocator = new G4Allocator<ExTGTrackerHit>;
|
||||
return (void *) ExTGTrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
inline void ExTGTrackerHit::operator delete(void *aHit)
|
||||
inline void ExTGTrackerHit::operator delete(void *hit)
|
||||
{
|
||||
ExTGTrackerHitAllocator.FreeSingle((ExTGTrackerHit*) aHit);
|
||||
ExTGTrackerHitAllocator->FreeSingle((ExTGTrackerHit*) hit);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user