LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
DetectorMessenger Class Reference

#include "DetectorMessenger.hh"

Inheritance diagram for DetectorMessenger:

Public Member Functions

 DetectorMessenger (DetectorConstruction *)
 
 ~DetectorMessenger ()
 
void SetNewValue (G4UIcommand *, G4String)
 

Private Attributes

DetectorConstructionDetector
 
G4UIdirectory * testemDir
 
G4UIdirectory * detDir
 
G4UIcmdWithAString * MaterCmd
 

Detailed Description

Definition at line 43 of file DetectorMessenger.hh.

Constructor & Destructor Documentation

DetectorMessenger::DetectorMessenger ( DetectorConstruction Det)

Definition at line 39 of file DetectorMessenger.cc.

References detDir, MaterCmd, and testemDir.

40 :Detector(Det)
41 {
42  testemDir = new G4UIdirectory("/testem/");
43  testemDir->SetGuidance("commands specific to this example");
44 
45  detDir = new G4UIdirectory("/testem/det/");
46  detDir->SetGuidance("detector construction commands");
47 
48  MaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
49  MaterCmd->SetGuidance("Select material of the box.");
50  MaterCmd->SetParameterName("choice",false);
51  MaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
52 }
G4UIdirectory * detDir
G4UIdirectory * testemDir
DetectorConstruction * Detector
G4UIcmdWithAString * MaterCmd
DetectorMessenger::~DetectorMessenger ( )

Definition at line 56 of file DetectorMessenger.cc.

References detDir, MaterCmd, and testemDir.

57 {
58  delete MaterCmd;
59  delete detDir;
60  delete testemDir;
61 }
G4UIdirectory * detDir
G4UIdirectory * testemDir
G4UIcmdWithAString * MaterCmd

Member Function Documentation

void DetectorMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValue 
)

Definition at line 65 of file DetectorMessenger.cc.

References Detector, MaterCmd, and DetectorConstruction::SetMaterial().

66 {
67  if( command == MaterCmd )
68  { Detector->SetMaterial(newValue);}
69 }
DetectorConstruction * Detector
G4UIcmdWithAString * MaterCmd

Member Data Documentation

G4UIdirectory* DetectorMessenger::detDir
private

Definition at line 57 of file DetectorMessenger.hh.

Referenced by DetectorMessenger(), and ~DetectorMessenger().

DetectorConstruction* DetectorMessenger::Detector
private

Definition at line 54 of file DetectorMessenger.hh.

Referenced by SetNewValue().

G4UIcmdWithAString* DetectorMessenger::MaterCmd
private

Definition at line 58 of file DetectorMessenger.hh.

Referenced by DetectorMessenger(), SetNewValue(), and ~DetectorMessenger().

G4UIdirectory* DetectorMessenger::testemDir
private

Definition at line 56 of file DetectorMessenger.hh.

Referenced by DetectorMessenger(), and ~DetectorMessenger().


The documentation for this class was generated from the following files: