00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "G4ModelCompoundCommandsT.hh"
00031 #include "G4ModelCommandsT.hh"
00032 #include "G4ModelCommandUtils.hh"
00033 #include "G4TrajectoryDrawByAttribute.hh"
00034 #include "G4TrajectoryDrawByCharge.hh"
00035 #include "G4TrajectoryDrawByOriginVolume.hh"
00036 #include "G4TrajectoryDrawByParticleID.hh"
00037 #include "G4TrajectoryGenericDrawer.hh"
00038 #include "G4TrajectoryModelFactories.hh"
00039 #include "G4VisTrajContext.hh"
00040
00041
00042 G4TrajectoryDrawByAttributeFactory::G4TrajectoryDrawByAttributeFactory()
00043 :G4VModelFactory<G4VTrajectoryModel>("drawByAttribute")
00044 {}
00045
00046 G4TrajectoryDrawByAttributeFactory::~G4TrajectoryDrawByAttributeFactory() {}
00047
00048 ModelAndMessengers
00049 G4TrajectoryDrawByAttributeFactory::Create(const G4String& placement, const G4String& name)
00050 {
00051 Messengers messengers;
00052
00053
00054 G4VisTrajContext* context = new G4VisTrajContext("default");
00055
00056 G4TrajectoryDrawByAttribute* model = new G4TrajectoryDrawByAttribute(name, context);
00057
00058
00059 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
00060
00061 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryDrawByAttribute>(model, placement));
00062 messengers.push_back(new G4ModelCmdSetString<G4TrajectoryDrawByAttribute>(model, placement, "setAttribute"));
00063 messengers.push_back(new G4ModelCmdAddIntervalContext<G4TrajectoryDrawByAttribute>(model, placement, "addInterval"));
00064 messengers.push_back(new G4ModelCmdAddValueContext<G4TrajectoryDrawByAttribute>(model, placement, "addValue"));
00065
00066 return ModelAndMessengers(model, messengers);
00067 }
00068
00069 G4TrajectoryGenericDrawerFactory::G4TrajectoryGenericDrawerFactory()
00070 :G4VModelFactory<G4VTrajectoryModel>("generic")
00071 {}
00072
00073 G4TrajectoryGenericDrawerFactory::~G4TrajectoryGenericDrawerFactory() {}
00074
00075 ModelAndMessengers
00076 G4TrajectoryGenericDrawerFactory::Create(const G4String& placement, const G4String& name)
00077 {
00078 Messengers messengers;
00079
00080
00081 G4VisTrajContext* context = new G4VisTrajContext("default");
00082 G4TrajectoryGenericDrawer* model = new G4TrajectoryGenericDrawer(name, context);
00083
00084
00085 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
00086
00087
00088 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryGenericDrawer>(model, placement));
00089
00090 return ModelAndMessengers(model, messengers);
00091 }
00092
00093
00094 G4TrajectoryDrawByChargeFactory::G4TrajectoryDrawByChargeFactory()
00095 :G4VModelFactory<G4VTrajectoryModel>("drawByCharge")
00096 {}
00097
00098 G4TrajectoryDrawByChargeFactory::~G4TrajectoryDrawByChargeFactory() {}
00099
00100 ModelAndMessengers
00101 G4TrajectoryDrawByChargeFactory::Create(const G4String& placement, const G4String& name)
00102 {
00103 Messengers messengers;
00104
00105
00106 G4VisTrajContext* context = new G4VisTrajContext("default");
00107 G4TrajectoryDrawByCharge* model = new G4TrajectoryDrawByCharge(name, context);
00108
00109
00110 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
00111
00112
00113 messengers.push_back(new G4ModelCmdSetStringColour<G4TrajectoryDrawByCharge>(model, placement));
00114 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryDrawByCharge>(model, placement));
00115
00116 return ModelAndMessengers(model, messengers);
00117 }
00118
00119
00120 G4TrajectoryDrawByParticleIDFactory::G4TrajectoryDrawByParticleIDFactory()
00121 :G4VModelFactory<G4VTrajectoryModel>("drawByParticleID")
00122 {}
00123
00124 G4TrajectoryDrawByParticleIDFactory::~G4TrajectoryDrawByParticleIDFactory() {}
00125
00126 ModelAndMessengers
00127 G4TrajectoryDrawByParticleIDFactory::Create(const G4String& placement, const G4String& name)
00128 {
00129 Messengers messengers;
00130
00131
00132 G4VisTrajContext* context = new G4VisTrajContext("default");
00133 G4TrajectoryDrawByParticleID* model = new G4TrajectoryDrawByParticleID(name, context);
00134
00135
00136 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
00137
00138
00139 messengers.push_back(new G4ModelCmdSetStringColour<G4TrajectoryDrawByParticleID>(model, placement));
00140 messengers.push_back(new G4ModelCmdSetDefaultColour<G4TrajectoryDrawByParticleID>(model, placement));
00141 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryDrawByParticleID>(model, placement));
00142
00143 return ModelAndMessengers(model, messengers);
00144 }
00145
00146
00147 G4TrajectoryDrawByOriginVolumeFactory::G4TrajectoryDrawByOriginVolumeFactory()
00148 :G4VModelFactory<G4VTrajectoryModel>("drawByOriginVolume")
00149 {}
00150
00151 G4TrajectoryDrawByOriginVolumeFactory::~G4TrajectoryDrawByOriginVolumeFactory() {}
00152
00153 ModelAndMessengers
00154 G4TrajectoryDrawByOriginVolumeFactory::Create(const G4String& placement, const G4String& name)
00155 {
00156 Messengers messengers;
00157
00158
00159 G4VisTrajContext* context = new G4VisTrajContext("default");
00160 G4TrajectoryDrawByOriginVolume* model = new G4TrajectoryDrawByOriginVolume(name, context);
00161
00162
00163 G4ModelCommandUtils::AddContextMsgrs(context, messengers, placement+"/"+name);
00164
00165
00166 messengers.push_back(new G4ModelCmdSetStringColour<G4TrajectoryDrawByOriginVolume>(model, placement));
00167 messengers.push_back(new G4ModelCmdSetDefaultColour<G4TrajectoryDrawByOriginVolume>(model, placement));
00168 messengers.push_back(new G4ModelCmdVerbose<G4TrajectoryDrawByOriginVolume>(model, placement));
00169
00170 return ModelAndMessengers(model, messengers);
00171 }