Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
$Id: History 110932 2018-06-26 08:06:51Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,12 +17,20 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
20 December, 2017 Makoto Asai (intercoms-V10-03-05)
|
||||
26 Jone, 2018 K. Murakami (intercoms-V10-04-03)
|
||||
- G4G4InteractorMessenger.cc ::fix compilation warning for -Wunused-result
|
||||
|
||||
17 May, 2018 J. Madsen (intercoms-V10-04-02)
|
||||
- updated "thread-local-static-var" model to
|
||||
"function-returning-thread-local-static-reference" model
|
||||
which fixes Windows DLL + MT
|
||||
|
||||
20 December, 2017 Makoto Asai (intercoms-V10-04-01)
|
||||
- G4UIcommand, G4UImanager: additional implementation for adding
|
||||
a mechanism of carrying back error message from the messenger
|
||||
if a command is rejected due to the target class or the messenger.
|
||||
|
||||
18 December, 2017 Makoto Asai
|
||||
18 December, 2017 Makoto Asai (intercoms-V10-04-00)
|
||||
- G4UIcommand: added a mechanism of carrying error message from
|
||||
the messenger.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcommand.hh 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
// $Id: G4UIcommand.hh 108081 2017-12-21 07:53:54Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UImanager.hh 106172 2017-09-15 13:03:57Z gcosmo $
|
||||
// $Id: G4UImanager.hh 110270 2018-05-17 14:38:26Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4UImanager_h
|
||||
@@ -147,9 +147,9 @@ class G4UImanager : public G4VStateDependent
|
||||
// void Interact(const char * promptCharacters);
|
||||
|
||||
private:
|
||||
G4ICOMS_DLL static G4ThreadLocal G4UImanager * fUImanager;
|
||||
G4ICOMS_DLL static G4ThreadLocal G4bool fUImanagerHasBeenKilled;
|
||||
G4ICOMS_DLL static G4UImanager * fMasterUImanager;
|
||||
G4ICOMS_DLL static G4UImanager*& fUImanager(); // thread-local
|
||||
G4ICOMS_DLL static G4bool& fUImanagerHasBeenKilled(); // thread-local
|
||||
G4ICOMS_DLL static G4UImanager*& fMasterUImanager();
|
||||
G4UIcommandTree * treeTop;
|
||||
G4UIsession * session;
|
||||
G4UIsession * g4UIWindow;
|
||||
@@ -265,7 +265,7 @@ class G4UImanager : public G4VStateDependent
|
||||
if(val&&!bridges)
|
||||
{
|
||||
bridges = new std::vector<G4UIbridge*>;
|
||||
fMasterUImanager = this;
|
||||
fMasterUImanager() = this;
|
||||
}
|
||||
}
|
||||
inline void SetIgnoreCmdNotFound(G4bool val)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcommand.cc 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
// $Id: G4UIcommand.cc 108081 2017-12-21 07:53:54Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcontrolMessenger.cc 102561 2017-02-09 08:16:05Z gcosmo $
|
||||
// $Id: G4UIcontrolMessenger.cc 110932 2018-06-26 08:06:51Z gcosmo $
|
||||
//
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -452,7 +452,8 @@ void G4UIcontrolMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
{ G4cout << UI->SolveAlias(newValue) << G4endl; }
|
||||
if(command==shellCommand)
|
||||
{
|
||||
system(newValue);
|
||||
int rc = system(newValue);
|
||||
if ( rc < 0 ) {}
|
||||
}
|
||||
if(command==loopCommand)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UImanager.cc 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
// $Id: G4UImanager.cc 110270 2018-05-17 14:38:26Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
@@ -49,28 +49,42 @@
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
G4ThreadLocal G4UImanager * G4UImanager::fUImanager = 0;
|
||||
G4ThreadLocal G4bool G4UImanager::fUImanagerHasBeenKilled = false;
|
||||
G4UImanager * G4UImanager::fMasterUImanager = 0;
|
||||
G4UImanager*& G4UImanager::fUImanager()
|
||||
{
|
||||
G4ThreadLocalStatic G4UImanager* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4bool& G4UImanager::fUImanagerHasBeenKilled()
|
||||
{
|
||||
G4ThreadLocalStatic bool _instance = false;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4UImanager*& G4UImanager::fMasterUImanager()
|
||||
{
|
||||
static G4UImanager* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
G4bool G4UImanager::doublePrecisionStr = false;
|
||||
|
||||
G4int G4UImanager::igThreadID = -1;
|
||||
|
||||
G4UImanager * G4UImanager::GetUIpointer()
|
||||
{
|
||||
if(!fUImanager)
|
||||
if(!fUImanager())
|
||||
{
|
||||
if(!fUImanagerHasBeenKilled)
|
||||
if(!fUImanagerHasBeenKilled())
|
||||
{
|
||||
fUImanager = new G4UImanager;
|
||||
fUImanager->CreateMessenger();
|
||||
fUImanager() = new G4UImanager;
|
||||
fUImanager()->CreateMessenger();
|
||||
}
|
||||
}
|
||||
return fUImanager;
|
||||
return fUImanager();
|
||||
}
|
||||
|
||||
G4UImanager * G4UImanager::GetMasterUIpointer()
|
||||
{ return fMasterUImanager; }
|
||||
{ return fMasterUImanager(); }
|
||||
|
||||
G4UImanager::G4UImanager()
|
||||
: G4VStateDependent(true),
|
||||
@@ -120,8 +134,8 @@ G4UImanager::~G4UImanager()
|
||||
delete UImessenger;
|
||||
delete treeTop;
|
||||
delete aliasList;
|
||||
fUImanagerHasBeenKilled = true;
|
||||
fUImanager = NULL;
|
||||
fUImanagerHasBeenKilled() = true;
|
||||
fUImanager() = NULL;
|
||||
if(commandStack)
|
||||
{
|
||||
commandStack->clear();
|
||||
@@ -274,8 +288,8 @@ G4int parameterNumber, G4bool reGet)
|
||||
void G4UImanager::AddNewCommand(G4UIcommand * newCommand)
|
||||
{
|
||||
treeTop->AddNewCommand( newCommand );
|
||||
if(fMasterUImanager!=0&&G4Threading::G4GetThreadId()==0)
|
||||
{ fMasterUImanager->AddWorkerCommand(newCommand); }
|
||||
if(fMasterUImanager()!=0&&G4Threading::G4GetThreadId()==0)
|
||||
{ fMasterUImanager()->AddWorkerCommand(newCommand); }
|
||||
}
|
||||
|
||||
void G4UImanager::AddWorkerCommand(G4UIcommand * newCommand)
|
||||
@@ -286,8 +300,8 @@ void G4UImanager::AddWorkerCommand(G4UIcommand * newCommand)
|
||||
void G4UImanager::RemoveCommand(G4UIcommand * aCommand)
|
||||
{
|
||||
treeTop->RemoveCommand( aCommand );
|
||||
if(fMasterUImanager!=0&&G4Threading::G4GetThreadId()==0)
|
||||
{ fMasterUImanager->RemoveWorkerCommand(aCommand); }
|
||||
if(fMasterUImanager()!=0&&G4Threading::G4GetThreadId()==0)
|
||||
{ fMasterUImanager()->RemoveWorkerCommand(aCommand); }
|
||||
}
|
||||
|
||||
void G4UImanager::RemoveWorkerCommand(G4UIcommand * aCommand)
|
||||
|
||||
Reference in New Issue
Block a user