Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AnalysisMessenger Class Reference

#include <G4AnalysisMessenger.hh>

Inheritance diagram for G4AnalysisMessenger:
Collaboration diagram for G4AnalysisMessenger:

Public Member Functions

 G4AnalysisMessenger (G4VAnalysisManager *manager)
 
virtual ~G4AnalysisMessenger ()
 
void SetH1HnManager (G4HnManager &h1HnManager)
 
void SetH2HnManager (G4HnManager &h2HnManager)
 
void SetH3HnManager (G4HnManager &h2HnManager)
 
void SetP1HnManager (G4HnManager &h1HnManager)
 
void SetP2HnManager (G4HnManager &h2HnManager)
 
virtual void SetNewValue (G4UIcommand *command, G4String value) final
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 58 of file G4AnalysisMessenger.hh.

Constructor & Destructor Documentation

G4AnalysisMessenger::G4AnalysisMessenger ( G4VAnalysisManager manager)
explicit

Definition at line 48 of file G4AnalysisMessenger.cc.

49  : G4UImessenger(),
50  fManager(manager),
51  fFileMessenger(nullptr),
52  fH1Messenger(nullptr),
53  fH2Messenger(nullptr),
54  fH3Messenger(nullptr),
55  fP1Messenger(nullptr),
56  fP2Messenger(nullptr),
57  fNtupleMessenger(nullptr),
58  fH1HnMessenger(nullptr),
59  fH2HnMessenger(nullptr),
60  fH3HnMessenger(nullptr),
61  fP1HnMessenger(nullptr),
62  fP2HnMessenger(nullptr),
63  fAnalysisDir(nullptr),
64  fSetActivationCmd(nullptr),
65  fVerboseCmd(nullptr),
66  fCompressionCmd(nullptr)
67 {
68  fAnalysisDir = G4Analysis::make_unique<G4UIdirectory>("/analysis/");
69  fAnalysisDir->SetGuidance("analysis control");
70 
71  fSetActivationCmd = G4Analysis::make_unique<G4UIcmdWithABool>("/analysis/setActivation",this);
72  G4String guidance = "Set activation. \n";
73  guidance += "When this option is enabled, only the histograms marked as activated\n";
74  guidance += "are returned, filled or saved on file.\n";
75  guidance += "No warning is issued when Get or Fill is called on inactive histogram.";
76  fSetActivationCmd->SetGuidance(guidance);
77  fSetActivationCmd->SetParameterName("Activation",false);
78 
79  fVerboseCmd = G4Analysis::make_unique<G4UIcmdWithAnInteger>("/analysis/verbose",this);
80  fVerboseCmd->SetGuidance("Set verbose level");
81  fVerboseCmd->SetParameterName("VerboseLevel",false);
82  fVerboseCmd->SetRange("VerboseLevel>=0 && VerboseLevel<=4");
83 
84  fCompressionCmd = G4Analysis::make_unique<G4UIcmdWithAnInteger>("/analysis/compression",this);
85  fCompressionCmd->SetGuidance("Set compression level");
86  fCompressionCmd->SetParameterName("CompressionLevel",false);
87  fCompressionCmd->SetRange("CompressionLevel>=0 && CompressionLevel<=4");
88 
89  fFileMessenger = G4Analysis::make_unique<G4FileMessenger>(manager);
90  fH1Messenger = G4Analysis::make_unique<G4H1Messenger>(manager);
91  fH2Messenger = G4Analysis::make_unique<G4H2Messenger>(manager);
92  fH3Messenger = G4Analysis::make_unique<G4H3Messenger>(manager);
93  fP1Messenger = G4Analysis::make_unique<G4P1Messenger>(manager);
94  fP2Messenger = G4Analysis::make_unique<G4P2Messenger>(manager);
95  fNtupleMessenger = G4Analysis::make_unique<G4NtupleMessenger>(manager);
96 }
G4AnalysisMessenger::~G4AnalysisMessenger ( )
virtual

Definition at line 99 of file G4AnalysisMessenger.cc.

100 {}

Member Function Documentation

void G4AnalysisMessenger::SetH1HnManager ( G4HnManager h1HnManager)

Definition at line 107 of file G4AnalysisMessenger.cc.

108 {
109  fH1HnMessenger = G4Analysis::make_unique<G4HnMessenger>(h1HnManager);
110 }
void G4AnalysisMessenger::SetH2HnManager ( G4HnManager h2HnManager)

Definition at line 113 of file G4AnalysisMessenger.cc.

114 {
115  fH2HnMessenger = G4Analysis::make_unique<G4HnMessenger>(h2HnManager);
116 }
void G4AnalysisMessenger::SetH3HnManager ( G4HnManager h2HnManager)

Definition at line 119 of file G4AnalysisMessenger.cc.

120 {
121  fH2HnMessenger = G4Analysis::make_unique<G4HnMessenger>(h2HnManager);
122 }
void G4AnalysisMessenger::SetNewValue ( G4UIcommand command,
G4String  value 
)
finalvirtual

Reimplemented from G4UImessenger.

Definition at line 137 of file G4AnalysisMessenger.cc.

138 {
139  if ( command == fSetActivationCmd.get() ) {
140  fManager->SetActivation(fSetActivationCmd->GetNewBoolValue(newValues));
141  }
142  else if ( command == fVerboseCmd.get() ) {
143  fManager->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValues));
144  }
145  else if ( command == fCompressionCmd.get() ) {
146  fManager->SetCompressionLevel(fCompressionCmd->GetNewIntValue(newValues));
147  }
148 }
void SetCompressionLevel(G4int level)
void SetVerboseLevel(G4int verboseLevel)
void SetActivation(G4bool activation)

Here is the call graph for this function:

void G4AnalysisMessenger::SetP1HnManager ( G4HnManager h1HnManager)

Definition at line 125 of file G4AnalysisMessenger.cc.

126 {
127  fP1HnMessenger = G4Analysis::make_unique<G4HnMessenger>(p1HnManager);
128 }
void G4AnalysisMessenger::SetP2HnManager ( G4HnManager h2HnManager)

Definition at line 131 of file G4AnalysisMessenger.cc.

132 {
133  fP2HnMessenger = G4Analysis::make_unique<G4HnMessenger>(p2HnManager);
134 }

The documentation for this class was generated from the following files: