Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4P1ToolsManager Class Reference

#include <G4P1ToolsManager.hh>

Inheritance diagram for G4P1ToolsManager:
Collaboration diagram for G4P1ToolsManager:

Public Member Functions

 G4P1ToolsManager (const G4AnalysisManagerState &state)
 
virtual ~G4P1ToolsManager ()
 
G4int AddP1 (const G4String &name, tools::histo::p1d *p1d)
 
void AddP1Vector (const std::vector< tools::histo::p1d * > &p1Vector)
 
tools::histo::p1d * GetP1 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
std::vector< tools::histo::p1d * >
::iterator 
BeginP1 ()
 
std::vector< tools::histo::p1d * >
::iterator 
EndP1 ()
 
std::vector< tools::histo::p1d * >
::const_iterator 
BeginConstP1 () const
 
std::vector< tools::histo::p1d * >
::const_iterator 
EndConstP1 () const
 
const std::vector
< tools::histo::p1d * > & 
GetP1Vector () const
 
const std::vector
< G4HnInformation * > & 
GetHnVector () const
 
- Public Member Functions inherited from G4VP1Manager
 G4VP1Manager ()
 
virtual ~G4VP1Manager ()
 
 G4VP1Manager (const G4VP1Manager &rhs)=delete
 
G4VP1Manageroperator= (const G4VP1Manager &rhs)=delete
 
- Public Member Functions inherited from G4THnManager< tools::histo::p1d >
 G4THnManager (const G4AnalysisManagerState &state, const G4String &hnType)
 
virtual ~G4THnManager ()
 
G4bool Reset ()
 
G4bool IsEmpty () const
 

Protected Member Functions

virtual G4int CreateP1 (const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear") final
 
virtual G4int CreateP1 (const G4String &name, const G4String &title, const std::vector< G4double > &edges, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none") final
 
virtual G4bool SetP1 (G4int id, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear") final
 
virtual G4bool SetP1 (G4int id, const std::vector< G4double > &edges, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none") final
 
virtual G4bool ScaleP1 (G4int id, G4double factor) final
 
virtual G4bool FillP1 (G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0) final
 
virtual G4int GetP1Id (const G4String &name, G4bool warn=true) const final
 
virtual G4int GetP1Nbins (G4int id) const final
 
virtual G4double GetP1Xmin (G4int id) const final
 
virtual G4double GetP1Xmax (G4int id) const final
 
virtual G4double GetP1XWidth (G4int id) const final
 
virtual G4double GetP1Ymin (G4int id) const final
 
virtual G4double GetP1Ymax (G4int id) const final
 
virtual G4bool SetP1Title (G4int id, const G4String &title) final
 
virtual G4bool SetP1XAxisTitle (G4int id, const G4String &title) final
 
virtual G4bool SetP1YAxisTitle (G4int id, const G4String &title) final
 
virtual G4String GetP1Title (G4int id) const final
 
virtual G4String GetP1XAxisTitle (G4int id) const final
 
virtual G4String GetP1YAxisTitle (G4int id) const final
 
virtual std::shared_ptr
< G4HnManager
GetHnManager () final
 
- Protected Member Functions inherited from G4THnManager< tools::histo::p1d >
void AddTVector (const std::vector< tools::histo::p1d * > &tVector)
 
std::vector< tools::histo::p1d * >
::iterator 
BeginT ()
 
std::vector< tools::histo::p1d * >
::iterator 
EndT ()
 
std::vector< tools::histo::p1d * >
::const_iterator 
BeginConstT () const
 
std::vector< tools::histo::p1d * >
::const_iterator 
EndConstT () const
 
tools::histo::p1d * GetTInFunction (G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
 
G4int RegisterT (tools::histo::p1d *t, const G4String &name)
 
G4int GetTId (const G4String &name, G4bool warn=true) const
 

Additional Inherited Members

- Protected Attributes inherited from G4THnManager< tools::histo::p1d >
const G4AnalysisManagerStatefState
 
std::vector< tools::histo::p1d * > fTVector
 
std::map< G4String, G4intfNameIdMap
 
std::shared_ptr< G4HnManagerfHnManager
 

Detailed Description

Definition at line 53 of file G4P1ToolsManager.hh.

Constructor & Destructor Documentation

G4P1ToolsManager::G4P1ToolsManager ( const G4AnalysisManagerState state)
explicit

Definition at line 49 of file G4P1ToolsManager.cc.

G4P1ToolsManager::~G4P1ToolsManager ( )
virtual

Definition at line 55 of file G4P1ToolsManager.cc.

56 {}

Member Function Documentation

G4int G4P1ToolsManager::AddP1 ( const G4String name,
tools::histo::p1d *  p1d 
)

Definition at line 558 of file G4P1ToolsManager.cc.

559 {
560 #ifdef G4VERBOSE
561  if ( fState.GetVerboseL4() )
562  fState.GetVerboseL4()->Message("add", "P1", name);
563 #endif
564 
565  // Add annotation
566  AddP1Annotation(p1d, "none", "none", "none", "none");
567  // Add information
568  AddP1Information(name, "none", "none", "none", "none", G4BinScheme::kLinear);
569 
570  // Register profile
571  auto id = RegisterT(p1d, name);
572 
573 #ifdef G4VERBOSE
574  if ( fState.GetVerboseL2() )
575  fState.GetVerboseL2()->Message("add", "P1", name);
576 #endif
577  return id;
578 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
G4int RegisterT(tools::histo::p1d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4P1ToolsManager::AddP1Vector ( const std::vector< tools::histo::p1d * > &  p1Vector)

Definition at line 581 of file G4P1ToolsManager.cc.

583 {
584  AddTVector(p1Vector);
585 }
void AddTVector(const std::vector< tools::histo::p1d * > &tVector)

Here is the call graph for this function:

std::vector< tools::histo::p1d * >::const_iterator G4P1ToolsManager::BeginConstP1 ( ) const
inline

Definition at line 179 of file G4P1ToolsManager.hh.

180 { return BeginConstT(); }
std::vector< tools::histo::p1d * >::const_iterator BeginConstT() const

Here is the call graph for this function:

std::vector< tools::histo::p1d * >::iterator G4P1ToolsManager::BeginP1 ( )
inline

Definition at line 172 of file G4P1ToolsManager.hh.

173 { return BeginT(); }
std::vector< tools::histo::p1d * >::iterator BeginT()

Here is the call graph for this function:

G4int G4P1ToolsManager::CreateP1 ( const G4String name,
const G4String title,
G4int  nbins,
G4double  xmin,
G4double  xmax,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String xbinScheme = "linear" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 254 of file G4P1ToolsManager.cc.

260 {
261 #ifdef G4VERBOSE
262  if ( fState.GetVerboseL4() )
263  fState.GetVerboseL4()->Message("create", "P1", name);
264 #endif
265  tools::histo::p1d* p1d
266  = CreateToolsP1(title, nbins, xmin, xmax, ymin, ymax,
267  xunitName, yunitName, xfcnName, yfcnName,
268  xbinSchemeName);
269 
270  // Add annotation
271  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
272 
273  // Save P1 information
274  auto xbinScheme = GetBinScheme(xbinSchemeName);
275  AddP1Information(
276  name, xunitName, yunitName, xfcnName, yfcnName, xbinScheme);
277 
278  // Register profile
279  G4int id = RegisterT(p1d, name);
280 
281 #ifdef G4VERBOSE
282  if ( fState.GetVerboseL2() )
283  fState.GetVerboseL2()->Message("create", "P1", name);
284 #endif
285  return id;
286 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
int G4int
Definition: G4Types.hh:78
G4int RegisterT(tools::histo::p1d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:36

Here is the call graph for this function:

G4int G4P1ToolsManager::CreateP1 ( const G4String name,
const G4String title,
const std::vector< G4double > &  edges,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 289 of file G4P1ToolsManager.cc.

294 {
295 #ifdef G4VERBOSE
296  if ( fState.GetVerboseL4() )
297  fState.GetVerboseL4()->Message("create", "P1", name);
298 #endif
299  tools::histo::p1d* p1d
300  = CreateToolsP1(title, edges, ymin, ymax,
301  xunitName, yunitName, xfcnName, yfcnName);
302 
303  // Add annotation
304  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
305 
306  // Save P1 information
307  AddP1Information(
308  name, xunitName, yunitName, xfcnName, yfcnName, G4BinScheme::kUser);
309 
310  // Register profile
311  G4int id = RegisterT(p1d, name);
312 
313 #ifdef G4VERBOSE
314  if ( fState.GetVerboseL2() )
315  fState.GetVerboseL2()->Message("create", "P1", name);
316 #endif
317  return id;
318 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
int G4int
Definition: G4Types.hh:78
G4int RegisterT(tools::histo::p1d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const

Here is the call graph for this function:

std::vector< tools::histo::p1d * >::const_iterator G4P1ToolsManager::EndConstP1 ( ) const
inline

Definition at line 183 of file G4P1ToolsManager.hh.

184 { return EndConstT(); }
std::vector< tools::histo::p1d * >::const_iterator EndConstT() const

Here is the call graph for this function:

std::vector< tools::histo::p1d * >::iterator G4P1ToolsManager::EndP1 ( )
inline

Definition at line 175 of file G4P1ToolsManager.hh.

176 { return EndT(); }
std::vector< tools::histo::p1d * >::iterator EndT()

Here is the call graph for this function:

G4bool G4P1ToolsManager::FillP1 ( G4int  id,
G4double  xvalue,
G4double  yvalue,
G4double  weight = 1.0 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 400 of file G4P1ToolsManager.cc.

402 {
403  auto p1d = GetTInFunction(id, "FillP1", true, false);
404  if ( ! p1d ) return false;
405 
406  if ( fState.GetIsActivation() && ( ! fHnManager->GetActivation(id) ) ) {
407  //G4cout << "Skipping FillP1 for " << id << G4endl;
408  return false;
409  }
410 
411  auto xInfo
412  = fHnManager->GetHnDimensionInformation(id, kX, "FillP1");
413  auto yInfo
414  = fHnManager->GetHnDimensionInformation(id, kY, "FillP1");
415 
416  p1d->fill(xInfo->fFcn(xvalue/xInfo->fUnit),
417  yInfo->fFcn(yvalue/yInfo->fUnit), weight);
418 
419 #ifdef G4VERBOSE
420  if ( fState.GetVerboseL4() ) {
421  G4ExceptionDescription description;
422  description << " id " << id
423  << " xvalue " << xvalue
424  << " xfcn(xvalue/xunit) " << xInfo->fFcn(xvalue/xInfo->fUnit)
425  << " yvalue " << yvalue
426  << " yfcn(yvalue/yunit) " << yInfo->fFcn(yvalue/yInfo->fUnit)
427  << " weight " << weight;
428  fState.GetVerboseL4()->Message("fill", "P1", description);
429  }
430 #endif
431  return true;
432 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

std::shared_ptr< G4HnManager > G4P1ToolsManager::GetHnManager ( )
inlinefinalprotectedvirtual

Implements G4VP1Manager.

Definition at line 192 of file G4P1ToolsManager.hh.

193 { return std::shared_ptr<G4HnManager>(fHnManager); }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const std::vector< G4HnInformation * > & G4P1ToolsManager::GetHnVector ( ) const
inline

Definition at line 189 of file G4P1ToolsManager.hh.

190 { return fHnManager->GetHnVector(); }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83

Here is the caller graph for this function:

tools::histo::p1d * G4P1ToolsManager::GetP1 ( G4int  id,
G4bool  warn = true,
G4bool  onlyIfActive = true 
) const

Definition at line 588 of file G4P1ToolsManager.cc.

590 {
591  return GetTInFunction(id, "GetP1", warn, onlyIfActive);
592 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4int G4P1ToolsManager::GetP1Id ( const G4String name,
G4bool  warn = true 
) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 435 of file G4P1ToolsManager.cc.

436 {
437  return GetTId(name, warn);
438 }
G4int GetTId(const G4String &name, G4bool warn=true) const

Here is the call graph for this function:

G4int G4P1ToolsManager::GetP1Nbins ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 441 of file G4P1ToolsManager.cc.

442 {
443  auto p1d = GetTInFunction(id, "GetP1Nbins");
444  if ( ! p1d ) return 0;
445 
446  return GetNbins(*p1d, kX);
447 }
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)

Here is the call graph for this function:

G4String G4P1ToolsManager::GetP1Title ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 526 of file G4P1ToolsManager.cc.

527 {
528  auto p1d = GetTInFunction(id, "GetP1Title");
529  if ( ! p1d ) return "";
530 
531  return GetTitle(*p1d);
532 }
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

const std::vector< tools::histo::p1d * > & G4P1ToolsManager::GetP1Vector ( ) const
inline

Definition at line 186 of file G4P1ToolsManager.hh.

187 { return fTVector; }
std::vector< tools::histo::p1d * > fTVector
Definition: G4THnManager.hh:81

Here is the caller graph for this function:

G4String G4P1ToolsManager::GetP1XAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 536 of file G4P1ToolsManager.cc.

537 {
538  auto p1d = GetTInFunction(id, "GetP1XAxisTitle");
539  if ( ! p1d ) return "";
540 
541  return GetAxisTitle(*p1d, kX, fHnManager->GetHnType());
542 }
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4P1ToolsManager::GetP1Xmax ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 461 of file G4P1ToolsManager.cc.

462 {
463  auto p1d = GetTInFunction(id, "GetP1Xmax");
464  if ( ! p1d ) return 0.;
465 
466  return GetMax(*p1d, kX);
467 }
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)

Here is the call graph for this function:

G4double G4P1ToolsManager::GetP1Xmin ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 450 of file G4P1ToolsManager.cc.

451 {
452 // Returns xmin value with applied unit and profile function
453 
454  auto p1d = GetTInFunction(id, "GetP1Xmin");
455  if ( ! p1d ) return 0.;
456 
457  return GetMin(*p1d, kX);
458 }
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4P1ToolsManager::GetP1XWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 470 of file G4P1ToolsManager.cc.

471 {
472  auto p1d = GetTInFunction(id, "GetP1XWidth", true, false);
473  if ( ! p1d ) return 0.;
474 
475  return GetWidth(*p1d, kX, fHnManager->GetHnType());
476 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4String G4P1ToolsManager::GetP1YAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 545 of file G4P1ToolsManager.cc.

546 {
547  auto p1d = GetTInFunction(id, "GetP1YAxisTitle");
548  if ( ! p1d ) return "";
549 
550  return GetAxisTitle(*p1d, kY, fHnManager->GetHnType());
551 }
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

G4double G4P1ToolsManager::GetP1Ymax ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 490 of file G4P1ToolsManager.cc.

491 {
492  auto p1d = GetTInFunction(id, "GetP1Ymax");
493  if ( ! p1d ) return 0.;
494 
495  return p1d->max_v();
496 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4P1ToolsManager::GetP1Ymin ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 479 of file G4P1ToolsManager.cc.

480 {
481 // Returns xmin value with applied unit and profile function
482 
483  auto p1d = GetTInFunction(id, "GetP1Ymin");
484  if ( ! p1d ) return 0.;
485 
486  return p1d->min_v();
487 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P1ToolsManager::ScaleP1 ( G4int  id,
G4double  factor 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 391 of file G4P1ToolsManager.cc.

392 {
393  auto p1d = GetTInFunction(id, "ScaleP1", false, false);
394  if ( ! p1d ) return false;
395 
396  return p1d->scale(factor);
397 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P1ToolsManager::SetP1 ( G4int  id,
G4int  nbins,
G4double  xmin,
G4double  xmax,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String xbinScheme = "linear" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 321 of file G4P1ToolsManager.cc.

327 {
328  auto p1d = GetTInFunction(id, "SetP1", false, false);
329  if ( ! p1d ) return false;
330 
331  auto info = fHnManager->GetHnInformation(id,"SetP1");
332 #ifdef G4VERBOSE
333  if ( fState.GetVerboseL4() )
334  fState.GetVerboseL4()->Message("configure", "P1", info->GetName());
335 #endif
336 
337  // Configure tools p1
338  ConfigureToolsP1(
339  p1d, nbins, xmin, xmax, ymin, ymax,
340  xunitName, yunitName, xfcnName, yfcnName, xbinSchemeName);
341 
342  // Add annotation
343  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
344 
345  // Update information
346  auto xbinScheme = GetBinScheme(xbinSchemeName);
347  UpdateP1Information(
348  info, xunitName, yunitName, xfcnName, yfcnName, xbinScheme);
349 
350  // Set activation
351  fHnManager->SetActivation(id, true);
352 
353  return true;
354 }
const XML_Char XML_Encoding * info
Definition: expat.h:530
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:36

Here is the call graph for this function:

G4bool G4P1ToolsManager::SetP1 ( G4int  id,
const std::vector< G4double > &  edges,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 357 of file G4P1ToolsManager.cc.

362 {
363  auto p1d = GetTInFunction(id, "SetP1", false, false);
364  if ( ! p1d ) return false;
365 
366  auto info = fHnManager->GetHnInformation(id,"SetP1");
367 #ifdef G4VERBOSE
368  if ( fState.GetVerboseL4() )
369  fState.GetVerboseL4()->Message("configure", "P1", info->GetName());
370 #endif
371 
372  // Configure tools p1
373  ConfigureToolsP1(p1d, edges, ymin, ymax,
374  xunitName, yunitName, xfcnName, yfcnName);
375 
376  // Add annotation
377  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
378 
379  // Update information
380  UpdateP1Information(
381  info, xunitName, yunitName, xfcnName, yfcnName, G4BinScheme::kUser);
382 
383  // Set activation
384  fHnManager->SetActivation(id, true);
385 
386  return true;
387 }
const XML_Char XML_Encoding * info
Definition: expat.h:530
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P1ToolsManager::SetP1Title ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 499 of file G4P1ToolsManager.cc.

500 {
501  auto p1d = GetTInFunction(id, "SetP1Title");
502  if ( ! p1d ) return false;
503 
504  return SetTitle(*p1d, title);
505 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)

Here is the call graph for this function:

G4bool G4P1ToolsManager::SetP1XAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 508 of file G4P1ToolsManager.cc.

509 {
510  auto p1d = GetTInFunction(id, "SetP1XAxisTitle");
511  if ( ! p1d ) return false;
512 
513  return SetAxisTitle(*p1d, kX, title);
514 }
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P1ToolsManager::SetP1YAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 517 of file G4P1ToolsManager.cc.

518 {
519  auto p1d = GetTInFunction(id, "SetP1YAxisTitle");
520  if ( ! p1d ) return false;
521 
522  return SetAxisTitle(*p1d, kY, title);
523 }
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:


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