#include <G4HnManager.hh>
|
| G4HnManager (const G4String &hnType, const G4AnalysisManagerState &state) |
|
virtual | ~G4HnManager () |
|
G4HnInformation * | AddHnInformation (const G4String &name, G4int nofDimensions) |
|
G4HnInformation * | GetHnInformation (G4int id, G4String functionName="", G4bool warn=true) const |
|
G4HnDimensionInformation * | GetHnDimensionInformation (G4int id, G4int dimension, G4String functionName="", G4bool warn=true) const |
|
const std::vector< G4HnInformation * > & | GetHnVector () const |
|
G4int | GetNofHns () const |
|
G4String | GetHnType () const |
|
G4bool | IsActive () const |
|
G4bool | IsAscii () const |
|
G4bool | IsPlotting () const |
|
G4bool | IsFileName () const |
|
void | SetActivation (G4bool activation) |
|
void | SetActivation (G4int id, G4bool activation) |
|
void | SetAscii (G4int id, G4bool ascii) |
|
void | SetPlotting (G4int id, G4bool plotting) |
|
void | SetPlotting (G4bool plotting) |
|
void | SetFileName (G4int id, const G4String &fileName) |
|
void | SetFileName (const G4String &fileName) |
|
G4bool | SetXAxisIsLog (G4int id, G4bool isLogAxis) |
|
G4bool | SetYAxisIsLog (G4int id, G4bool isLogAxis) |
|
G4bool | SetZAxisIsLog (G4int id, G4bool isLogAxis) |
|
G4String | GetName (G4int id) const |
|
G4double | GetXUnit (G4int id) const |
|
G4double | GetYUnit (G4int id) const |
|
G4double | GetZUnit (G4int id) const |
|
G4bool | GetXAxisIsLog (G4int id) const |
|
G4bool | GetYAxisIsLog (G4int id) const |
|
G4bool | GetZAxisIsLog (G4int id) const |
|
G4bool | GetActivation (G4int id) const |
|
G4bool | GetAscii (G4int id) const |
|
G4bool | GetPlotting (G4int id) const |
|
G4String | GetFileName (G4int id) const |
|
void | SetFileManager (std::shared_ptr< G4VFileManager > fileManager) |
|
| G4BaseAnalysisManager (const G4AnalysisManagerState &state) |
|
virtual | ~G4BaseAnalysisManager () |
|
G4bool | SetFirstId (G4int firstId) |
|
void | SetLockFirstId (G4bool lockFirstId) |
|
G4int | GetFirstId () const |
|
Definition at line 44 of file G4HnManager.hh.
◆ G4HnManager()
Definition at line 36 of file G4HnManager.cc.
39 fHnType(hnType),
40 fNofActiveObjects(0),
41 fNofAsciiObjects(0),
42 fNofPlottingObjects(0),
43 fNofFileNameObjects(0),
44 fHnVector(),
45 fFileManager(nullptr)
46{
47}
◆ ~G4HnManager()
G4HnManager::~G4HnManager |
( |
| ) |
|
|
virtual |
Definition at line 50 of file G4HnManager.cc.
51{
52 for ( auto info : fHnVector ) {
53 delete info;
54 }
55}
◆ AddHnInformation()
Definition at line 123 of file G4HnManager.cc.
124{
126 fHnVector.push_back(info);
127 ++fNofActiveObjects;
128
129 return info;
130}
◆ GetActivation()
Definition at line 377 of file G4HnManager.cc.
378{
380
381 if ( ! info ) return true;
382
383 return info->GetActivation();
384}
G4HnInformation * GetHnInformation(G4int id, G4String functionName="", G4bool warn=true) const
◆ GetAscii()
Definition at line 387 of file G4HnManager.cc.
388{
390
391 if ( ! info ) return false;
392
393 return info->GetAscii();
394}
◆ GetFileName()
Definition at line 407 of file G4HnManager.cc.
408{
410
411 if ( ! info ) return "";
412
413 return info->GetFileName();
414}
◆ GetHnDimensionInformation()
◆ GetHnInformation()
Definition at line 133 of file G4HnManager.cc.
135{
137 if ( index < 0 || index >=
G4int(fHnVector.size()) ) {
138 if ( warn ) {
139 G4String inFunction =
"G4HnManager::";
140 if ( functionName.size() )
141 inFunction += functionName;
142 else
143 inFunction += "GetHnInformation";
145 description << " " << fHnType << " histogram " << id
146 << " does not exist.";
148 }
149 return nullptr;
150 }
151 return fHnVector[index];
152}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
Referenced by GetActivation(), GetAscii(), GetFileName(), GetHnDimensionInformation(), GetName(), GetPlotting(), GetXAxisIsLog(), GetYAxisIsLog(), GetZAxisIsLog(), SetActivation(), SetAscii(), SetFileName(), SetPlotting(), SetXAxisIsLog(), SetYAxisIsLog(), and SetZAxisIsLog().
◆ GetHnType()
G4String G4HnManager::GetHnType |
( |
| ) |
const |
|
inline |
◆ GetHnVector()
const std::vector< G4HnInformation * > & G4HnManager::GetHnVector |
( |
| ) |
const |
|
inline |
◆ GetName()
Definition at line 307 of file G4HnManager.cc.
308{
310
311 if ( ! info ) return "";
312
313 return info->GetName();
314}
◆ GetNofHns()
G4int G4HnManager::GetNofHns |
( |
| ) |
const |
|
inline |
◆ GetPlotting()
Definition at line 397 of file G4HnManager.cc.
398{
400
401 if ( ! info ) return false;
402
403 return info->GetPlotting();
404}
◆ GetXAxisIsLog()
Definition at line 347 of file G4HnManager.cc.
348{
350
351 if ( ! info ) return false;
352
353 return info->GetIsLogAxis(
kX);
354}
◆ GetXUnit()
Definition at line 317 of file G4HnManager.cc.
318{
320
321 if ( ! info ) return 1.0;
322
323 return info->fUnit;
324}
G4HnDimensionInformation * GetHnDimensionInformation(G4int id, G4int dimension, G4String functionName="", G4bool warn=true) const
◆ GetYAxisIsLog()
Definition at line 357 of file G4HnManager.cc.
358{
360
361 if ( ! info ) return 1.0;
362
363 return info->GetIsLogAxis(
kY);
364}
◆ GetYUnit()
Definition at line 327 of file G4HnManager.cc.
328{
330
331 if ( ! info ) return 1.0;
332
333 return info->fUnit;
334}
◆ GetZAxisIsLog()
Definition at line 367 of file G4HnManager.cc.
368{
370
371 if ( ! info ) return 1.0;
372
373 return info->GetIsLogAxis(
kZ);
374}
◆ GetZUnit()
Definition at line 337 of file G4HnManager.cc.
338{
340
341 if ( ! info ) return 1.0;
342
343 return info->fUnit;
344}
◆ IsActive()
G4bool G4HnManager::IsActive |
( |
| ) |
const |
Definition at line 166 of file G4HnManager.cc.
167{
168 return ( fNofActiveObjects > 0 );
169}
◆ IsAscii()
G4bool G4HnManager::IsAscii |
( |
| ) |
const |
Definition at line 172 of file G4HnManager.cc.
173{
174 return ( fNofAsciiObjects > 0 );
175}
◆ IsFileName()
G4bool G4HnManager::IsFileName |
( |
| ) |
const |
Definition at line 184 of file G4HnManager.cc.
185{
186 return ( fNofFileNameObjects > 0 );
187}
◆ IsPlotting()
G4bool G4HnManager::IsPlotting |
( |
| ) |
const |
Definition at line 178 of file G4HnManager.cc.
179{
180 return ( fNofPlottingObjects > 0 );
181}
◆ SetActivation() [1/2]
void G4HnManager::SetActivation |
( |
G4bool |
activation | ) |
|
◆ SetActivation() [2/2]
void G4HnManager::SetActivation |
( |
G4int |
id, |
|
|
G4bool |
activation |
|
) |
| |
Definition at line 190 of file G4HnManager.cc.
191{
192
193
195
196 if ( ! info ) return;
197
199}
◆ SetAscii()
Definition at line 216 of file G4HnManager.cc.
217{
219
220 if ( ! info ) return;
221
222
223 if ( info->GetAscii() == ascii ) return;
224
225
226 info->SetAscii(ascii);
227 if ( ascii )
228 fNofAsciiObjects++;
229 else
230 fNofAsciiObjects--;
231}
Referenced by G4HnMessenger::SetNewValue().
◆ SetFileManager()
void G4HnManager::SetFileManager |
( |
std::shared_ptr< G4VFileManager > |
fileManager | ) |
|
|
inline |
◆ SetFileName() [1/2]
void G4HnManager::SetFileName |
( |
const G4String & |
fileName | ) |
|
Definition at line 264 of file G4HnManager.cc.
265{
266
267
268 for ( auto info : fHnVector ) {
270 }
271}
void SetFileName(G4int id, const G4String &fileName)
◆ SetFileName() [2/2]
void G4HnManager::SetFileName |
( |
G4int |
id, |
|
|
const G4String & |
fileName |
|
) |
| |
◆ SetPlotting() [1/2]
void G4HnManager::SetPlotting |
( |
G4bool |
plotting | ) |
|
Definition at line 244 of file G4HnManager.cc.
245{
246
247
248 for ( auto info : fHnVector ) {
250 }
251}
void SetPlotting(G4int id, G4bool plotting)
◆ SetPlotting() [2/2]
void G4HnManager::SetPlotting |
( |
G4int |
id, |
|
|
G4bool |
plotting |
|
) |
| |
◆ SetXAxisIsLog()
Definition at line 274 of file G4HnManager.cc.
275{
277
278 if ( ! info ) return false;
279
280 info->SetIsLogAxis(
kX, isLog);
281 return true;
282}
◆ SetYAxisIsLog()
Definition at line 285 of file G4HnManager.cc.
286{
288
289 if ( ! info ) return false;
290
291 info->SetIsLogAxis(
kY, isLog);
292 return true;
293}
◆ SetZAxisIsLog()
Definition at line 296 of file G4HnManager.cc.
297{
299
300 if ( ! info ) return false;
301
302 info->SetIsLogAxis(
kZ, isLog);
303 return true;
304}
The documentation for this class was generated from the following files: