Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIArrayString.hh,v 1.2 2001/07/11 10:01:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UIArrayString_h
+6 -6
View File
@@ -21,16 +21,16 @@
// ********************************************************************
//
//
// $Id: G4UIWin32.hh,v 1.10 2001/07/11 10:01:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIWin32.hh,v 1.11 2003/06/16 16:55:54 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UIWin32_h
#define G4UIWin32_h
#if defined(G4UI_BUILD_WIN32_SESSION) || defined(G4UI_USE_WIN32)
#include "g4std/map"
#include "g4std/vector"
#include <map>
#include <vector>
#include "G4VBasicShell.hh"
#include "G4VInteractiveSession.hh"
@@ -94,7 +94,7 @@ private:
HWND mainWindow;
HWND textWindow,editWindow;
HMENU menuBar,defaultMenu;
G4std::map<int,G4String, G4std::less<int> > commands;
std::map<int,G4String, std::less<int> > commands;
void* textBuffer;
int textRows,textCols;
static LRESULT CALLBACK MainWindowProc(HWND,UINT,WPARAM,LPARAM);
@@ -102,7 +102,7 @@ private:
static LRESULT CALLBACK EditWindowProc(HWND,UINT,WPARAM,LPARAM);
G4bool fHelp;
G4int fHelpChoice;
G4std::vector<G4String> fHistory;
std::vector<G4String> fHistory;
int fHistoryPos;
};
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIXaw.hh,v 1.5 2001/07/11 10:01:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UIXaw_h
#define G4UIXaw_h
+4 -4
View File
@@ -21,15 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UIXm.hh,v 1.11 2001/07/11 10:01:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIXm.hh,v 1.12 2003/06/16 16:55:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UIXm_h
#define G4UIXm_h
#if defined(G4UI_BUILD_XM_SESSION) || defined(G4UI_USE_XM)
#include "g4std/map"
#include <map>
#include <X11/Intrinsic.h>
@@ -89,7 +89,7 @@ private:
void ExitHelp();
private:
Widget form,shell,command,menuBar,text;
G4std::map<Widget,G4String, G4std::less<Widget> > commands;
std::map<Widget,G4String, std::less<Widget> > commands;
static void commandEnteredCallback(Widget,XtPointer,XtPointer);
static void keyHandler(Widget,XtPointer,XEvent*,Boolean*);
G4bool fHelp;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcsh.hh,v 1.3 2001/07/11 10:01:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UIcsh_h
+4 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UItcsh.hh,v 1.5 2001/11/26 19:15:08 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UItcsh.hh,v 1.6 2003/06/16 16:55:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UItcsh_h
@@ -31,7 +31,7 @@
#ifndef WIN32
#include <termios.h>
#include "g4std/vector"
#include <vector>
#include "G4VUIshell.hh"
#include "G4UIcommand.hh"
#include "G4UIcommandTree.hh"
@@ -100,7 +100,7 @@ protected:
const G4String& str2) const;
// history functionality (history# is managed in itself)
G4std::vector<G4String> commandHistory;
std::vector<G4String> commandHistory;
G4int maxHistory; // max# of histories stored
G4int currentHistoryNo; // global
G4int relativeHistoryIndex; // local index relative to current history#
@@ -21,14 +21,14 @@
// ********************************************************************
//
//
// $Id: G4UIterminal.hh,v 1.7 2001/07/11 10:01:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIterminal.hh,v 1.8 2003/06/16 16:55:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4UIterminal_h
#define G4UIterminal_h 1
#include "g4std/fstream"
#include <fstream>
#include "G4UImanager.hh"
#include "G4VBasicShell.hh"
#include "G4VUIshell.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: G4VUIshell.hh,v 1.5 2001/11/26 19:15:08 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef G4VUIshell_h
@@ -21,11 +21,11 @@
// ********************************************************************
//
//
// $Id: G4UIArrayString.cc,v 1.6 2002/10/17 02:40:24 murakami Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIArrayString.cc,v 1.7 2003/06/16 16:55:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "g4std/iomanip"
#include <iomanip>
#include "G4UIArrayString.hh"
static const char strESC= '\033';
@@ -179,12 +179,12 @@ void G4UIArrayString::Show(G4int ncol)
colorWord= word(0,5);
word.erase(0,5);
}
if(!colorWord.empty()) G4cout << colorWord << G4std::flush;
if(!colorWord.empty()) G4cout << colorWord << std::flush;
G4cout << G4std::setiosflags(G4std::ios::left) << G4std::setw(GetNField(ix))
<< word.c_str() << G4std::flush;
G4cout << std::setiosflags(std::ios::left) << std::setw(GetNField(ix))
<< word.c_str() << std::flush;
// against problem w/ g++ iostream
if(ix != nc) G4cout << " " << G4std::flush;
if(ix != nc) G4cout << " " << std::flush;
else G4cout << G4endl;
}
}
+5 -7
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UIWin32.cc,v 1.7 2001/07/11 10:01:21 gunter Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIWin32.cc,v 1.9 2003/06/16 16:55:59 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// G.Barrand
@@ -32,11 +32,7 @@
#include <string.h>
#include <windows.h>
#include <windowsx.h>
#include <wingdi.h>
#include "g4std/strstream"
#include <strstream>
#include "G4UImanager.hh"
#include "G4StateManager.hh"
@@ -46,6 +42,8 @@
#include "G4UIWin32.hh"
#include <wingdi.h>
#define TEXT_MAX_LINES 300
class TextBuffer {
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIXaw.cc,v 1.5 2002/11/06 08:12:37 barrand Exp $
// GEANT4 tag $Name: geant4-05-01 $
// GEANT4 tag $Name: geant4-05-02 $
//
// G.Barrand
+6 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UIXm.cc,v 1.8 2002/11/06 08:12:37 barrand Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIXm.cc,v 1.11 2003/06/16 16:56:00 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// G.Barrand
@@ -30,7 +30,8 @@
#ifdef G4UI_BUILD_XM_SESSION
#include "g4std/strstream"
#include "G4Types.hh"
#include <strstream>
#include <string.h>
@@ -365,7 +366,7 @@ void G4UIXm::keyHandler (
Widget a_widget
,XtPointer a_tag
,XEvent* a_event
,Boolean* a_dispatch
,Boolean*
)
/***************************************************************************/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
@@ -382,7 +383,7 @@ void G4UIXm::keyHandler (
}
/***************************************************************************/
void clearButtonCallback (
Widget a_widget
Widget
,XtPointer a_tag
,XtPointer
)
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UIcsh.cc,v 1.6 2002/02/26 02:09:08 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIcsh.cc,v 1.7 2003/06/16 16:56:01 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "G4UIcsh.hh"
@@ -46,7 +46,7 @@ G4String G4UIcsh::GetCommandLine(const char* msg)
//////////////////////////////////
{
MakePrompt(msg);
G4cout << promptString << G4std::flush;
G4cout << promptString << std::flush;
G4String newCommand;
newCommand.readLine(G4cin, FALSE);
+23 -22
View File
@@ -21,14 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UItcsh.cc,v 1.8 2002/10/17 02:41:22 murakami Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UItcsh.cc,v 1.10 2003/06/16 16:56:02 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#ifndef WIN32
#include <ctype.h>
#include "g4std/strstream"
#include "G4Types.hh"
#include <strstream>
#include "G4StateManager.hh"
#include "G4UIcommandStatus.hh"
#include "G4UItcsh.hh"
@@ -107,7 +108,7 @@ void G4UItcsh::MakePrompt(const char* msg)
case 'h': // history#
{
char st[20];
G4std::ostrstream os(st,20);
std::ostrstream os(st,20);
os << currentHistoryNo << '\0';
promptString.append(st);
i++;
@@ -150,7 +151,7 @@ void G4UItcsh::InsertCharacter(char cc)
G4cout << commandLine[i];
for(i=cursorPosition-1; i<commandLine.length() ;i++)
G4cout << AsciiBS;
G4cout << G4std::flush;
G4cout << std::flush;
// command line string...
if(IsCursorLast()) { // add
@@ -169,7 +170,7 @@ void G4UItcsh::BackspaceCharacter()
// display...
if(IsCursorLast()) {
G4cout << AsciiBS << ' ' << AsciiBS << G4std::flush;
G4cout << AsciiBS << ' ' << AsciiBS << std::flush;
} else {
G4cout << AsciiBS;
size_t i;
@@ -180,7 +181,7 @@ void G4UItcsh::BackspaceCharacter()
for(i=cursorPosition-2; i< commandLine.length() ;i++){
G4cout << AsciiBS;
}
G4cout << G4std::flush;
G4cout << std::flush;
}
// command line string...
@@ -204,7 +205,7 @@ void G4UItcsh::DeleteCharacter()
for(i=cursorPosition-1; i< commandLine.length() ;i++){
G4cout << AsciiBS;
}
G4cout << G4std::flush;
G4cout << std::flush;
// command lin string...
commandLine.erase(cursorPosition-1, 1);
@@ -219,7 +220,7 @@ void G4UItcsh::ClearLine()
for(i= cursorPosition; i>=2; i--) G4cout << AsciiBS;
for(i=1; i<=G4int(commandLine.length()); i++) G4cout << ' ';
for(i=1; i<=G4int(commandLine.length()); i++) G4cout << AsciiBS;
G4cout << G4std::flush;
G4cout << std::flush;
// command line string...
commandLine.erase();
@@ -236,7 +237,7 @@ void G4UItcsh::ClearAfterCursor()
G4int i;
for(i=cursorPosition; i<=G4int(commandLine.length()); i++) G4cout << ' ';
for(i=commandLine.length(); i>=cursorPosition; i--) G4cout << AsciiBS;
G4cout << G4std::flush;
G4cout << std::flush;
// command line string...
commandLine.erase(cursorPosition-1,
@@ -250,10 +251,10 @@ void G4UItcsh::ClearScreen()
if(! clearString.empty() ) {
G4cout << clearString;
G4cout << promptString << commandLine << G4std::flush;
G4cout << promptString << commandLine << std::flush;
// reset cursur position
for(G4int i=commandLine.length()+1; i>=cursorPosition+1; i--)
G4cout << AsciiBS << G4std::flush;
G4cout << AsciiBS << std::flush;
}
}
@@ -263,7 +264,7 @@ void G4UItcsh::ForwardCursor()
{
if(IsCursorLast()) return;
G4cout << commandLine[(size_t)(cursorPosition-1)] << G4std::flush;
G4cout << commandLine[(size_t)(cursorPosition-1)] << std::flush;
cursorPosition++;
}
@@ -274,7 +275,7 @@ void G4UItcsh::BackwardCursor()
if(cursorPosition==1) return;
cursorPosition--;
G4cout << AsciiBS << G4std::flush;
G4cout << AsciiBS << std::flush;
}
//////////////////////////////
@@ -284,7 +285,7 @@ void G4UItcsh::MoveCursorTop()
for(G4int i=cursorPosition; i>1; i--){
G4cout << AsciiBS;
}
G4cout << G4std::flush;
G4cout << std::flush;
cursorPosition=1;
}
@@ -295,7 +296,7 @@ void G4UItcsh::MoveCursorEnd()
for(size_t i=cursorPosition-1; i<commandLine.length(); i++){
G4cout << commandLine[i];
}
G4cout << G4std::flush;
G4cout << std::flush;
cursorPosition=commandLine.length()+1;
}
@@ -314,7 +315,7 @@ void G4UItcsh::PreviousCommand()
relativeHistoryIndex--;
commandLine= RestoreHistory(currentHistoryNo+relativeHistoryIndex);
G4cout << commandLine << G4std::flush;
G4cout << commandLine << std::flush;
cursorPosition= commandLine.length()+1;
}
}
@@ -333,7 +334,7 @@ void G4UItcsh::NextCommand()
if(relativeHistoryIndex==0) commandLine= commandLineBuf;
else commandLine= RestoreHistory(currentHistoryNo+relativeHistoryIndex);
G4cout << commandLine << G4std::flush;
G4cout << commandLine << std::flush;
cursorPosition= commandLine.length()+1;
}
}
@@ -375,7 +376,7 @@ void G4UItcsh::ListMatchedCommand()
// list matched dirs/commands
ListCommand(vpath, vpath+vcmd);
G4cout << promptString << commandLine << G4std::flush;
G4cout << promptString << commandLine << std::flush;
}
////////////////////////////////
@@ -473,7 +474,7 @@ void G4UItcsh::CompleteCommand()
for(i=jt; i<=G4int(input.length())-1; i++) dspstr+= G4String(AsciiBS);
dspstr+= stream;
G4cout << dspstr << G4std::flush;
G4cout << dspstr << std::flush;
// command line string
input.remove(jt);
@@ -597,7 +598,7 @@ G4String G4UItcsh::GetCommandLine(const char* msg)
MakePrompt(msg); // update
relativeHistoryIndex= 0;
G4cout << promptString << G4std::flush;
G4cout << promptString << std::flush;
G4String newCommand= ReadLine(); // read line...
// multi-line
@@ -606,7 +607,7 @@ G4String G4UItcsh::GetCommandLine(const char* msg)
newCommand.remove(newCommand.length()-1);
G4cout << G4endl;
promptString= "? ";
G4cout << promptString << G4std::flush;
G4cout << promptString << std::flush;
G4String newLine= ReadLine();
newCommand.append(newLine);
}
+7 -6
View File
@@ -21,11 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIterminal.cc,v 1.17 2001/11/26 19:15:08 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4UIterminal.cc,v 1.19 2003/06/16 16:56:03 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "g4std/strstream"
#include "G4Types.hh"
#include <strstream>
#include "G4StateManager.hh"
#include "G4UIcommandTree.hh"
#include "G4UIcommand.hh"
@@ -204,7 +205,7 @@ G4String G4UIterminal::GetCommand(const char* msg)
G4String ss= nC(1, nC.length()-1);
G4int vl;
const char* tt= ss;
G4std::istrstream is((char*)tt);
std::istrstream is((char*)tt);
is >> vl;
G4int nh= UI-> GetNumberOfHistory();
if(vl>=0 && vl<nh) {
@@ -245,7 +246,7 @@ G4String G4UIterminal::GetCommand(const char* msg)
G4int G4UIterminal::ReceiveG4cout(G4String coutString)
//////////////////////////////////////////////////////
{
G4std::cout << coutString << G4std::flush;
std::cout << coutString << std::flush;
return 0;
}
@@ -253,7 +254,7 @@ G4int G4UIterminal::ReceiveG4cout(G4String coutString)
G4int G4UIterminal::ReceiveG4cerr(G4String cerrString)
//////////////////////////////////////////////////////
{
G4std::cerr << cerrString << G4std::flush;
std::cerr << cerrString << std::flush;
return 0;
}
+3 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VUIshell.cc,v 1.7 2002/04/26 21:28:26 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
// $Id: G4VUIshell.cc,v 1.8 2003/06/16 16:56:04 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
#include "G4UImanager.hh"
@@ -298,7 +298,7 @@ void G4VUIshell::ListCommand(const G4String& dir,
// waring : not matched
if(!isMatch && candidate.empty())
G4cout << "<" << input
<< ">: No such directory or command" << G4std::flush;
<< ">: No such directory or command" << std::flush;
// display
G4UIArrayString arrayString(stream);