43 : fManager(manager)
44{
45 fAnalysisDir = std::make_unique<G4UIdirectory>("/analysis/");
46 fAnalysisDir->SetGuidance("analysis control");
47
48 fOpenFileCmd = CreateCommand<G4UIcmdWithAString>(
49 "openFile", "Open analysis file", "FileName", true);
50 fOpenFileCmd->SetDefaultValue("");
51 fOpenFileCmd->SetToBeBroadcasted(true);
52
53 fWriteCmd = CreateCommandWithoutParameter(
54 "write", "Write analysis data.");
55 fWriteCmd->SetToBeBroadcasted(false);
56
57 fResetCmd = CreateCommandWithoutParameter(
58 "reset", "Reset analysis data.");
59 fResetCmd->SetToBeBroadcasted(false);
60
61 fCloseFileCmd = CreateCommand<G4UIcmdWithABool>(
62 "closeFile", "Close analysis file and (optionally) reset data.", "IsReset", true);
63 fCloseFileCmd->SetDefaultValue(true);
64 fCloseFileCmd->SetToBeBroadcasted(false);
65
66 fListCmd = CreateCommand<G4UIcmdWithABool>(
67 "list", "List all/activate analysis objects.", "OnlyIfActive", true);
68 fListCmd->SetDefaultValue(true);
69
70 fSetActivationCmd = CreateCommand<G4UIcmdWithABool>(
71 "setActivation",
72 "Set activation. \n"
73 "When this option is enabled, only the histograms marked as activated\n"
74 "are returned, filled or saved on file.\n"
75 "No warning is issued when Get or Fill is called on inactive histogram.",
76 "Activation");
77
78 fVerboseCmd = CreateCommand<G4UIcmdWithAnInteger>(
79 "verbose", "Set verbose level", "VerboseLevel");
80 fVerboseCmd->SetRange("VerboseLevel>=0 && VerboseLevel<=4");
81
82 fCompressionCmd = CreateCommand<G4UIcmdWithAnInteger>(
83 "compression", "Set compression level", "CompressionLevel");
84 fCompressionCmd->SetRange("CompressionLevel>=0 && CompressionLevel<=4");
85
86 fSetFileNameCmd = CreateCommand<G4UIcmdWithAString>(
87 "setFileName", "Set name for the histograms & ntuple file", "Filename");
88
89 fSetHistoDirNameCmd = CreateCommand<G4UIcmdWithAString>(
90 "setHistoDirName", "Set name for the histograms directory", "HistoDirName");
91
92 fSetNtupleDirNameCmd = CreateCommand<G4UIcmdWithAString>(
93 "setNtupleDirName", "Set name for the ntuple directory", "NtupleDirName");
94
95 fNtupleMessenger = std::make_unique<G4NtupleMessenger>(manager);
96}