[233] | 1 | #ifndef G4Lab_UIOnX_h |
---|
| 2 | #define G4Lab_UIOnX_h |
---|
| 3 | |
---|
| 4 | // Inheritance : |
---|
| 5 | #include <G4UIsession.hh> |
---|
| 6 | |
---|
| 7 | namespace Slash {namespace Data {class IAccessor;}} |
---|
| 8 | namespace OnX {class Main;} |
---|
| 9 | namespace AIDA {class IAnalysisFactory;} |
---|
| 10 | |
---|
| 11 | namespace Slash {namespace UI {class IUI;}} |
---|
| 12 | namespace Slash {namespace Core {class ISession;}} |
---|
| 13 | namespace Slash {namespace Core {class IWriter;}} |
---|
| 14 | namespace Slash {namespace Core {class IManager;}} |
---|
| 15 | |
---|
| 16 | class G4RunManager; |
---|
| 17 | |
---|
| 18 | namespace G4Lab { |
---|
| 19 | |
---|
| 20 | class Manager; |
---|
| 21 | |
---|
| 22 | // Avoid establishing a relationship with G4interfaces (by inheriting |
---|
| 23 | // G4VBasicShell). This library may be reconstructed with various GUI drivers. |
---|
| 24 | |
---|
| 25 | class UIOnX : public G4UIsession { |
---|
| 26 | public: //G4UIsession |
---|
| 27 | virtual G4UIsession* SessionStart(); |
---|
| 28 | virtual void PauseSessionStart(G4String); |
---|
| 29 | public: |
---|
| 30 | /** |
---|
| 31 | * Create an OnX session. |
---|
| 32 | * @param aRunManager : User G4RunManager. |
---|
| 33 | * @param aGUI : OnX GUI file. |
---|
| 34 | * @param aArgc : Pass the argument coming from "main" or give 0. |
---|
| 35 | * @param aArgv : Pass the argument coming from "main" or give NULL. |
---|
| 36 | */ |
---|
| 37 | UIOnX(G4RunManager& aRunManager, |
---|
| 38 | const std::string& aGUI = "", |
---|
| 39 | int aArgc = 0,char** aArgv = NULL); |
---|
| 40 | virtual ~UIOnX(); |
---|
| 41 | bool isValid() const; |
---|
| 42 | Slash::Core::ISession* session(); |
---|
| 43 | Slash::Core::IWriter* printer(); |
---|
| 44 | void addManager(Slash::Core::IManager*); |
---|
| 45 | void addAccessor(Slash::Data::IAccessor*); |
---|
| 46 | AIDA::IAnalysisFactory* findAIDA(); |
---|
| 47 | bool createUI(const std::string& driver = "", |
---|
| 48 | const std::string& file = "", |
---|
| 49 | bool = true); |
---|
| 50 | private: |
---|
| 51 | OnX::Main* fOnX; |
---|
| 52 | Slash::UI::IUI* fUI; |
---|
| 53 | Manager* fManager; |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | #endif |
---|
| 59 | |
---|