50 fFileMessenger(nullptr),
51 fH1Messenger(nullptr),
52 fH2Messenger(nullptr),
53 fH3Messenger(nullptr),
54 fP1Messenger(nullptr),
55 fP2Messenger(nullptr),
56 fNtupleMessenger(nullptr),
57 fH1HnMessenger(nullptr),
58 fH2HnMessenger(nullptr),
59 fH3HnMessenger(nullptr),
60 fP1HnMessenger(nullptr),
61 fP2HnMessenger(nullptr),
62 fAnalysisDir(nullptr),
63 fSetActivationCmd(nullptr),
65 fCompressionCmd(nullptr)
67 fAnalysisDir = G4Analysis::make_unique<G4UIdirectory>(
"/analysis/");
68 fAnalysisDir->SetGuidance(
"analysis control");
70 fSetActivationCmd = G4Analysis::make_unique<G4UIcmdWithABool>(
"/analysis/setActivation",
this);
71 G4String guidance =
"Set activation. \n";
72 guidance +=
"When this option is enabled, only the histograms marked as activated\n";
73 guidance +=
"are returned, filled or saved on file.\n";
74 guidance +=
"No warning is issued when Get or Fill is called on inactive histogram.";
75 fSetActivationCmd->SetGuidance(guidance);
76 fSetActivationCmd->SetParameterName(
"Activation",
false);
78 fVerboseCmd = G4Analysis::make_unique<G4UIcmdWithAnInteger>(
"/analysis/verbose",
this);
79 fVerboseCmd->SetGuidance(
"Set verbose level");
80 fVerboseCmd->SetParameterName(
"VerboseLevel",
false);
81 fVerboseCmd->SetRange(
"VerboseLevel>=0 && VerboseLevel<=4");
83 fCompressionCmd = G4Analysis::make_unique<G4UIcmdWithAnInteger>(
"/analysis/compression",
this);
84 fCompressionCmd->SetGuidance(
"Set compression level");
85 fCompressionCmd->SetParameterName(
"CompressionLevel",
false);
86 fCompressionCmd->SetRange(
"CompressionLevel>=0 && CompressionLevel<=4");
88 fFileMessenger = G4Analysis::make_unique<G4FileMessenger>(manager);
89 fH1Messenger = G4Analysis::make_unique<G4H1Messenger>(manager);
90 fH2Messenger = G4Analysis::make_unique<G4H2Messenger>(manager);
91 fH3Messenger = G4Analysis::make_unique<G4H3Messenger>(manager);
92 fP1Messenger = G4Analysis::make_unique<G4P1Messenger>(manager);
93 fP2Messenger = G4Analysis::make_unique<G4P2Messenger>(manager);
94 fNtupleMessenger = G4Analysis::make_unique<G4NtupleMessenger>(manager);
108 fH1HnMessenger = G4Analysis::make_unique<G4HnMessenger>(h1HnManager);
114 fH2HnMessenger = G4Analysis::make_unique<G4HnMessenger>(h2HnManager);
120 fH3HnMessenger = G4Analysis::make_unique<G4HnMessenger>(h3HnManager);
126 fP1HnMessenger = G4Analysis::make_unique<G4HnMessenger>(p1HnManager);
132 fP2HnMessenger = G4Analysis::make_unique<G4HnMessenger>(p2HnManager);
138 if ( command == fSetActivationCmd.get() ) {
139 fManager->
SetActivation(fSetActivationCmd->GetNewBoolValue(newValues));
141 else if ( command == fVerboseCmd.get() ) {
144 else if ( command == fCompressionCmd.get() ) {
virtual ~G4AnalysisMessenger()
void SetP2HnManager(G4HnManager &p2HnManager)
void SetP1HnManager(G4HnManager &p1HnManager)
void SetH2HnManager(G4HnManager &h2HnManager)
G4AnalysisMessenger(G4VAnalysisManager *manager)
void SetH3HnManager(G4HnManager &h3HnManager)
virtual void SetNewValue(G4UIcommand *command, G4String value) final
void SetH1HnManager(G4HnManager &h1HnManager)
void SetActivation(G4bool activation)
void SetVerboseLevel(G4int verboseLevel)
void SetCompressionLevel(G4int level)