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

#include <G4TrajectoryModelFactories.hh>

+ Inheritance diagram for G4TrajectoryDrawByChargeFactory:

Public Member Functions

 G4TrajectoryDrawByChargeFactory ()
 
virtual ~G4TrajectoryDrawByChargeFactory ()
 
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 58 of file G4TrajectoryModelFactories.hh.

Constructor & Destructor Documentation

◆ G4TrajectoryDrawByChargeFactory()

G4TrajectoryDrawByChargeFactory::G4TrajectoryDrawByChargeFactory ( )

Definition at line 94 of file G4TrajectoryModelFactories.cc.

◆ ~G4TrajectoryDrawByChargeFactory()

G4TrajectoryDrawByChargeFactory::~G4TrajectoryDrawByChargeFactory ( )
virtual

Definition at line 98 of file G4TrajectoryModelFactories.cc.

98{}

Member Function Documentation

◆ Create()

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

Implements G4VModelFactory< G4VTrajectoryModel >.

Definition at line 101 of file G4TrajectoryModelFactories.cc.

102{
103 Messengers messengers;
104
105 // Create default context and model
106 G4VisTrajContext* context = new G4VisTrajContext("default");
107 G4TrajectoryDrawByCharge* model = new G4TrajectoryDrawByCharge(name, context);
108
109 // Create messengers for default context configuration
110 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
111
112 // Create messengers for drawer
113 messengers.push_back(new G4ModelCmdSetStringColour<G4TrajectoryDrawByCharge>(model, placement));
114 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryDrawByCharge>(model, placement));
115
116 return ModelAndMessengers(model, messengers);
117}
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: