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

#include <G4HepRepMessenger.hh>

+ Inheritance diagram for G4HepRepMessenger:

Public Member Functions

virtual ~G4HepRepMessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
virtual G4String getFileDir ()
 
virtual G4String getFileName ()
 
virtual G4bool getOverwrite ()
 
virtual G4bool getCullInvisibles ()
 
virtual G4bool renderCylAsPolygons ()
 
virtual G4double getScale ()
 
virtual G4ThreeVector getCenter ()
 
virtual G4String getEventNumberSuffix ()
 
virtual G4bool appendGeometry ()
 
virtual G4bool addPointAttributes ()
 
virtual G4bool useSolids ()
 
virtual G4bool writeInvisibles ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 

Static Public Member Functions

static G4HepRepMessengerGetInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 41 of file G4HepRepMessenger.hh.

Constructor & Destructor Documentation

◆ ~G4HepRepMessenger()

G4HepRepMessenger::~G4HepRepMessenger ( )
virtual

Definition at line 153 of file G4HepRepMessenger.cc.

153 {
154 delete setFileDirCommand;
155 delete setFileNameCommand;
156 delete setOverwriteCommand;
157 delete setCullInvisiblesCommand;
158 delete renderCylAsPolygonsCommand;
159 delete setScaleCommand;
160 delete setCenterCommand;
161 delete setEventNumberSuffixCommand;
162 delete appendGeometryCommand;
163 delete addPointAttributesCommand;
164 delete useSolidsCommand;
165 delete heprepDirectory;
166}

Member Function Documentation

◆ addPointAttributes()

G4bool G4HepRepMessenger::addPointAttributes ( )
virtual

Definition at line 258 of file G4HepRepMessenger.cc.

258 {
259 return pointAttributes;
260}

◆ appendGeometry()

G4bool G4HepRepMessenger::appendGeometry ( )
virtual

Definition at line 254 of file G4HepRepMessenger.cc.

254 {
255 return geometry;
256}

Referenced by G4HepRepSceneHandler::closeHepRep(), and G4HepRepViewer::ShowView().

◆ getCenter()

G4ThreeVector G4HepRepMessenger::getCenter ( )
virtual

Definition at line 246 of file G4HepRepMessenger.cc.

246 {
247 return center;
248}

Referenced by G4HepRepFileXMLWriter::addPoint().

◆ getCullInvisibles()

G4bool G4HepRepMessenger::getCullInvisibles ( )
virtual

Definition at line 234 of file G4HepRepMessenger.cc.

234 {
235 return cullInvisibles;
236}

Referenced by G4HepRepFileSceneHandler::AddPrimitive(), and G4HepRepFileSceneHandler::AddSolid().

◆ GetCurrentValue()

G4String G4HepRepMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 168 of file G4HepRepMessenger.cc.

168 {
169 if (command==setFileDirCommand) {
170 return fileDir;
171 } else if (command==setFileNameCommand) {
172 return fileName;
173 } else if (command==setOverwriteCommand) {
174 return overwrite;
175 } else if (command==setCullInvisiblesCommand) {
176 return cullInvisibles;
177 } else if (command==renderCylAsPolygonsCommand) {
178 return renderCylAsPolygonsCommand->ConvertToString(cylAsPolygons);
179 } else if (command==setScaleCommand) {
180 return setScaleCommand->ConvertToString(scale);
181 } else if (command==setCenterCommand) {
182 return setCenterCommand->ConvertToString(center,"m");
183 } else if (command==setEventNumberSuffixCommand) {
184 return suffix;
185 } else if (command==appendGeometryCommand) {
186 return appendGeometryCommand->ConvertToString(geometry);
187 } else if (command==addPointAttributesCommand) {
188 return addPointAttributesCommand->ConvertToString(pointAttributes);
189 } else if (command==useSolidsCommand) {
190 return useSolidsCommand->ConvertToString(solids);
191 } else {
192 return "";
193 }
194}
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:349

◆ getEventNumberSuffix()

G4String G4HepRepMessenger::getEventNumberSuffix ( )
virtual

Definition at line 250 of file G4HepRepMessenger.cc.

250 {
251 return suffix;
252}

◆ getFileDir()

G4String G4HepRepMessenger::getFileDir ( )
virtual

Definition at line 222 of file G4HepRepMessenger.cc.

222 {
223 return fileDir;
224}

◆ getFileName()

G4String G4HepRepMessenger::getFileName ( )
virtual

Definition at line 226 of file G4HepRepMessenger.cc.

226 {
227 return fileName;
228}

◆ GetInstance()

◆ getOverwrite()

G4bool G4HepRepMessenger::getOverwrite ( )
virtual

Definition at line 230 of file G4HepRepMessenger.cc.

230 {
231 return overwrite;
232}

◆ getScale()

G4double G4HepRepMessenger::getScale ( )
virtual

Definition at line 242 of file G4HepRepMessenger.cc.

242 {
243 return scale;
244}

Referenced by G4HepRepFileXMLWriter::addPoint(), and G4HepRepFileSceneHandler::AddSolid().

◆ renderCylAsPolygons()

G4bool G4HepRepMessenger::renderCylAsPolygons ( )
virtual

Definition at line 238 of file G4HepRepMessenger.cc.

238 {
239 return cylAsPolygons;
240}

Referenced by G4HepRepFileSceneHandler::AddSolid().

◆ SetNewValue()

void G4HepRepMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 196 of file G4HepRepMessenger.cc.

196 {
197 if (command==setFileDirCommand) {
198 fileDir = newValue;
199 } else if (command==setFileNameCommand) {
200 fileName = newValue;
201 } else if (command==setOverwriteCommand) {
202 overwrite = setOverwriteCommand->GetNewBoolValue(newValue);
203 } else if (command==setCullInvisiblesCommand) {
204 cullInvisibles = setCullInvisiblesCommand->GetNewBoolValue(newValue);
205 } else if (command==renderCylAsPolygonsCommand) {
206 cylAsPolygons = renderCylAsPolygonsCommand->GetNewBoolValue(newValue);
207 } else if (command==setScaleCommand) {
208 scale = setScaleCommand->GetNewDoubleValue(newValue);
209 } else if (command==setCenterCommand) {
210 center = setCenterCommand->GetNew3VectorValue(newValue);
211 } else if (command==setEventNumberSuffixCommand) {
212 suffix = newValue;
213 } else if (command==appendGeometryCommand) {
214 geometry = appendGeometryCommand->GetNewBoolValue(newValue);
215 } else if (command==addPointAttributesCommand) {
216 pointAttributes = addPointAttributesCommand->GetNewBoolValue(newValue);
217 } else if (command==useSolidsCommand) {
218 solids = useSolidsCommand->GetNewBoolValue(newValue);
219 }
220}
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)

◆ useSolids()

G4bool G4HepRepMessenger::useSolids ( )
virtual

Definition at line 262 of file G4HepRepMessenger.cc.

262 {
263 return solids;
264}

Referenced by G4HepRepSceneHandler::AddSolid().

◆ writeInvisibles()

G4bool G4HepRepMessenger::writeInvisibles ( )
virtual

Definition at line 266 of file G4HepRepMessenger.cc.

266 {
267 return invisibles;
268}

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