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 fSetDefaultFileTypeCmd = CreateCommand<G4UIcmdWithAString>(
71 "setDefaultFileType", "Set default output file type", "DefaultFileType", false);
72#ifdef TOOLS_USE_HDF5
73 fSetDefaultFileTypeCmd->SetCandidates("csv hdf5 root xml");
74#else
75 fSetDefaultFileTypeCmd->SetCandidates("csv root xml");
76#endif
77
78 fSetActivationCmd = CreateCommand<G4UIcmdWithABool>(
79 "setActivation",
80 "Set activation. \n"
81 "When this option is enabled, only the histograms marked as activated\n"
82 "are returned, filled or saved on file.\n"
83 "No warning is issued when Get or Fill is called on inactive histogram.",
84 "Activation");
85
86 fVerboseCmd = CreateCommand<G4UIcmdWithAnInteger>(
87 "verbose", "Set verbose level", "VerboseLevel");
88 fVerboseCmd->SetRange("VerboseLevel>=0 && VerboseLevel<=4");
89
90 fCompressionCmd = CreateCommand<G4UIcmdWithAnInteger>(
91 "compression", "Set compression level", "CompressionLevel");
92 fCompressionCmd->SetRange("CompressionLevel>=0 && CompressionLevel<=4");
93
94 fSetFileNameCmd = CreateCommand<G4UIcmdWithAString>(
95 "setFileName", "Set name for the histograms & ntuple file", "Filename");
96
97 fSetHistoDirNameCmd = CreateCommand<G4UIcmdWithAString>(
98 "setHistoDirName", "Set name for the histograms directory", "HistoDirName");
99
100 fSetNtupleDirNameCmd = CreateCommand<G4UIcmdWithAString>(
101 "setNtupleDirName", "Set name for the ntuple directory", "NtupleDirName");
102
103 fNtupleMessenger = std::make_unique<G4NtupleMessenger>(manager);
104}