Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TrajectoryDrawByParticleIDFactory Class Reference

#include <G4TrajectoryModelFactories.hh>

+ Inheritance diagram for G4TrajectoryDrawByParticleIDFactory:

Public Member Functions

 G4TrajectoryDrawByParticleIDFactory ()
 
virtual ~G4TrajectoryDrawByParticleIDFactory ()
 
ModelAndMessengers Create (const G4String &placement, const G4String &name)
 
- Public Member Functions inherited from G4VModelFactory< G4VTrajectoryModel >
 G4VModelFactory (const G4String &name)
 
virtual ~G4VModelFactory ()
 
G4String Name ()
 
virtual ModelAndMessengers Create (const G4String &placement, const G4String &modelName)=0
 
void Print (std::ostream &ostr) const
 

Additional Inherited Members

- Public Types inherited from G4VModelFactory< G4VTrajectoryModel >
typedef std::vector< G4UImessenger * > Messengers
 
typedef std::pair< G4VTrajectoryModel *, MessengersModelAndMessengers
 

Detailed Description

Definition at line 82 of file G4TrajectoryModelFactories.hh.

Constructor & Destructor Documentation

◆ G4TrajectoryDrawByParticleIDFactory()

G4TrajectoryDrawByParticleIDFactory::G4TrajectoryDrawByParticleIDFactory ( )

Definition at line 120 of file G4TrajectoryModelFactories.cc.

◆ ~G4TrajectoryDrawByParticleIDFactory()

G4TrajectoryDrawByParticleIDFactory::~G4TrajectoryDrawByParticleIDFactory ( )
virtual

Definition at line 124 of file G4TrajectoryModelFactories.cc.

124{}

Member Function Documentation

◆ Create()

ModelAndMessengers G4TrajectoryDrawByParticleIDFactory::Create ( const G4String placement,
const G4String name 
)
virtual

Implements G4VModelFactory< G4VTrajectoryModel >.

Definition at line 127 of file G4TrajectoryModelFactories.cc.

128{
129 Messengers messengers;
130
131 // Create default context and model
132 G4VisTrajContext* context = new G4VisTrajContext("default");
134
135 // Create messengers for default context configuration
136 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
137
138 // Create messengers for drawer
139 messengers.push_back(new G4ModelCmdSetStringColour<G4TrajectoryDrawByParticleID>(model, placement));
140 messengers.push_back(new G4ModelCmdSetDefaultColour<G4TrajectoryDrawByParticleID>(model, placement));
141 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryDrawByParticleID>(model, placement));
142
143 return ModelAndMessengers(model, messengers);
144}
std::vector< G4UImessenger * > Messengers
std::pair< G4VTrajectoryModel *, Messengers > ModelAndMessengers
void AddContextMsgrs(G4VisTrajContext *context, std::vector< G4UImessenger * > &messengers, const G4String &placement)

The documentation for this class was generated from the following files: