Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -6,6 +6,17 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-10-16 Makoto Asai (intercoms-V11-01-08)
|
||||
- Add G4UImessenger::LtoS().
|
||||
- Missed when StoL() was introduced.
|
||||
|
||||
## 2023-08-11 John Allison (intercoms-V11-01-07)
|
||||
- Add G4UImanager::GetBaseSession().
|
||||
- Find base session in a hierarchy of sessions.
|
||||
|
||||
## 2023-07-20 Ben Morgan (intercoms-V11-01-06)
|
||||
- Make range check setup consistent between parameters/commands
|
||||
|
||||
## 2023-05-03 Gabriele Cosmo (intercoms-V11-01-05)
|
||||
- Fixed compilation warning on gcc-13.1 for array subscript outside array
|
||||
bounds in G4ProfilerMessenger::SetNewValue().
|
||||
|
||||
@@ -177,6 +177,8 @@ class G4UImanager : public G4VStateDependent
|
||||
inline G4UIcommandTree* GetTree() const { return treeTop; }
|
||||
inline G4UIsession* GetSession() const { return session; }
|
||||
inline G4UIsession* GetG4UIWindow() const { return g4UIWindow; }
|
||||
// Find base session in a hierarchy of sessions
|
||||
G4UIsession* GetBaseSession() const;
|
||||
|
||||
// These methods define the active (G)UI session
|
||||
inline void SetSession(G4UIsession* const value) { session = value; }
|
||||
|
||||
@@ -73,6 +73,7 @@ class G4UImessenger
|
||||
|
||||
protected:
|
||||
G4String ItoS(G4int i);
|
||||
G4String LtoS(G4long l);
|
||||
G4String DtoS(G4double a);
|
||||
G4String BtoS(G4bool b);
|
||||
G4int StoI(const G4String& s);
|
||||
|
||||
@@ -879,3 +879,23 @@ void G4UImanager::SetThreadIgnoreInit(G4bool flg)
|
||||
}
|
||||
threadCout->SetIgnoreInit(flg);
|
||||
}
|
||||
|
||||
G4UIsession* G4UImanager::GetBaseSession() const
|
||||
{
|
||||
// There may be no session - pure batch mode (session == nullptr)
|
||||
// If there is a session, it may be a batch session used for processing macros.
|
||||
// Find base session of this hierarchy of batch sessions.
|
||||
G4UIsession* baseSession = session;
|
||||
while (auto aBatchSession = dynamic_cast<G4UIbatch*>(baseSession)) {
|
||||
auto previousSession = aBatchSession->GetPreviousSession();
|
||||
if (previousSession == nullptr) {
|
||||
// No previouse session - aBatchSession is the desired base session
|
||||
baseSession = aBatchSession;
|
||||
break;
|
||||
}
|
||||
// There is a previous session, which may or may not be a batch.
|
||||
// If not, it will be our desired base - so record and test again.
|
||||
baseSession = previousSession;
|
||||
}
|
||||
return baseSession;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,14 @@ G4String G4UImessenger::ItoS(G4int i)
|
||||
return G4String(os.str());
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4String G4UImessenger::LtoS(G4long l)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << l;
|
||||
return G4String(os.str());
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4String G4UImessenger::DtoS(G4double a)
|
||||
{
|
||||
|
||||
@@ -241,9 +241,14 @@ G4bool G4UIparameter::RangeCheck(const char* newValue)
|
||||
case 'L':
|
||||
is >> newVal.L;
|
||||
break;
|
||||
case 'S':
|
||||
is >> newVal.S;
|
||||
break;
|
||||
case 'B':
|
||||
is >> newVal.C;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
// PrintToken(); // Print tokens (consumes all tokens)
|
||||
token = Yylex();
|
||||
result = Expression();
|
||||
if (paramERR == 1) {
|
||||
|
||||
Reference in New Issue
Block a user