Warning, file /geant4/examples/extended/medical/dna/moleculardna/src/AnalysisMessenger.cc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "AnalysisMessenger.hh"
0028
0029 #include "AnalysisManager.hh"
0030
0031
0032
0033 AnalysisMessenger::AnalysisMessenger(AnalysisManager* analysisManager)
0034 : fpAnalysisManager(analysisManager),
0035 fpAnalysisDirectory(new G4UIdirectory("/analysisDNA/")),
0036 fpSaveStrands(new G4UIcmdWithABool("/analysisDNA/saveStrands", this)),
0037 fpStrandDirectory(new G4UIcmdWithAString("/analysisDNA/strandDir", this)),
0038 fpFragmentLength(new G4UIcmdWithAnInteger("/analysisDNA/fragmentGap", this)),
0039 fpSaveSingleChain(new G4UIcmdWithAnInteger("/analysisDNA/diagnosticChain", this)),
0040 fpDSBDistance(new G4UIcmdWithAnInteger("/analysisDNA/dsbDistance", this)),
0041 fpTestClassifier(new G4UIcmdWithoutParameter("/analysisDNA/testClassifier", this)),
0042 fpFileName(new G4UIcmdWithAString("/analysisDNA/fileName", this))
0043 {
0044
0045 fpAnalysisDirectory->SetGuidance("App local commands for analysis");
0046
0047 fpSaveStrands->SetGuidance("Bool to set whether strands ought be saved");
0048 fpSaveStrands->SetGuidance("use /analysisDNA/strandDir to set location");
0049
0050 fpStrandDirectory->SetGuidance("Directory to save DNA damage fragments");
0051 fpStrandDirectory->SetParameterName("DNA framgents", false);
0052
0053 fpFragmentLength->SetGuidance("Gap between DNA fragments in base pairs.");
0054 fpFragmentLength->SetGuidance("Set to zero to score placement volumes independently");
0055 fpFragmentLength->SetParameterName("Base Pair gap", false);
0056
0057 fpSaveSingleChain->SetGuidance("Save the position of hits histos only on one chain");
0058 fpSaveSingleChain->SetParameterName("Chain Index", false);
0059
0060 fpDSBDistance->SetGuidance("Max separation of DSBs. Must be less than 31.");
0061 fpDSBDistance->SetParameterName("Max. DSB distance.", false);
0062
0063 fpTestClassifier->SetGuidance("Run unit test for break classification");
0064
0065 fpFileName->SetGuidance("ROOT output file name");
0066 fpFileName->SetParameterName("ROOT output file name", false);
0067 }
0068
0069
0070
0071 void AnalysisMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
0072 {
0073 if (command == fpStrandDirectory.get()) {
0074 fpAnalysisManager->SetStrandDirectory(newValue);
0075 }
0076 else if (command == fpSaveStrands.get()) {
0077 fpAnalysisManager->SetSaveStrands(G4UIcmdWithABool::GetNewBoolValue(newValue));
0078 }
0079 else if (command == fpFragmentLength.get()) {
0080 fpAnalysisManager->SetFragmentGap(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
0081 }
0082 else if (command == fpSaveSingleChain.get()) {
0083 fpAnalysisManager->SetChainToSave(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
0084 }
0085 else if (command == fpDSBDistance.get()) {
0086 fpAnalysisManager->SetDSBDistance(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
0087 }
0088 else if (command == fpTestClassifier.get()) {
0089 fpAnalysisManager->TestClassification();
0090 }
0091 else if (command == fpFileName.get()) {
0092 fpAnalysisManager->SetFileName(newValue);
0093 }
0094 }
0095