Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4TrajectoryContainer.hh 69010 2013-04-15 09:34:16Z gcosmo $
|
||||
//
|
||||
//
|
||||
// G4TrajectoryContainer
|
||||
@@ -39,10 +39,12 @@
|
||||
#ifndef G4TrajectoryContainer_h
|
||||
#define G4TrajectoryContainer_h 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "evtdefs.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include <vector>
|
||||
|
||||
typedef std::vector<G4VTrajectory*> TrajectoryVector;
|
||||
|
||||
@@ -80,23 +82,18 @@ class G4TrajectoryContainer
|
||||
TrajectoryVector* vect;
|
||||
};
|
||||
|
||||
#if defined G4EVENT_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4TrajectoryContainer> aTrajectoryContainerAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4TrajectoryContainer> aTrajectoryContainerAllocator;
|
||||
#endif
|
||||
extern G4EVENT_DLL G4ThreadLocal G4Allocator<G4TrajectoryContainer> *aTrajectoryContainerAllocator;
|
||||
|
||||
inline void* G4TrajectoryContainer::operator new(size_t)
|
||||
{
|
||||
void* aTrajectoryContainer;
|
||||
aTrajectoryContainer = (void*)aTrajectoryContainerAllocator.MallocSingle();
|
||||
return aTrajectoryContainer;
|
||||
if (!aTrajectoryContainerAllocator)
|
||||
aTrajectoryContainerAllocator = new G4Allocator<G4TrajectoryContainer>;
|
||||
return (void*)aTrajectoryContainerAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4TrajectoryContainer::operator delete(void* aTrajectoryContainer)
|
||||
{
|
||||
aTrajectoryContainerAllocator.FreeSingle((G4TrajectoryContainer*)aTrajectoryContainer);
|
||||
aTrajectoryContainerAllocator->FreeSingle((G4TrajectoryContainer*)aTrajectoryContainer);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user