Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

g4nova::DetectorMessenger Class Reference

Handle commands referencing the detector construction. More...

#include <DetectorMessenger.h>

List of all members.

Public Member Functions

 DetectorMessenger (DetectorConstruction *det)
 ~DetectorMessenger ()
void SetNewValue (G4UIcommand *c, G4String s)

Private Attributes

DetectorConstructionfDetector
 The detector object.
G4UIdirectory * fDetectorDir
 Location of detector commands.
G4UIcmdWithAString * fReadCmd
 Handler for read command.


Detailed Description

Handle commands referencing the detector construction.

Definition at line 20 of file DetectorMessenger.h.


Constructor & Destructor Documentation

DetectorMessenger::DetectorMessenger DetectorConstruction det  ) 
 

Definition at line 14 of file DetectorMessenger.cxx.

References fDetectorDir, and fReadCmd.

00014                                                               :
00015   fDetector(det)
00016 {
00017   fDetectorDir = new G4UIdirectory("/g4nova/");
00018   fDetectorDir->SetGuidance("NOvA detector control.");
00019   
00020   fReadCmd = new G4UIcmdWithAString("/g4nova/read", this);
00021   fReadCmd->SetGuidance("Read GDML file of specified name.");
00022   fReadCmd->SetParameterName("file_name", false);
00023   fReadCmd->SetDefaultValue("fardet.gdml");
00024   fReadCmd->AvailableForStates(G4State_PreInit);
00025 }

DetectorMessenger::~DetectorMessenger  ) 
 

Definition at line 29 of file DetectorMessenger.cxx.

00030 {
00031   delete fReadCmd;
00032   delete fDetectorDir;
00033 }


Member Function Documentation

void DetectorMessenger::SetNewValue G4UIcommand *  c,
G4String  s
 

Definition at line 37 of file DetectorMessenger.cxx.

References fDetector, and g4nova::DetectorConstruction::SetGDMLFile().

00038 {
00039   if (cmd == fReadCmd) fDetector->SetGDMLFile(val);
00040 }


Member Data Documentation

DetectorConstruction* g4nova::DetectorMessenger::fDetector [private]
 

The detector object.

Definition at line 26 of file DetectorMessenger.h.

Referenced by SetNewValue().

G4UIdirectory* g4nova::DetectorMessenger::fDetectorDir [private]
 

Location of detector commands.

Definition at line 27 of file DetectorMessenger.h.

Referenced by DetectorMessenger().

G4UIcmdWithAString* g4nova::DetectorMessenger::fReadCmd [private]
 

Handler for read command.

Definition at line 28 of file DetectorMessenger.h.

Referenced by DetectorMessenger().


The documentation for this class was generated from the following files:
Generated on Sun Nov 22 04:45:31 2009 for NOvA Offline by  doxygen 1.3.9.1