| [1316] | 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | // FredMessenger.hh
|
|---|
| 28 | //
|
|---|
| 29 | // Declaration of fred's options
|
|---|
| 30 | //
|
|---|
| 31 |
|
|---|
| 32 | #ifndef FredMessenger_HH
|
|---|
| 33 | #define FredMessenger_HH
|
|---|
| 34 |
|
|---|
| 35 | #include "G4UImessenger.hh"
|
|---|
| 36 |
|
|---|
| 37 | enum VolumeType {
|
|---|
| 38 | NATALIA,
|
|---|
| 39 | VOXEL,
|
|---|
| 40 | BOX,
|
|---|
| 41 | CONE,
|
|---|
| 42 | CONE2,
|
|---|
| 43 | ORB,
|
|---|
| 44 | PARA,
|
|---|
| 45 | SPHERE,
|
|---|
| 46 | TORUS1,
|
|---|
| 47 | TORUS2,
|
|---|
| 48 | TRAP,
|
|---|
| 49 | TRD,
|
|---|
| 50 | TUBS,
|
|---|
| 51 | ELLIPS,
|
|---|
| 52 | ELCONE,
|
|---|
| 53 | ELTUBE,
|
|---|
| 54 | EXTRU1,
|
|---|
| 55 | EXTRU2,
|
|---|
| 56 | EXTRU3,
|
|---|
| 57 | EXTRU4,
|
|---|
| 58 | HYPE,
|
|---|
| 59 | PCON,
|
|---|
| 60 | PCON2,
|
|---|
| 61 | PCON3,
|
|---|
| 62 | PCON4,
|
|---|
| 63 | PGON,
|
|---|
| 64 | BOOL1,
|
|---|
| 65 | PGON2,
|
|---|
| 66 | PGON3,
|
|---|
| 67 | TESSEL1,
|
|---|
| 68 | TESSEL2,
|
|---|
| 69 | TESSEL3,
|
|---|
| 70 | TESSEL4,
|
|---|
| 71 | TET,
|
|---|
| 72 | TWBOX,
|
|---|
| 73 | TWTRAP1,
|
|---|
| 74 | TWTRAP2,
|
|---|
| 75 | TWTRD,
|
|---|
| 76 | TWTUBS
|
|---|
| 77 | };
|
|---|
| 78 | #define FRED_VOLUMETYPE_NUM 39
|
|---|
| 79 |
|
|---|
| 80 | enum GunType {
|
|---|
| 81 | SPRAY,
|
|---|
| 82 | GRID,
|
|---|
| 83 | G4
|
|---|
| 84 | };
|
|---|
| 85 | #define FRED_GUNTYPE_NUM 3
|
|---|
| 86 |
|
|---|
| 87 | enum DrawType {
|
|---|
| 88 | NORMAL,
|
|---|
| 89 | SHADOW
|
|---|
| 90 | };
|
|---|
| 91 | #define FRED_DRAWTYPE_NUM 2
|
|---|
| 92 |
|
|---|
| 93 | class G4UIdirectory;
|
|---|
| 94 | class G4UIcmdWithAString;
|
|---|
| 95 | class G4UIcmdWithADouble;
|
|---|
| 96 | class G4UIcmdWithoutParameter;
|
|---|
| 97 | class G4UIcmdWithAnInteger;
|
|---|
| 98 |
|
|---|
| 99 | class G4VSolid;
|
|---|
| 100 | class FredTest3Messenger;
|
|---|
| 101 | class FredVoxelTestMessenger;
|
|---|
| 102 |
|
|---|
| 103 | class FredMessenger : public G4UImessenger
|
|---|
| 104 | {
|
|---|
| 105 | public:
|
|---|
| 106 | FredMessenger();
|
|---|
| 107 | ~FredMessenger();
|
|---|
| 108 |
|
|---|
| 109 | void SetNewValue( G4UIcommand *command, G4String newValues );
|
|---|
| 110 | G4String GetCurrentValue( G4UIcommand *command );
|
|---|
| 111 |
|
|---|
| 112 | VolumeType SelectedVolume();
|
|---|
| 113 | GunType SelectedGun();
|
|---|
| 114 | DrawType SelectedDrawing();
|
|---|
| 115 |
|
|---|
| 116 | G4double StartPhi() { return startPhi; }
|
|---|
| 117 | G4double DeltaPhi() { return deltaPhi; }
|
|---|
| 118 | G4int NumSide() { return numSide; }
|
|---|
| 119 |
|
|---|
| 120 | void SetTestVolume( const G4VSolid *theTestVolume );
|
|---|
| 121 | inline const G4VSolid *GetTestVolume() const { return testVolume; }
|
|---|
| 122 |
|
|---|
| 123 | private:
|
|---|
| 124 | void PauseInput();
|
|---|
| 125 |
|
|---|
| 126 | private:
|
|---|
| 127 | VolumeType testVolumeType;
|
|---|
| 128 | GunType gunType;
|
|---|
| 129 | DrawType drawType;
|
|---|
| 130 | G4double startPhi,
|
|---|
| 131 | deltaPhi;
|
|---|
| 132 | G4int numSide;
|
|---|
| 133 |
|
|---|
| 134 | G4String volumeNames[FRED_VOLUMETYPE_NUM];
|
|---|
| 135 |
|
|---|
| 136 | G4String gunNames[FRED_GUNTYPE_NUM];
|
|---|
| 137 |
|
|---|
| 138 | G4String drawNames[FRED_DRAWTYPE_NUM];
|
|---|
| 139 |
|
|---|
| 140 | G4UIdirectory *fredDirectory;
|
|---|
| 141 | G4UIcmdWithAString *volumeTypeNameCmd;
|
|---|
| 142 | G4UIcmdWithAString *gunTypeNameCmd;
|
|---|
| 143 | G4UIcmdWithAString *drawTypeNameCmd;
|
|---|
| 144 | G4UIcmdWithoutParameter *pauseCmd;
|
|---|
| 145 | G4UIcmdWithADouble *startPhiCmd;
|
|---|
| 146 | G4UIcmdWithADouble *deltaPhiCmd;
|
|---|
| 147 | G4UIcmdWithAnInteger *numSideCmd;
|
|---|
| 148 |
|
|---|
| 149 | FredTest3Messenger *test3Messenger;
|
|---|
| 150 | FredVoxelTestMessenger *voxelTestMessenger;
|
|---|
| 151 | const G4VSolid *testVolume;
|
|---|
| 152 | };
|
|---|
| 153 |
|
|---|
| 154 | #endif
|
|---|