Geant4 11.1.1
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 ()=default
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () 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 (const G4String &s)
 
G4long StoL (const G4String &s)
 
G4double StoD (const G4String &s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Detailed Description

Definition at line 40 of file G4HepRepMessenger.hh.

Constructor & Destructor Documentation

◆ ~G4HepRepMessenger()

G4HepRepMessenger::~G4HepRepMessenger ( )
virtual

Definition at line 189 of file G4HepRepMessenger.cc.

190{
191 delete setFileDirCommand;
192 delete setFileNameCommand;
193 delete setOverwriteCommand;
194 delete setCullInvisiblesCommand;
195 delete renderCylAsPolygonsCommand;
196 delete setScaleCommand;
197 delete setCenterCommand;
198 delete setEventNumberSuffixCommand;
199 delete appendGeometryCommand;
200 delete addPointAttributesCommand;
201 delete useSolidsCommand;
202 delete heprepDirectory;
203}

Member Function Documentation

◆ addPointAttributes()

G4bool G4HepRepMessenger::addPointAttributes ( )
virtual

Definition at line 323 of file G4HepRepMessenger.cc.

323{ return pointAttributes; }

◆ appendGeometry()

G4bool G4HepRepMessenger::appendGeometry ( )
virtual

Definition at line 321 of file G4HepRepMessenger.cc.

321{ return geometry; }

◆ getCenter()

G4ThreeVector G4HepRepMessenger::getCenter ( )
virtual

Definition at line 317 of file G4HepRepMessenger.cc.

317{ return center; }

Referenced by G4HepRepFileXMLWriter::addPoint().

◆ getCullInvisibles()

G4bool G4HepRepMessenger::getCullInvisibles ( )
virtual

Definition at line 311 of file G4HepRepMessenger.cc.

311{ return cullInvisibles; }

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

◆ GetCurrentValue()

G4String G4HepRepMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 205 of file G4HepRepMessenger.cc.

206{
207 if(command == setFileDirCommand)
208 {
209 return fileDir;
210 }
211 else if(command == setFileNameCommand)
212 {
213 return fileName;
214 }
215 else if(command == setOverwriteCommand)
216 {
217 return G4UIcommand::ConvertToString(overwrite);
218 }
219 else if(command == setCullInvisiblesCommand)
220 {
221 return G4UIcommand::ConvertToString(cullInvisibles);
222 }
223 else if(command == renderCylAsPolygonsCommand)
224 {
225 return renderCylAsPolygonsCommand->ConvertToString(cylAsPolygons);
226 }
227 else if(command == setScaleCommand)
228 {
229 return setScaleCommand->ConvertToString(scale);
230 }
231 else if(command == setCenterCommand)
232 {
233 return setCenterCommand->ConvertToString(center, "m");
234 }
235 else if(command == setEventNumberSuffixCommand)
236 {
237 return suffix;
238 }
239 else if(command == appendGeometryCommand)
240 {
241 return appendGeometryCommand->ConvertToString(geometry);
242 }
243 else if(command == addPointAttributesCommand)
244 {
245 return addPointAttributesCommand->ConvertToString(pointAttributes);
246 }
247 else if(command == useSolidsCommand)
248 {
249 return useSolidsCommand->ConvertToString(solids);
250 }
251 else
252 {
253 return "";
254 }
255}
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:446

◆ getEventNumberSuffix()

G4String G4HepRepMessenger::getEventNumberSuffix ( )
virtual

Definition at line 319 of file G4HepRepMessenger.cc.

319{ return suffix; }

◆ getFileDir()

G4String G4HepRepMessenger::getFileDir ( )
virtual

Definition at line 305 of file G4HepRepMessenger.cc.

305{ return fileDir; }

◆ getFileName()

G4String G4HepRepMessenger::getFileName ( )
virtual

Definition at line 307 of file G4HepRepMessenger.cc.

307{ return fileName; }

◆ GetInstance()

G4HepRepMessenger * G4HepRepMessenger::GetInstance ( )
static

◆ getOverwrite()

G4bool G4HepRepMessenger::getOverwrite ( )
virtual

Definition at line 309 of file G4HepRepMessenger.cc.

309{ return overwrite; }

◆ getScale()

G4double G4HepRepMessenger::getScale ( )
virtual

Definition at line 315 of file G4HepRepMessenger.cc.

315{ return scale; }

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

◆ renderCylAsPolygons()

G4bool G4HepRepMessenger::renderCylAsPolygons ( )
virtual

Definition at line 313 of file G4HepRepMessenger.cc.

313{ return cylAsPolygons; }

Referenced by G4HepRepFileSceneHandler::AddSolid().

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 257 of file G4HepRepMessenger.cc.

258{
259 if(command == setFileDirCommand)
260 {
261 fileDir = newValue;
262 }
263 else if(command == setFileNameCommand)
264 {
265 fileName = newValue;
266 }
267 else if(command == setOverwriteCommand)
268 {
269 overwrite = setOverwriteCommand->GetNewBoolValue(newValue);
270 }
271 else if(command == setCullInvisiblesCommand)
272 {
273 cullInvisibles = setCullInvisiblesCommand->GetNewBoolValue(newValue);
274 }
275 else if(command == renderCylAsPolygonsCommand)
276 {
277 cylAsPolygons = renderCylAsPolygonsCommand->GetNewBoolValue(newValue);
278 }
279 else if(command == setScaleCommand)
280 {
281 scale = setScaleCommand->GetNewDoubleValue(newValue);
282 }
283 else if(command == setCenterCommand)
284 {
285 center = setCenterCommand->GetNew3VectorValue(newValue);
286 }
287 else if(command == setEventNumberSuffixCommand)
288 {
289 suffix = newValue;
290 }
291 else if(command == appendGeometryCommand)
292 {
293 geometry = appendGeometryCommand->GetNewBoolValue(newValue);
294 }
295 else if(command == addPointAttributesCommand)
296 {
297 pointAttributes = addPointAttributesCommand->GetNewBoolValue(newValue);
298 }
299 else if(command == useSolidsCommand)
300 {
301 solids = useSolidsCommand->GetNewBoolValue(newValue);
302 }
303}
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 325 of file G4HepRepMessenger.cc.

325{ return solids; }

◆ writeInvisibles()

G4bool G4HepRepMessenger::writeInvisibles ( )
virtual

Definition at line 327 of file G4HepRepMessenger.cc.

327{ return invisibles; }

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