LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 42 of file DetectorMessenger.hh.

Constructor & Destructor Documentation

DetectorMessenger::DetectorMessenger ( DetectorConstruction Det)

Definition at line 38 of file DetectorMessenger.cc.

References detDir, MaterCmd, and testemDir.

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

Definition at line 55 of file DetectorMessenger.cc.

References detDir, MaterCmd, and testemDir.

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

Member Function Documentation

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

Definition at line 64 of file DetectorMessenger.cc.

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

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

Member Data Documentation

G4UIdirectory* DetectorMessenger::detDir
private

Definition at line 56 of file DetectorMessenger.hh.

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

DetectorConstruction* DetectorMessenger::Detector
private

Definition at line 53 of file DetectorMessenger.hh.

Referenced by SetNewValue().

G4UIcmdWithAString* DetectorMessenger::MaterCmd
private

Definition at line 57 of file DetectorMessenger.hh.

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

G4UIdirectory* DetectorMessenger::testemDir
private

Definition at line 55 of file DetectorMessenger.hh.

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


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