Message: GetCurrentValue of G4UIcommand Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question GetCurrentValue of G4UIcommand 

Forum: Analysis
Date: 14 Jan, 2016
From: Zhiyi Liu <Zhiyi Liu>

I am using a messenger to read parameters from a macro file. The doc that I am referring to is:

In my messenger code, I defined several commands using G4UIcmdWithADouble. In order to print what I set in my macro file, I try to print the commands and its parameter in the function, SetNewValue(...) by using:

  //print command
  std::cout << command->GetCommandPath()
   << " "
   << command->GetCurrentValue()
   << " #" << command->GetGuidanceLine(0)
   << std::endl;

However, it is weird to notice that only the current value of the 1st command defined in the constructor of the messenger is properly printed, other commands defined afterwards have an empty "current value" string.

I suspect this is a bug of GetCurrentValue(), please confirm.


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: GetCurrentValue of G4UIcommand   (Michael H. Kelsey - 15 Jan, 2016)
 Add Message Add Message
to: "GetCurrentValue of G4UIcommand"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]