Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -36,61 +36,61 @@
|
||||
#include "HadrontherapyLet.hh"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
HadrontherapyAnalysisFileMessenger::HadrontherapyAnalysisFileMessenger(HadrontherapyAnalysisManager* amgr)
|
||||
HadrontherapyAnalysisFileMessenger::HadrontherapyAnalysisFileMessenger(HadrontherapyAnalysis* amgr)
|
||||
:AnalysisManager(amgr)
|
||||
{
|
||||
secondaryCmd = new G4UIcmdWithABool("/analysis/secondary",this);
|
||||
secondaryCmd -> SetParameterName("secondary", true);
|
||||
secondaryCmd -> SetDefaultValue("true");
|
||||
secondaryCmd -> SetGuidance("Set if dose/fluence for the secondary particles will be written"
|
||||
"\n[usage]: /analysis/secondary [true/false]");
|
||||
secondaryCmd -> AvailableForStates(G4State_Idle, G4State_PreInit);
|
||||
|
||||
DoseMatrixCmd = new G4UIcmdWithAString("/analysis/writeDoseFile",this);
|
||||
DoseMatrixCmd->SetGuidance("Write the dose/fluence to an ASCII file");
|
||||
DoseMatrixCmd->SetDefaultValue("Dose.out");
|
||||
DoseMatrixCmd->SetParameterName("choice",true);
|
||||
|
||||
{
|
||||
secondaryCmd = new G4UIcmdWithABool("/analysis/secondary",this);
|
||||
secondaryCmd -> SetParameterName("secondary", true);
|
||||
secondaryCmd -> SetDefaultValue("true");
|
||||
secondaryCmd -> SetGuidance("Set if dose/fluence for the secondary particles will be written"
|
||||
"\n[usage]: /analysis/secondary [true/false]");
|
||||
secondaryCmd -> AvailableForStates(G4State_Idle, G4State_PreInit);
|
||||
|
||||
DoseMatrixCmd = new G4UIcmdWithAString("/analysis/writeDoseFile",this);
|
||||
DoseMatrixCmd->SetGuidance("Write the dose/fluence to an ASCII file");
|
||||
DoseMatrixCmd->SetDefaultValue("Dose.out");
|
||||
DoseMatrixCmd->SetParameterName("choice",true);
|
||||
|
||||
LetCmd = new G4UIcmdWithABool("/analysis/computeLet",this);
|
||||
LetCmd -> SetParameterName("choice",true);
|
||||
LetCmd -> SetDefaultValue(true);
|
||||
LetCmd -> SetGuidance("Set if Let must be computed and write the ASCII filename for the Let");
|
||||
LetCmd -> AvailableForStates(G4State_Idle, G4State_PreInit);
|
||||
|
||||
LetCmd -> SetParameterName("choice",true);
|
||||
LetCmd -> SetDefaultValue(true);
|
||||
LetCmd -> SetGuidance("Set if Let must be computed and write the ASCII filename for the Let");
|
||||
LetCmd -> AvailableForStates(G4State_Idle, G4State_PreInit);
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
HadrontherapyAnalysisFileMessenger::~HadrontherapyAnalysisFileMessenger()
|
||||
{
|
||||
delete secondaryCmd;
|
||||
delete DoseMatrixCmd;
|
||||
delete LetCmd;
|
||||
delete secondaryCmd;
|
||||
delete DoseMatrixCmd;
|
||||
delete LetCmd;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void HadrontherapyAnalysisFileMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
{
|
||||
if (command == secondaryCmd)
|
||||
{
|
||||
if (HadrontherapyMatrix::GetInstance())
|
||||
{
|
||||
HadrontherapyMatrix::GetInstance() -> secondary = secondaryCmd -> GetNewBoolValue(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
else if (command == DoseMatrixCmd) // Filename can be passed here TODO
|
||||
{
|
||||
if ( HadrontherapyMatrix * pMatrix = HadrontherapyMatrix::GetInstance() )
|
||||
{
|
||||
//pMatrix -> TotalEnergyDeposit();
|
||||
pMatrix -> StoreDoseFluenceAscii(newValue);
|
||||
}
|
||||
if (HadrontherapyMatrix::GetInstance())
|
||||
{
|
||||
HadrontherapyMatrix::GetInstance() -> secondary = secondaryCmd -> GetNewBoolValue(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
else if (command == LetCmd)
|
||||
else if (command == DoseMatrixCmd) // Filename can be passed here TODO
|
||||
{
|
||||
if (HadrontherapyLet::GetInstance())
|
||||
HadrontherapyLet::GetInstance() -> doCalculation = LetCmd -> GetNewBoolValue(newValue);
|
||||
if ( HadrontherapyMatrix * pMatrix = HadrontherapyMatrix::GetInstance() )
|
||||
{
|
||||
//pMatrix -> TotalEnergyDeposit();
|
||||
pMatrix -> StoreDoseFluenceAscii(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
else if (command == LetCmd)
|
||||
{
|
||||
if (HadrontherapyLet::GetInstance())
|
||||
HadrontherapyLet::GetInstance() -> doCalculation = LetCmd -> GetNewBoolValue(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user