Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 /* 27 * =========================================== 28 * 29 * Filename: CexmcMessenger.cc 30 * 31 * Description: common messenger stuff (di 32 * 33 * Version: 1.0 34 * Created: 15.11.2009 12:59:56 35 * Revision: none 36 * Compiler: gcc 37 * 38 * Author: Alexey Radkov (), 39 * Company: PNPI 40 * 41 * =========================================== 42 */ 43 44 #include <G4UIdirectory.hh> 45 #include "CexmcMessenger.hh" 46 #include "CexmcSensitiveDetectorsAttributes.hh 47 48 49 namespace 50 { 51 const G4String ed( CexmcDetectorTypeName[ 52 } 53 54 55 CexmcMessenger * CexmcMessenger::instance( NU 56 57 G4String CexmcMessenger::mainDirName( "/cexmc 58 G4String CexmcMessenger::geometryDirName( Cex 59 "ge 60 G4String CexmcMessenger::physicsDirName( Cexm 61 "ph 62 G4String CexmcMessenger::gunDirName( CexmcMes 63 "gu 64 G4String CexmcMessenger::detectorDirName( Cex 65 "de 66 G4String CexmcMessenger::eventDirName( CexmcM 67 "ev 68 G4String CexmcMessenger::runDirName( CexmcMes 69 "ru 70 G4String CexmcMessenger::monitorDirName( Cexm 71 CexmcDetectorRoleName[ CexmcMon 72 G4String CexmcMessenger::targetDirName( Cexmc 73 CexmcDetectorRoleName[ CexmcTar 74 G4String CexmcMessenger::vetoCounterDirName( 75 CexmcDetectorRoleName[ CexmcVet 76 G4String CexmcMessenger::vetoCounterLeftDirNa 77 CexmcMessenger::ve 78 G4String CexmcMessenger::vetoCounterRightDirN 79 CexmcMessenger::ve 80 G4String CexmcMessenger::calorimeterDirName( 81 CexmcDetectorRoleName[ CexmcCal 82 G4String CexmcMessenger::calorimeterLeftDirNa 83 CexmcMessenger::ca 84 G4String CexmcMessenger::calorimeterRightDirN 85 CexmcMessenger::ca 86 G4String CexmcMessenger::monitorEDDirName( 87 CexmcMessenger::mo 88 G4String CexmcMessenger::vetoCounterEDDirName 89 CexmcMessenger::ve 90 G4String CexmcMessenger::vetoCounterLeftEDDir 91 CexmcMessenger::ve 92 G4String CexmcMessenger::vetoCounterRightEDDi 93 CexmcMessenger::ve 94 G4String CexmcMessenger::calorimeterEDDirName 95 CexmcMessenger::ca 96 G4String CexmcMessenger::calorimeterLeftEDDir 97 CexmcMessenger::ca 98 G4String CexmcMessenger::calorimeterRightEDDi 99 CexmcMessenger::ca 100 G4String CexmcMessenger::reconstructorDirName 101 CexmcMessenger::ma 102 G4String CexmcMessenger::visDirName( CexmcMes 103 #ifdef CEXMC_USE_ROOT 104 G4String CexmcMessenger::histoDirName( 105 CexmcMessenger::ma 106 #endif 107 108 109 CexmcMessenger * CexmcMessenger::Instance( vo 110 { 111 if ( instance == NULL ) 112 instance = new CexmcMessenger; 113 114 return instance; 115 } 116 117 118 void CexmcMessenger::Destroy( void ) 119 { 120 delete instance; 121 instance = NULL; 122 } 123 124 125 CexmcMessenger::CexmcMessenger() : mainDir( NU 126 physicsDir( NULL ), gunDir( NULL ), detect 127 runDir( NULL ), monitorDir( NULL ), target 128 vetoCounterDir( NULL ), vetoCounterLeftDir 129 vetoCounterRightDir( NULL ), calorimeterDi 130 calorimeterLeftDir( NULL ), calorimeterRig 131 monitorEDDir( NULL ), vetoCounterEDDir( NU 132 vetoCounterLeftEDDir( NULL ), vetoCounterR 133 calorimeterEDDir( NULL ), calorimeterLeftE 134 calorimeterRightEDDir( NULL ), reconstruct 135 #ifdef CEXMC_USE_ROOT 136 ,histoDir( NULL ) 137 #endif 138 { 139 mainDir = new G4UIdirectory( mainDirName ) 140 mainDir->SetGuidance( "Cexmc settings." ); 141 geometryDir = new G4UIdirectory( geometryD 142 geometryDir->SetGuidance( "Geometry settin 143 physicsDir = new G4UIdirectory( physicsDir 144 physicsDir->SetGuidance( "Physics related 145 "(production mode 146 gunDir = new G4UIdirectory( gunDirName ); 147 gunDir->SetGuidance( "Gun settings (differ 148 detectorDir = new G4UIdirectory( detectorD 149 detectorDir->SetGuidance( "Sensitive detec 150 eventDir = new G4UIdirectory( eventDirName 151 eventDir->SetGuidance( "Event settings (ve 152 runDir = new G4UIdirectory( runDirName ); 153 runDir->SetGuidance( "Run settings (geomet 154 monitorDir = new G4UIdirectory( monitorDir 155 monitorDir->SetGuidance( "Various settings 156 targetDir = new G4UIdirectory( targetDirNa 157 targetDir->SetGuidance( "Various settings 158 vetoCounterDir = new G4UIdirectory( vetoCo 159 vetoCounterDir->SetGuidance( "Various sett 160 vetoCounterLeftDir = new G4UIdirectory( ve 161 vetoCounterLeftDir->SetGuidance( 162 "\n Various settings for the le 163 vetoCounterRightDir = new G4UIdirectory( v 164 vetoCounterRightDir->SetGuidance( 165 "\n Various settings for the ri 166 calorimeterDir = new G4UIdirectory( calori 167 calorimeterDir->SetGuidance( "Various sett 168 calorimeterLeftDir = new G4UIdirectory( ca 169 calorimeterLeftDir->SetGuidance( 170 "\n Various settings for the le 171 calorimeterRightDir = new G4UIdirectory( c 172 calorimeterRightDir->SetGuidance( 173 "\n Various settings for the ri 174 monitorEDDir = new G4UIdirectory( monitorE 175 monitorEDDir->SetGuidance( 176 "\n Energy deposit settings in 177 vetoCounterEDDir = new G4UIdirectory( veto 178 vetoCounterEDDir->SetGuidance( 179 "\n Energy deposit settings in 180 "(thresholds etc.)" ); 181 vetoCounterLeftEDDir = new G4UIdirectory( 182 vetoCounterLeftEDDir->SetGuidance( 183 "\n Energy deposit settings in 184 "(thresholds etc.)" ); 185 vetoCounterRightEDDir = new G4UIdirectory( 186 vetoCounterRightEDDir->SetGuidance( 187 "\n Energy deposit settings in 188 "(thresholds etc.)" ); 189 calorimeterEDDir = new G4UIdirectory( calo 190 calorimeterEDDir->SetGuidance( 191 "\n Energy deposit settings in 192 "(thresholds etc.)" ); 193 calorimeterLeftEDDir = new G4UIdirectory( 194 calorimeterLeftEDDir->SetGuidance( 195 "\n Energy deposit settings in 196 "(thresholds etc.)" ); 197 calorimeterRightEDDir = new G4UIdirectory( 198 calorimeterRightEDDir->SetGuidance( 199 "\n Energy deposit settings in 200 "(thresholds etc.)" ); 201 reconstructorDir = new G4UIdirectory( reco 202 reconstructorDir->SetGuidance( "Reconstruc 203 visDir = new G4UIdirectory( visDirName ); 204 visDir->SetGuidance( "Visualization settin 205 #ifdef CEXMC_USE_ROOT 206 histoDir = new G4UIdirectory( histoDirName 207 histoDir->SetGuidance( "Commands to list a 208 #endif 209 } 210 211 212 CexmcMessenger::~CexmcMessenger() 213 { 214 delete mainDir; 215 delete geometryDir; 216 delete physicsDir; 217 delete gunDir; 218 delete detectorDir; 219 delete eventDir; 220 delete runDir; 221 delete monitorDir; 222 delete targetDir; 223 delete vetoCounterDir; 224 delete vetoCounterLeftDir; 225 delete vetoCounterRightDir; 226 delete calorimeterDir; 227 delete calorimeterLeftDir; 228 delete calorimeterRightDir; 229 delete monitorEDDir; 230 delete vetoCounterEDDir; 231 delete vetoCounterLeftEDDir; 232 delete vetoCounterRightEDDir; 233 delete calorimeterEDDir; 234 delete calorimeterLeftEDDir; 235 delete calorimeterRightEDDir; 236 delete reconstructorDir; 237 delete visDir; 238 #ifdef CEXMC_USE_ROOT 239 delete histoDir; 240 #endif 241 } 242 243