Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4AxesModel.hh,v 1.4 2001/08/24 20:34:14 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 3rd April 2001
@@ -22,7 +22,7 @@
//
//
// $Id: G4AxesModel.icc,v 1.3 2001/08/24 20:34:15 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
inline G4String G4AxesModel::GetCurrentTag () const {
return fGlobalTag;
@@ -22,7 +22,7 @@
//
//
// $Id: G4BoundingSphereScene.hh,v 1.15 2005/06/07 16:54:33 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 7th June 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4CallbackModel.hh,v 1.3 2005/03/03 16:22:02 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 31st December 1997.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4FlavoredParallelWorldModel.hh,v 1.6 2001/07/11 10:09:20 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4FlavoredParallelWorldModel.hh,v 1.7 2005/11/22 16:29:40 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// P. Mora de Freitas et M.Verderi - 19 June 1998.
//
@@ -46,7 +46,7 @@ public: // With description
G4FlavoredParallelWorldModel
(G4VFlavoredParallelWorld* FPW,
G4int soughtDepth = G4PhysicalVolumeModel::UNLIMITED,
const G4Transform3D& modelTransformation = G4Transform3D::Identity,
const G4Transform3D& modelTransformation = G4Transform3D(),
const G4ModelingParameters* mp = 0);
~G4FlavoredParallelWorldModel ();
@@ -22,7 +22,7 @@
//
//
// $Id: G4HitsModel.hh,v 1.7 2001/08/24 20:36:13 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 26th August 1998.
@@ -22,7 +22,7 @@
//
//
// $Id: G4HitsModel.icc,v 1.6 2001/08/24 20:36:14 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
inline G4String G4HitsModel::GetCurrentTag () const {
return fGlobalTag;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4LogicalVolumeModel.hh,v 1.6 2005/02/15 14:51:25 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4LogicalVolumeModel.hh,v 1.7 2005/11/22 16:29:40 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 26th July 1999.
@@ -56,7 +56,7 @@ public: // With description
G4bool booleans = true,
G4bool voxels = true,
G4bool readout = true,
const G4Transform3D& modelTransformation = G4Transform3D::Identity,
const G4Transform3D& modelTransformation = G4Transform3D(),
const G4ModelingParameters* = 0);
virtual ~G4LogicalVolumeModel ();
@@ -0,0 +1,74 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4ModelCommandsDrawByCharge.hh,v 1.2 2005/11/23 05:19:23 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl November 2005
//
// Class Description
// Trajectory model commands.
// Class Description - End:
#ifndef G4MODELCOMMANDDRAWBYCHARGE_HH
#define G4MODELCOMMANDDRAWBYCHARGE_HH
#include "G4String.hh"
#include "G4VModelCommand.hh"
class G4TrajectoryDrawByCharge;
class G4UIcmdWithAString;
class G4UIcommand;
// Command to set positive/negative/neutral trajectory colouring through a string
class G4ModelCommandDrawByChargeSet : public G4VModelCommand<G4TrajectoryDrawByCharge> {
public: // With description
G4ModelCommandDrawByChargeSet(G4TrajectoryDrawByCharge* model, const G4String& placement);
virtual ~G4ModelCommandDrawByChargeSet();
void SetNewValue(G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
// Command to set positive/negative/neutral trajectory colouring through G4Colour components
class G4ModelCommandDrawByChargeSetRGBA : public G4VModelCommand<G4TrajectoryDrawByCharge> {
public:
G4ModelCommandDrawByChargeSetRGBA(G4TrajectoryDrawByCharge* model, const G4String& placement) ;
virtual ~G4ModelCommandDrawByChargeSetRGBA();
void SetNewValue(G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
#endif
@@ -0,0 +1,107 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4ModelCommandsDrawByParticleID.hh,v 1.2 2005/11/23 20:24:15 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl November 2005
//
// Class Description
// Trajectory model commands.
// Class Description - End:
#ifndef G4MODELCOMMANDDRAWBYPARTICLEID_HH
#define G4MODELCOMMANDDRAWBYPARTICLEID_HH
#include "G4String.hh"
#include "G4VModelCommand.hh"
class G4TrajectoryDrawByParticleID;
class G4UIcmdWithAString;
class G4UIcommand;
// Command to set positive/negative/neutral trajectory colouring through a string
class G4ModelCommandDrawByParticleIDSet : public G4VModelCommand<G4TrajectoryDrawByParticleID> {
public: // With description
G4ModelCommandDrawByParticleIDSet(G4TrajectoryDrawByParticleID* model, const G4String& placement);
virtual ~G4ModelCommandDrawByParticleIDSet();
void SetNewValue(G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
// Command to set default positive/negative/neutral trajectory colouring through G4Colour components
class G4ModelCommandDrawByParticleIDSetRGBA : public G4VModelCommand<G4TrajectoryDrawByParticleID> {
public:
G4ModelCommandDrawByParticleIDSetRGBA(G4TrajectoryDrawByParticleID* model, const G4String& placement) ;
virtual ~G4ModelCommandDrawByParticleIDSetRGBA();
void SetNewValue(G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
// Command to set default positive/negative/neutral trajectory colouring through a string
class G4ModelCommandDrawByParticleIDSetDefault : public G4VModelCommand<G4TrajectoryDrawByParticleID> {
public: // With description
G4ModelCommandDrawByParticleIDSetDefault(G4TrajectoryDrawByParticleID* model, const G4String& placement);
virtual ~G4ModelCommandDrawByParticleIDSetDefault();
void SetNewValue(G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
// Command to set default positive/negative/neutral trajectory colouring through G4Colour components
class G4ModelCommandDrawByParticleIDSetDefaultRGBA : public G4VModelCommand<G4TrajectoryDrawByParticleID> {
public:
G4ModelCommandDrawByParticleIDSetDefaultRGBA(G4TrajectoryDrawByParticleID* model, const G4String& placement) ;
virtual ~G4ModelCommandDrawByParticleIDSetDefaultRGBA();
void SetNewValue(G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4ModelingParameters.hh,v 1.10 2005/03/15 12:56:29 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 31st December 1997.
@@ -22,7 +22,7 @@
//
//
// $Id: G4ModelingParameters.icc,v 1.4 2001/07/11 10:09:21 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 31st December 1997.
@@ -22,7 +22,7 @@
//
//
// $Id: G4NullModel.hh,v 1.6 2001/08/24 20:36:15 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 4th April 1998.
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicalVolumeMassScene.hh,v 1.4 2005/01/27 20:06:35 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 12th September 2004
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicalVolumeModel.hh,v 1.20 2005/03/09 16:23:21 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4PhysicalVolumeModel.hh,v 1.21 2005/11/22 16:29:40 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 31st December 1997.
@@ -60,7 +60,7 @@ public: // With description
G4PhysicalVolumeModel
(G4VPhysicalVolume*,
G4int requestedDepth = UNLIMITED,
const G4Transform3D& modelTransformation = G4Transform3D::Identity,
const G4Transform3D& modelTransformation = G4Transform3D(),
const G4ModelingParameters* = 0,
G4bool useFullExtent = false);
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicalVolumeSearchScene.hh,v 1.13 2005/01/27 20:06:37 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 10th August 1998.
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhysicalVolumeSearchScene.icc,v 1.5 2005/01/27 20:06:42 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 10th August 1998.
@@ -22,7 +22,7 @@
//
//
// $Id: G4ScaleModel.hh,v 1.2 2001/08/24 20:36:18 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 21st July 2001.
@@ -22,7 +22,7 @@
//
//
// $Id: G4ScaleModel.icc,v 1.2 2001/08/24 20:36:19 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
inline G4String G4ScaleModel::GetCurrentTag () const {
return fGlobalTag;
@@ -22,7 +22,7 @@
//
//
// $Id: G4TextModel.hh,v 1.5 2005/05/31 17:01:25 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 3rd April 2001
@@ -22,7 +22,7 @@
//
//
// $Id: G4TextModel.icc,v 1.3 2001/08/24 20:36:22 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
inline G4String G4TextModel::GetCurrentTag () const {
return fGlobalTag;
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoriesModel.hh,v 1.8 2002/11/11 18:39:28 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 26th August 1998.
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoriesModel.icc,v 1.6 2001/08/24 20:36:24 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
inline G4String G4TrajectoriesModel::GetCurrentTag () const {
return fGlobalTag;
@@ -0,0 +1,71 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4TrajectoryDrawByCharge.hh,v 1.3 2005/11/23 05:19:23 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl November 2005
//
// Class Description:
// Trajectory model which colours a trajectory according to
// charge. Guts taken from G4VTrajectory::DrawTrajectory method.
// Class Description - End:
#ifndef G4TRAJECTORYDRAWBYCHARGE_HH
#define G4TRAJECTORYDRAWBYCHARGE_HH
#include "G4Colour.hh"
#include "G4VTrajectoryModel.hh"
#include <map>
class G4TrajectoryDrawByCharge : public G4VTrajectoryModel {
public: // With description
enum Charge {Negative=-1, Neutral=0, Positive=1};
G4TrajectoryDrawByCharge(const G4String& name = "Unspecified");
G4TrajectoryDrawByCharge(const G4String& name,
const G4Colour& positive,
const G4Colour& negative,
const G4Colour& neutral);
virtual ~G4TrajectoryDrawByCharge();
virtual void Draw(const G4VTrajectory& trajectory, G4int i_mode = 0) const;
// Draw the trajectory with optional i_mode parameter
virtual void Print(std::ostream& ostr) const;
// Print configuration
void Set(Charge charge, const G4String& colour);
void Set(Charge charge, const G4Colour& colour);
// Configuration functions
private:
// Data member
std::map<Charge, G4Colour> fMap;
};
#endif
@@ -0,0 +1,69 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4TrajectoryDrawByParticleID.hh,v 1.3 2005/11/23 05:19:23 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl November 2005
//
// Class Description:
// Trajectory model which colours a trajectory according to
// particle type.
// Class Description - End:
#ifndef G4TRAJECTORYDRAWBYPARTICLEID
#define G4TRAJECTORYDRAWBYPARTICLEID
#include "G4VTrajectoryModel.hh"
#include "G4Colour.hh"
#include "G4String.hh"
#include <map>
class G4TrajectoryDrawByParticleID : public G4VTrajectoryModel {
public: // With description
G4TrajectoryDrawByParticleID(const G4String& name = "Unspecified");
virtual ~G4TrajectoryDrawByParticleID();
virtual void Draw(const G4VTrajectory&, G4int) const;
// Draw the trajectory with optional i_mode parameter
virtual void Print(std::ostream& ostr) const;
// Print configuration
void SetDefault(const G4String&);
void SetDefault(const G4Colour&);
void Set(const G4String& particle, const G4String& colour);
void Set(const G4String& particle, const G4Colour& colour);
// Configuration functions
private:
// Data members
std::map<G4String, G4Colour> fMap;
G4Colour fDefault;
};
#endif
@@ -0,0 +1,45 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4TrajectoryDrawerUtils.hh,v 1.2 2005/11/21 05:44:44 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl November 2005
//
// Class Description
// Simple trajectory model drawing utility functions
// Class Description - End:
#ifndef G4TRAJECTORYDRAWERUTILS
#define G4TRAJECTORYDRAWERUTILS
class G4Polyline;
class G4Polymarker;
class G4VTrajectory;
namespace G4TrajectoryDrawerUtils {
void GetPoints(const G4VTrajectory& traj, G4Polyline& trajectoryLine,
G4Polymarker& auxiliaryPoints, G4Polymarker& stepPoints);
}
#endif
@@ -0,0 +1,69 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4TrajectoryModelFactories.hh,v 1.2 2005/11/23 05:19:23 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl October 2005
//
// Class Description:
// Trajectory model factories creating trajectory models
// and associated messengers
// Class Description - End:
#ifndef G4TRAJECTORYMODELFACTORIES_HH
#define G4TRAJECTORYMODELFACTORIES_HH
#include "G4VModelFactory.hh"
#include "G4VTrajectoryModel.hh"
namespace {
typedef std::vector<G4UImessenger*> Messengers;
typedef std::pair<G4VTrajectoryModel*, Messengers > ModelAndMessengers;
}
class G4TrajectoryDrawByChargeFactory : public G4VModelFactory<G4VTrajectoryModel> {
public: // With description
G4TrajectoryDrawByChargeFactory();
virtual ~G4TrajectoryDrawByChargeFactory();
ModelAndMessengers Create(const G4String& placement, const G4String& name);
};
class G4TrajectoryDrawByParticleIDFactory : public G4VModelFactory<G4VTrajectoryModel> {
public: // With description
G4TrajectoryDrawByParticleIDFactory();
virtual ~G4TrajectoryDrawByParticleIDFactory();
ModelAndMessengers Create(const G4String& placement, const G4String& name);
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VModel.hh,v 1.16 2005/03/03 16:39:15 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4VModel.hh,v 1.17 2005/11/22 16:29:40 allison Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 31st December 1997.
@@ -55,7 +55,7 @@ public: // With description
friend std::ostream& operator << (std::ostream& os, const G4VModel&);
G4VModel
(const G4Transform3D& modelTransformation = G4Transform3D::Identity,
(const G4Transform3D& modelTransformation = G4Transform3D(),
const G4ModelingParameters* = 0);
virtual ~G4VModel ();
@@ -22,7 +22,7 @@
//
//
// $Id: G4VModel.icc,v 1.10 2005/03/03 16:39:15 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// John Allison 31st December 1997.
@@ -0,0 +1,89 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4VModelCommand.hh,v 1.2 2005/11/28 20:07:11 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl November 2005
//
// Class Description
// Templated base class for model messengers. Commands specific to a particular
// concrete model should inherit from G4VModelCommand, with the concrete model
// type as the template parameter.
// Class Description - End:
#ifndef G4VMODELCOMMAND_HH
#define G4VMODELCOMMAND_HH
#include "G4UImessenger.hh"
#include "G4String.hh"
class G4UIcommand;
template <typename T>
class G4VModelCommand : public G4UImessenger {
public: // With description
G4VModelCommand(T* model);
// Input model
virtual ~G4VModelCommand();
G4String GetCurrentValue(G4UIcommand* command);
protected:
T* Model();
// Access to model
private:
T* fpModel;
};
template <typename T>
G4VModelCommand<T>::G4VModelCommand(T* model)
:fpModel(model)
{}
template <typename T>
G4VModelCommand<T>::~G4VModelCommand() {}
template <typename T>
G4String
G4VModelCommand<T>::GetCurrentValue(G4UIcommand*)
{
return "";
}
template <typename T>
T*
G4VModelCommand<T>::Model()
{
return fpModel;
}
#endif
@@ -0,0 +1,80 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4VModelFactory.hh,v 1.1 2005/11/21 05:44:44 tinslay Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl October 2005
//
// Class Description:
// Abstract base class for model factories. Derived classes
// must implement the Create method, creating a new model
// and associated messengers.
// Class Description - End:
#ifndef G4VMODELFACTORY
#define G4VMODELFACTORY
#include "G4String.hh"
#include <utility>
#include <vector>
class G4UImessenger;
template <class T>
class G4VModelFactory {
public: // With description
typedef std::vector<G4UImessenger*> Messengers;
typedef std::pair<T*, Messengers> ModelAndMessengers;
G4VModelFactory(const G4String& name);
virtual ~G4VModelFactory();
G4String Name();
virtual ModelAndMessengers Create(const G4String& placement, const G4String& modelName) = 0;
private:
G4String fName;
};
template <typename T>
G4VModelFactory<T>::G4VModelFactory(const G4String& name)
:fName(name)
{}
template <typename T>
G4VModelFactory<T>::~G4VModelFactory() {}
template <typename T>
G4String
G4VModelFactory<T>::Name()
{
return fName;
}
#endif
@@ -0,0 +1,66 @@
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4VTrajectoryModel.hh,v 1.3 2005/12/02 19:16:15 perl Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// Jane Tinslay, John Allison, Joseph Perl October 2005
//
// Class Description:
// Abstract base class for trajectory models. Trajectory models are responsible
// for drawing individual trajectories according to a particular style.
// Class Description - End:
#ifndef G4VTRAJECTORYMODEL_HH
#define G4VTRAJECTORYMODEL_HH
#include "G4String.hh"
#include <iostream>
class G4VTrajectory;
class G4VTrajectoryModel {
public: // With description
G4VTrajectoryModel(const G4String& name):fName(name) {}
virtual ~G4VTrajectoryModel() {}
virtual void Draw(const G4VTrajectory& trajectory, G4int i_mode = 0) const = 0;
// Draw the trajectory with optional i_mode parameter
virtual void Print(std::ostream& ostr) const = 0;
// Print configuration
G4String Name() const ;
protected:
// Data member
G4String fName;
};
inline G4String G4VTrajectoryModel::Name() const {return fName;}
#endif