Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerHit.hh 69706 2013-05-13 09:12:40Z gcosmo $
|
||||
//
|
||||
/// \file B2TrackerHit.hh
|
||||
/// \brief Definition of the B2TrackerHit class
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
/// Tracker hit class
|
||||
///
|
||||
@@ -84,22 +85,22 @@ class B2TrackerHit : public G4VHit
|
||||
|
||||
typedef G4THitsCollection<B2TrackerHit> B2TrackerHitsCollection;
|
||||
|
||||
extern G4Allocator<B2TrackerHit> B2TrackerHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<B2TrackerHit>* B2TrackerHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void* B2TrackerHit::operator new(size_t)
|
||||
{
|
||||
void *hit;
|
||||
hit = (void *) B2TrackerHitAllocator.MallocSingle();
|
||||
return hit;
|
||||
if(!B2TrackerHitAllocator)
|
||||
B2TrackerHitAllocator = new G4Allocator<B2TrackerHit>;
|
||||
return (void *) B2TrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void B2TrackerHit::operator delete(void *hit)
|
||||
{
|
||||
B2TrackerHitAllocator.FreeSingle((B2TrackerHit*) hit);
|
||||
B2TrackerHitAllocator->FreeSingle((B2TrackerHit*) hit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user