Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
@@ -0,0 +1,31 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
#ifndef G4InteractorMessenger_h
#define G4InteractorMessenger_h 1
#include "G4UImessenger.hh"
class G4VInteractiveSession;
class G4UIdirectory;
class G4UIcommand;
class G4InteractorMessenger : public G4UImessenger
{
public:
G4InteractorMessenger (G4VInteractiveSession* session);
~G4InteractorMessenger ();
void SetNewValue(G4UIcommand* command,G4String newValue);
private:
G4VInteractiveSession* session;
G4UIdirectory* interactorDirectory;
G4UIcommand* addMenu;
G4UIcommand* addButton;
};
#endif
@@ -0,0 +1,60 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VBasicShell.hh,v 2.2 1998/07/12 03:00:16 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
//
#ifndef G4VBasicShell_H
#define G4VBasicShell_H 1
class G4UIcommandTree;
class G4UIcommand;
#include "G4UIsession.hh"
#include "globals.hh"
class G4VBasicShell : public G4UIsession
{
public:
G4VBasicShell();
virtual ~G4VBasicShell();
virtual G4UIsession* SessionStart() = 0;
// null should be returned for interactive session
virtual void PauseSessionStart(G4String Prompt) = 0;
// Prompt string can be ignored
protected:
G4String ModifyToFullPathCommand(const char* aCommandLine);
// convert "BeamOn 10" to "/run/BeamOn 10" if the
// current working directory is "/run/"
G4String GetCurrentWorkingDirectory();
// directory string starts with '/' and ends with '/'
G4bool ChangeDirectory(const char* newDir);
// change directory to newDir
// false will be returned if the target directory doesn't exist
G4UIcommandTree* FindDirectory(const char* dirName);
// find G4UIcommandTree object
// null returned if the taregt does not exist
G4UIcommand* FindCommand(const char* commandName);
// find G4UIcommand object
// null returned if the target does not exist
private:
G4String currentDirectory;
G4String ModifyPath(G4String tempPath);
};
#endif
@@ -0,0 +1,32 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
#ifndef G4VInteractiveSession_H
#define G4VInteractiveSession_H 1
#include <rw/tvhdict.h>
#include "G4VInteractorManager.hh"
class G4UImessenger;
class G4VInteractiveSession {
public:
G4VInteractiveSession();
virtual ~G4VInteractiveSession();
virtual void AddMenu (const char*,const char*);
virtual void AddButton (const char*,const char*,const char*);
void AddInteractor(G4String,G4Interactor);
G4Interactor GetInteractor(G4String);
private:
G4UImessenger* messenger;
RWTValHashDictionary<G4String,G4Interactor> interactors;
};
#endif
@@ -0,0 +1,78 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VInteractorManager.hh,v 2.3 1998/08/07 12:38:41 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G.Barrand
#ifndef G4VINTERACTORMANAGER_HH
#define G4VINTERACTORMANAGER_HH
#include "globals.hh"
typedef void* G4Interactor;
typedef G4bool (*G4DispatchFunction)(void*);
typedef void (*G4SecondaryLoopAction)();
class G4VInteractorManager {
public:
G4VInteractorManager ();
virtual ~G4VInteractorManager ();
void SetArguments (int,char**);
char** GetArguments (int*);
void SetMainInteractor (G4Interactor);
G4Interactor GetMainInteractor ();
void AddDispatcher (G4DispatchFunction);
void RemoveDispatcher (G4DispatchFunction);
void AddSecondaryLoopPreAction (G4SecondaryLoopAction);
void AddSecondaryLoopPostAction (G4SecondaryLoopAction);
void AddShell (G4Interactor);
void RemoveShell (G4Interactor);
void EnableSecondaryLoop ();
void DisableSecondaryLoop ();
void SecondaryLoopPreActions ();
void SecondaryLoopPostActions ();
void RequireExitSecondaryLoop (int);
void DispatchEvent (void*);
void SecondaryLoop ();
int GetExitSecondaryLoopCode ();
void PutStringInResourceDatabase (char*);
virtual G4bool Inited () = 0;
virtual void* GetEvent () = 0;
virtual void FlushAndWaitExecution () = 0;
void SetParentInteractor (G4Interactor);
G4Interactor GetParentInteractor ();
void SetCreatedInteractor (G4Interactor);
G4Interactor GetCreatedInteractor ();
void SetCreationString (char*);
char* GetCreationString ();
private:
int argc;
char** argv;
G4Interactor mainInteractor;
int dispatchern;
G4DispatchFunction* dispatchers;
int preActionn;
G4SecondaryLoopAction* preActions;
int postActionn;
G4SecondaryLoopAction* postActions;
int shelln;
G4Interactor* shells;
G4bool secondaryLoopEnabled;
G4bool alreadyInSecondaryLoop;
int exitSecondaryLoop;
G4Interactor parentInteractor;
G4Interactor createdInteractor;
char* creationString;
};
#define OGL_EXIT_CODE 1
#define OIV_EXIT_CODE 2
#define XO_EXIT_CODE 3
#endif
@@ -0,0 +1,41 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Win32.hh,v 2.4 1998/09/19 14:45:32 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
// To unify Windows message treatment between
// G4/interfaces Windows sessions and G4/visualizations Windows drivers.
// G.Barrand
#ifndef G4WIN32_HH
#define G4WIN32_HH
#if defined(G4INTY_BUILD_WIN32) || defined(G4INTY_USE_WIN32)
#include <windows.h>
#include "G4VInteractorManager.hh"
class G4Win32 : public G4VInteractorManager {
public:
static G4Win32* getInstance ();
static G4Win32* getInstance (HINSTANCE,HINSTANCE,LPSTR,int);
G4bool Inited ();
void* GetEvent ();
void FlushAndWaitExecution ();
static G4bool dispatchWin32Event (void*);
void getWinMainArguments (HINSTANCE*,HINSTANCE*,LPSTR*,int*);
virtual ~G4Win32 ();
private:
G4Win32 (HINSTANCE,HINSTANCE,LPSTR,int);
static G4Win32* instance; // Pointer to single instance.
};
#endif //HAS_WIN32
#endif
+40
View File
@@ -0,0 +1,40 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Xt.hh,v 2.4 1998/09/19 14:45:33 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
// To unify X11 event treatment between
// G4/interfaces Xt sessions and G4/visualizations Xt drivers.
// G.Barrand
#ifndef G4XT_HH
#define G4XT_HH
#if defined(G4INTY_BUILD_XT) || defined(G4INTY_USE_XT)
#include <X11/Intrinsic.h>
#include "G4VInteractorManager.hh"
class G4Xt : public G4VInteractorManager {
public:
static G4Xt* getInstance ();
static G4Xt* getInstance (int,char**,char*);
void PutStringInResourceDatabase (char*);
G4bool Inited ();
void* GetEvent ();
void FlushAndWaitExecution ();
virtual ~G4Xt ();
private:
G4Xt (int,char**,char*);
static G4Xt* instance; // Pointer to single instance.
};
#endif //HAS_XT
#endif