Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MJGeometrySolidBlockMessenger.cc

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
00003 //                                                                           //
00004 //                         MAJORANA Simulation                               //
00005 //                                                                           //
00006 //      This code implementation is the intellectual property of the         //
00007 //      MAJORANA Collaboration. It is based on Geant4, an intellectual       //
00008 //      property of the RD44 GEANT4 collaboration.                           //
00009 //                                                                           //
00010 //                        *********************                              //
00011 //                                                                           //
00012 //    Neither the authors of this software system, nor their employing       //
00013 //    institutes, nor the agencies providing financial support for this      //
00014 //    work  make  any representation or  warranty, express or implied,       //
00015 //    regarding this software system or assume any liability for its use.    //
00016 //    By copying, distributing or modifying the Program (or any work based   //
00017 //    on on the Program) you indicate your acceptance of this statement,     //
00018 //    and all its terms.                                                     //
00019 //                                                                           //
00020 //bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
00021 //---------------------------------------------------------------------------//
00022 //                                                          
00023 // $Id: MJGeometrySolidBlockMessenger.cc,v 1.2 2004/11/09 13:42:39 xliu Exp $ 
00024 //      
00025 // CLASS IMPLEMENTATION:  MJGeometrySolidBlockMessenger.cc
00026 //
00027 //---------------------------------------------------------------------------//
00032 // 
00033 //---------------------------------------------------------------------------//
00043 //---------------------------------------------------------------------------//
00044 //
00045 
00046 #include "G4UIcmdWithAString.hh"
00047 #include "G4UIdirectory.hh"
00048 
00049 #include "geometry/MJGeometrySolidBlock.hh"
00050 
00051 //---------------------------------------------------------------------------//
00052 
00053 #include "geometry/MJGeometrySolidBlockMessenger.hh"
00054 
00055 //---------------------------------------------------------------------------//
00056 
00057 MJGeometrySolidBlockMessenger::MJGeometrySolidBlockMessenger(
00058    MJGeometrySolidBlock *block): fBlock(block)
00059 {
00060   // /MJ/geometry/solidblock
00061   fSolidBlockDir = new G4UIdirectory("/MJ/geometry/solidblock/");
00062   fSolidBlockDir->SetGuidance(
00063     "Controls the setting for a solid, uniform block");
00064 
00065   // /MJ/geometry/solidblock/material
00066   fMaterialSelectCmd = new G4UIcmdWithAString(
00067     "/MJ/geometry/solidblock/material", this);
00068   fMaterialSelectCmd->SetGuidance("Set material of block");
00069 }
00070 
00071 //---------------------------------------------------------------------------//
00072 
00073 MJGeometrySolidBlockMessenger::~MJGeometrySolidBlockMessenger()
00074 {
00075   delete fSolidBlockDir;
00076   delete fMaterialSelectCmd;
00077 }
00078 
00079 
00080 //---------------------------------------------------------------------------//
00081 
00082 void MJGeometrySolidBlockMessenger::SetNewValue(
00083   G4UIcommand *cmd, G4String newValue ) 
00084 {
00085   if(cmd == fMaterialSelectCmd) 
00086     fBlock->SetMaterialName(newValue);
00087 }
00088 
00089 //---------------------------------------------------------------------------//
00090 //---------------------------------------------------------------------------//

Generated on Mon Nov 29 16:58:51 2004 for Majorana Simulation by  doxygen 1.3.9.1