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: G4AdjointCrossSurfChecker.hh 66872 2013-01-15 01:25:57Z japost $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Class Name: G4AdjointCrossSurfChecker
|
||||
@@ -91,7 +91,7 @@ class G4AdjointCrossSurfChecker
|
||||
G4int FindRegisteredSurface(const G4String& name);
|
||||
|
||||
private:
|
||||
static G4AdjointCrossSurfChecker* instance;
|
||||
static G4ThreadLocal G4AdjointCrossSurfChecker* instance;
|
||||
|
||||
std::vector<G4String> ListOfSurfaceName;
|
||||
std::vector<G4String> ListOfSurfaceType;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4AdjointSteppingAction.hh 75570 2013-11-04 11:41:10Z gcosmo $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Class Name: G4AdjointSteppingAction
|
||||
@@ -83,8 +83,11 @@ class G4AdjointSteppingAction : public G4UserSteppingAction
|
||||
inline G4double GetLastWeight(){return last_weight;}
|
||||
inline void SetPrimWeight(G4double weight){prim_weight=weight;}
|
||||
inline G4ParticleDefinition* GetLastPartDef(){return last_part_def;}
|
||||
inline void SetUserAdjointSteppingAction( G4UserSteppingAction* anAction) {theUserAdjointSteppingAction = anAction;}
|
||||
|
||||
inline void SetUserAdjointSteppingAction( G4UserSteppingAction* anAction) {
|
||||
theUserAdjointSteppingAction = anAction;}
|
||||
inline void SetUserForwardSteppingAction( G4UserSteppingAction* anAction) {
|
||||
theUserFwdSteppingAction = anAction;}
|
||||
inline void SetAdjointTrackingMode(G4bool aBool){is_adjoint_tracking_mode =aBool;}
|
||||
private:
|
||||
|
||||
G4double ext_sourceEMax;
|
||||
@@ -98,6 +101,8 @@ class G4AdjointSteppingAction : public G4UserSteppingAction
|
||||
G4double prim_weight ;
|
||||
G4ParticleDefinition* last_part_def;
|
||||
G4UserSteppingAction* theUserAdjointSteppingAction;
|
||||
G4UserSteppingAction* theUserFwdSteppingAction;
|
||||
G4bool is_adjoint_tracking_mode;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4AdjointTrackingAction.hh 75409 2013-11-01 00:31:00Z ldesorgh$
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4AdjointTrackingAction.hh
|
||||
//
|
||||
// class description:
|
||||
// This class represents actions taken place at the
|
||||
// the start/end point of processing one track during an adjoint simulation
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#ifndef G4AdjointTrackingAction_h
|
||||
#define G4AdjointTrackingAction_h 1
|
||||
#include "globals.hh"
|
||||
#include "G4UserTrackingAction.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
class G4AdjointSteppingAction;
|
||||
class G4Track;
|
||||
///////////////////////////
|
||||
class G4AdjointTrackingAction : public G4UserTrackingAction
|
||||
///////////////////////////
|
||||
{
|
||||
|
||||
//--------
|
||||
public: // with description
|
||||
//--------
|
||||
|
||||
// Constructor & Destructor
|
||||
G4AdjointTrackingAction(G4AdjointSteppingAction* anAction);
|
||||
virtual ~G4AdjointTrackingAction();
|
||||
|
||||
// Member functions
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
virtual void PostUserTrackingAction(const G4Track*);
|
||||
void RegisterAtEndOfAdjointTrack();
|
||||
|
||||
//inline methods
|
||||
inline void SetUserForwardTrackingAction(G4UserTrackingAction* anAction){
|
||||
theUserFwdTrackingAction = anAction;}
|
||||
inline G4ThreeVector GetPositionAtEndOfLastAdjointTrack(){ return last_pos;}
|
||||
inline G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(){ return last_direction;}
|
||||
inline G4double GetEkinAtEndOfLastAdjointTrack(){ return last_ekin;}
|
||||
inline G4double GetEkinNucAtEndOfLastAdjointTrack(){ return last_ekin_nuc;}
|
||||
inline G4double GetWeightAtEndOfLastAdjointTrack(){return last_weight;}
|
||||
inline G4double GetCosthAtEndOfLastAdjointTrack(){return last_cos_th;}
|
||||
inline const G4String& GetFwdParticleNameAtEndOfLastAdjointTrack(){return last_fwd_part_name;}
|
||||
inline G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(){return last_fwd_part_PDGEncoding;}
|
||||
|
||||
|
||||
private:
|
||||
G4AdjointSteppingAction* theAdjointSteppingAction;
|
||||
G4UserTrackingAction* theUserFwdTrackingAction;
|
||||
G4bool is_adjoint_tracking_mode;
|
||||
|
||||
|
||||
//adjoint particle information on the external surface
|
||||
//-----------------------------
|
||||
G4ThreeVector last_pos;
|
||||
G4ThreeVector last_direction;
|
||||
G4double last_ekin,last_ekin_nuc; //last_ekin_nuc=last_ekin/nuc, nuc is 1 if not a nucleus
|
||||
G4double last_cos_th;
|
||||
G4String last_fwd_part_name;
|
||||
G4int last_fwd_part_PDGEncoding;
|
||||
G4double last_weight;
|
||||
G4int ID_of_last_particle_that_reach_the_ext_source;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4RichTrajectory.hh 69003 2013-04-15 09:25:23Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -56,8 +56,8 @@
|
||||
#ifndef G4RICHTRAJECTORY_HH
|
||||
#define G4RICHTRAJECTORY_HH
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
|
||||
#include "G4TouchableHandle.hh"
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> RichTrajectoryPointsContainer;
|
||||
@@ -83,6 +83,8 @@ public:
|
||||
{return (this==&right);}
|
||||
|
||||
// Other (virtual) member functions
|
||||
void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
void DrawTrajectory() const;
|
||||
void AppendStep(const G4Step* aStep);
|
||||
void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
int GetPointEntries() const { return fpRichPointsContainer->size(); }
|
||||
@@ -107,25 +109,19 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4RichTrajectory>
|
||||
aRichTrajectoryAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4RichTrajectory>
|
||||
aRichTrajectoryAllocator;
|
||||
#endif
|
||||
extern G4TRACKING_DLL G4ThreadLocal
|
||||
G4Allocator<G4RichTrajectory> *aRichTrajectoryAllocator;
|
||||
|
||||
inline void* G4RichTrajectory::operator new(size_t)
|
||||
{
|
||||
void* aRichTrajectory;
|
||||
aRichTrajectory = (void*)aRichTrajectoryAllocator.MallocSingle();
|
||||
return aRichTrajectory;
|
||||
if (!aRichTrajectoryAllocator)
|
||||
{ aRichTrajectoryAllocator = new G4Allocator<G4RichTrajectory>; }
|
||||
return (void*)aRichTrajectoryAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4RichTrajectory::operator delete(void* aRichTrajectory)
|
||||
{
|
||||
aRichTrajectoryAllocator.FreeSingle
|
||||
((G4RichTrajectory*)aRichTrajectory);
|
||||
aRichTrajectoryAllocator->FreeSingle((G4RichTrajectory*)aRichTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4RichTrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -57,12 +57,13 @@
|
||||
#ifndef G4RICHTRAJECTORYPOINT_HH
|
||||
#define G4RICHTRAJECTORYPOINT_HH
|
||||
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include <vector>
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include "G4TouchableHandle.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Track;
|
||||
class G4Step;
|
||||
@@ -116,28 +117,20 @@ private:
|
||||
G4double fPostStepPointWeight;
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4RichTrajectoryPoint>
|
||||
aRichTrajectoryPointAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4RichTrajectoryPoint>
|
||||
aRichTrajectoryPointAllocator;
|
||||
#endif
|
||||
extern G4TRACKING_DLL G4ThreadLocal
|
||||
G4Allocator<G4RichTrajectoryPoint> *aRichTrajectoryPointAllocator;
|
||||
|
||||
inline void* G4RichTrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
void *aRichTrajectoryPoint;
|
||||
aRichTrajectoryPoint =
|
||||
(void *) aRichTrajectoryPointAllocator.MallocSingle();
|
||||
return aRichTrajectoryPoint;
|
||||
if (!aRichTrajectoryPointAllocator)
|
||||
{ aRichTrajectoryPointAllocator = new G4Allocator<G4RichTrajectoryPoint>; }
|
||||
return (void *) aRichTrajectoryPointAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4RichTrajectoryPoint::operator delete
|
||||
(void *aRichTrajectoryPoint)
|
||||
inline void G4RichTrajectoryPoint::operator delete(void *aRichTrajectoryPoint)
|
||||
{
|
||||
aRichTrajectoryPointAllocator.FreeSingle
|
||||
aRichTrajectoryPointAllocator->FreeSingle
|
||||
((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4SmoothTrajectory.hh 69003 2013-04-15 09:25:23Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -47,20 +47,23 @@ class G4SmoothTrajectory;
|
||||
#ifndef G4SmoothTrajectory_h
|
||||
#define G4SmoothTrajectory_h 1
|
||||
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include <vector>
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include <vector> // G4RWTValOrderedVector
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "G4SmoothTrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "G4SmoothTrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
class G4Polyline; // Forward declaration.
|
||||
class G4Polyline; // Forward declaration
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
|
||||
class G4SmoothTrajectory : public G4VTrajectory
|
||||
{
|
||||
|
||||
@@ -104,8 +107,7 @@ public:
|
||||
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
//virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory(G4int i_mode = 0) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return positionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
@@ -133,22 +135,19 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4SmoothTrajectory> aSmoothTrajectoryAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4SmoothTrajectory> aSmoothTrajectoryAllocator;
|
||||
#endif
|
||||
extern G4TRACKING_DLL G4ThreadLocal
|
||||
G4Allocator<G4SmoothTrajectory> *aSmoothTrajectoryAllocator;
|
||||
|
||||
inline void* G4SmoothTrajectory::operator new(size_t)
|
||||
{
|
||||
void* aTrajectory;
|
||||
aTrajectory = (void*)aSmoothTrajectoryAllocator.MallocSingle();
|
||||
return aTrajectory;
|
||||
if (!aSmoothTrajectoryAllocator)
|
||||
{ aSmoothTrajectoryAllocator = new G4Allocator<G4SmoothTrajectory>; }
|
||||
return (void*)aSmoothTrajectoryAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4SmoothTrajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
aSmoothTrajectoryAllocator.FreeSingle((G4SmoothTrajectory*)aTrajectory);
|
||||
aSmoothTrajectoryAllocator->FreeSingle((G4SmoothTrajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4SmoothTrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -38,6 +38,7 @@
|
||||
#ifndef G4SmoothTrajectoryPoint_h
|
||||
#define G4SmoothTrajectoryPoint_h 1
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ThreeVector.hh" // Include from 'geometry'
|
||||
@@ -54,7 +55,7 @@ public: // without description
|
||||
// Constructor/Destructor
|
||||
G4SmoothTrajectoryPoint();
|
||||
// No auxiliary points setter, so must set the points in the
|
||||
// constructor already (jacek 31/10/2002)
|
||||
// constructor already
|
||||
G4SmoothTrajectoryPoint(G4ThreeVector pos,
|
||||
std::vector<G4ThreeVector>* auxiliaryPoints);
|
||||
G4SmoothTrajectoryPoint(G4ThreeVector pos);
|
||||
@@ -91,23 +92,19 @@ public:
|
||||
std::vector<G4ThreeVector>* fAuxiliaryPointVector;
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4SmoothTrajectoryPoint> aSmoothTrajectoryPointAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4SmoothTrajectoryPoint> aSmoothTrajectoryPointAllocator;
|
||||
#endif
|
||||
extern G4TRACKING_DLL G4ThreadLocal
|
||||
G4Allocator<G4SmoothTrajectoryPoint> *aSmoothTrajectoryPointAllocator;
|
||||
|
||||
inline void* G4SmoothTrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
void *aTrajectoryPoint;
|
||||
aTrajectoryPoint = (void *) aSmoothTrajectoryPointAllocator.MallocSingle();
|
||||
return aTrajectoryPoint;
|
||||
if (!aSmoothTrajectoryPointAllocator)
|
||||
{ aSmoothTrajectoryPointAllocator= new G4Allocator<G4SmoothTrajectoryPoint>; }
|
||||
return (void *) aSmoothTrajectoryPointAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4SmoothTrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
{
|
||||
aSmoothTrajectoryPointAllocator.FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
|
||||
aSmoothTrajectoryPointAllocator->FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4SteppingManager.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4SteppingVerbose.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4TrackingManager.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4TrackingMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Trajectory.hh 69003 2013-04-15 09:25:23Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -51,20 +51,23 @@ class G4Trajectory;
|
||||
#ifndef G4Trajectory_h
|
||||
#define G4Trajectory_h 1
|
||||
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include <vector>
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include <vector> // G4RWTValOrderedVector
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "G4TrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
class G4Polyline; // Forward declaration.
|
||||
class G4Polyline; // Forward declaration
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
|
||||
///////////////////
|
||||
class G4Trajectory : public G4VTrajectory
|
||||
///////////////////
|
||||
@@ -106,8 +109,7 @@ public: // with description
|
||||
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
//virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory(G4int i_mode = 0) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return positionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
@@ -134,32 +136,19 @@ public: // with description
|
||||
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4Trajectory> aTrajectoryAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4Trajectory> aTrajectoryAllocator;
|
||||
#endif
|
||||
extern G4TRACKING_DLL G4ThreadLocal
|
||||
G4Allocator<G4Trajectory> *aTrajectoryAllocator;
|
||||
|
||||
inline void* G4Trajectory::operator new(size_t)
|
||||
{
|
||||
void* aTrajectory;
|
||||
aTrajectory = (void*)aTrajectoryAllocator.MallocSingle();
|
||||
return aTrajectory;
|
||||
if (!aTrajectoryAllocator)
|
||||
{ aTrajectoryAllocator = new G4Allocator<G4Trajectory>; }
|
||||
return (void*)aTrajectoryAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4Trajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
aTrajectoryAllocator.FreeSingle((G4Trajectory*)aTrajectory);
|
||||
aTrajectoryAllocator->FreeSingle((G4Trajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4TrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -49,6 +49,7 @@
|
||||
#ifndef G4TrajectoryPoint_h
|
||||
#define G4TrajectoryPoint_h 1
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ThreeVector.hh" // Include from 'geometry'
|
||||
@@ -93,23 +94,19 @@ public: // without description
|
||||
|
||||
};
|
||||
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
|
||||
#endif
|
||||
extern G4TRACKING_DLL G4ThreadLocal
|
||||
G4Allocator<G4TrajectoryPoint> *aTrajectoryPointAllocator;
|
||||
|
||||
inline void* G4TrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
void *aTrajectoryPoint;
|
||||
aTrajectoryPoint = (void *) aTrajectoryPointAllocator.MallocSingle();
|
||||
return aTrajectoryPoint;
|
||||
if (!aTrajectoryPointAllocator)
|
||||
{ aTrajectoryPointAllocator = new G4Allocator<G4TrajectoryPoint>; }
|
||||
return (void *) aTrajectoryPointAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4TrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
{
|
||||
aTrajectoryPointAllocator.FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
|
||||
aTrajectoryPointAllocator->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4UserSteppingAction.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4UserTrackingAction.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VSteppingVerbose.hh 66872 2013-01-15 01:25:57Z japost $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -76,9 +76,9 @@ public:
|
||||
virtual ~G4VSteppingVerbose();
|
||||
//
|
||||
protected:
|
||||
static G4VSteppingVerbose* fInstance;// pointer to the instance
|
||||
static G4int Silent; //flag for verbosity
|
||||
static G4int SilentStepInfo; //another flag for verbosity
|
||||
static G4ThreadLocal G4VSteppingVerbose* fInstance;// pointer to the instance
|
||||
static G4ThreadLocal G4int Silent; //flag for verbosity
|
||||
static G4ThreadLocal G4int SilentStepInfo; //another flag for verbosity
|
||||
public: // with description
|
||||
// static methods to set/get the object's pointer
|
||||
static void SetInstance(G4VSteppingVerbose* Instance);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VTrajectory.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
@@ -88,9 +88,7 @@ class G4VTrajectory
|
||||
// may be used or may be overridden in the concrete class. Note:
|
||||
// the user needs to follow with new-line or end-of-string,
|
||||
// depending on the nature of os.
|
||||
virtual void DrawTrajectory(G4int i_mode =0) const;
|
||||
//virtual void DrawTrajectory() const;
|
||||
//virtual void DrawTrajectory(G4int i_mode) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
// Draw the trajectory. A default implementation in this base
|
||||
// class may be used or may be overridden in the concrete class.
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4VTrajectoryPoint.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Defines for Windows DLLs import/export
|
||||
//
|
||||
|
||||
#ifndef TRKGDEFS_HH
|
||||
#define TRKGDEFS_HH
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef WIN32
|
||||
//
|
||||
// Unique identifier for global module
|
||||
//
|
||||
#if defined G4TRACKING_ALLOC_EXPORT
|
||||
#define G4TRACKING_DLL G4DLLEXPORT
|
||||
#else
|
||||
#define G4TRACKING_DLL G4DLLIMPORT
|
||||
#endif
|
||||
#else
|
||||
#define G4TRACKING_DLL
|
||||
#endif
|
||||
|
||||
#endif /* G4TRKGDEFS_HH */
|
||||
Reference in New Issue
Block a user