Geant4  10.03
G4RootPNtupleManager Class Reference

#include <G4RootPNtupleManager.hh>

+ Inheritance diagram for G4RootPNtupleManager:
+ Collaboration diagram for G4RootPNtupleManager:

Public Member Functions

 G4RootPNtupleManager (G4RootMainNtupleManager *main, const G4AnalysisManagerState &state)
 
 ~G4RootPNtupleManager ()
 
template<>
G4bool FillNtupleTColumn (G4int ntupleId, G4int columnId, const std::string &value)
 
- Public Member Functions inherited from G4VNtupleManager
 G4VNtupleManager (const G4AnalysisManagerState &state)
 
virtual ~G4VNtupleManager ()
 
 G4VNtupleManager (const G4VNtupleManager &rhs)=delete
 
G4VNtupleManageroperator= (const G4VNtupleManager &rhs)=delete
 
- Public Member Functions inherited from G4BaseAnalysisManager
 G4BaseAnalysisManager (const G4AnalysisManagerState &state)
 
virtual ~G4BaseAnalysisManager ()
 
G4bool SetFirstId (G4int firstId)
 
void SetLockFirstId (G4bool lockFirstId)
 
G4int GetFirstId () const
 

Private Types

enum  G4PNtupleCreateMode { G4PNtupleCreateMode::kSlaveBeforeOpen, G4PNtupleCreateMode::kSlaveAfterOpen, G4PNtupleCreateMode::kUndefined }
 

Private Member Functions

void CreateNtuple (G4RootPNtupleDescription *ntupleDescription, tools::wroot::ntuple *mainNtuple)
 
void CreateNtuplesFromMain ()
 
virtual G4int CreateNtuple (const G4String &name, const G4String &title) final
 
virtual G4int CreateNtupleIColumn (const G4String &name, std::vector< int > *vector) override
 
virtual G4int CreateNtupleFColumn (const G4String &name, std::vector< float > *vector) override
 
virtual G4int CreateNtupleDColumn (const G4String &name, std::vector< double > *vector) override
 
virtual G4int CreateNtupleSColumn (const G4String &name) override
 
virtual void FinishNtuple () override
 
virtual G4int CreateNtupleIColumn (G4int ntupleId, const G4String &name, std::vector< int > *vector) override
 
virtual G4int CreateNtupleFColumn (G4int ntupleId, const G4String &name, std::vector< float > *vector) override
 
virtual G4int CreateNtupleDColumn (G4int ntupleId, const G4String &name, std::vector< double > *vector) override
 
virtual G4int CreateNtupleSColumn (G4int ntupleId, const G4String &name) override
 
virtual void FinishNtuple (G4int ntupleId) override
 
virtual G4bool FillNtupleIColumn (G4int columnId, G4int value) final
 
virtual G4bool FillNtupleFColumn (G4int columnId, G4float value) final
 
virtual G4bool FillNtupleDColumn (G4int columnId, G4double value) final
 
virtual G4bool FillNtupleSColumn (G4int columnId, const G4String &value) final
 
virtual G4bool AddNtupleRow () final
 
virtual G4bool FillNtupleIColumn (G4int ntupleId, G4int columnId, G4int value) final
 
virtual G4bool FillNtupleFColumn (G4int ntupleId, G4int columnId, G4float value) final
 
virtual G4bool FillNtupleDColumn (G4int ntupleId, G4int columnId, G4double value) final
 
virtual G4bool FillNtupleSColumn (G4int ntupleId, G4int columnId, const G4String &value) final
 
virtual G4bool AddNtupleRow (G4int ntupleId) final
 
virtual G4bool Merge () final
 
virtual G4bool Reset (G4bool deleteNtuple) final
 
virtual void SetActivation (G4bool activation) final
 
virtual void SetActivation (G4int ntupleId, G4bool activation) final
 
virtual G4bool GetActivation (G4int ntupleId) const final
 
virtual G4bool IsEmpty () const final
 
virtual G4int GetNofNtuples () const final
 
G4RootPNtupleDescriptionGetNtupleDescriptionInFunction (G4int id, G4String function, G4bool warn=true) const
 
tools::wroot::pntuple * GetNtupleInFunction (G4int id, G4String function, G4bool warn=true) const
 
tools::wroot::ntuple * GetMainNtupleInFunction (G4int id, G4String function, G4bool warn=true) const
 
template<typename T >
G4int CreateNtupleTColumn (G4int ntupleId, const G4String &name, std::vector< T > *vector)
 
template<typename T >
G4int CreateNtupleTColumn (const G4String &name, std::vector< T > *vector)
 
template<typename T >
G4bool FillNtupleTColumn (G4int ntupleId, G4int columnId, const T &value)
 
template<typename T >
G4bool FillNtupleTColumn (G4int columnId, const T &value)
 

Private Attributes

G4PNtupleCreateMode fCreateMode
 
G4RootMainNtupleManagerfMainNtupleManager
 
std::vector
< G4RootPNtupleDescription * > 
fNtupleDescriptionVector
 
std::vector
< tools::wroot::pntuple * > 
fNtupleVector
 

Friends

class G4RootAnalysisManager
 

Additional Inherited Members

- Protected Member Functions inherited from G4VNtupleManager
G4bool SetFirstNtupleColumnId (G4int firstId)
 
G4int GetFirstNtupleColumnId () const
 
- Protected Attributes inherited from G4VNtupleManager
G4int fFirstNtupleColumnId
 
G4bool fLockFirstNtupleColumnId
 
- Protected Attributes inherited from G4BaseAnalysisManager
const G4AnalysisManagerStatefState
 
G4int fFirstId
 
G4bool fLockFirstId
 

Detailed Description

Definition at line 79 of file G4RootPNtupleManager.hh.

Member Enumeration Documentation

Enumerator
kSlaveBeforeOpen 
kSlaveAfterOpen 
kUndefined 

Definition at line 89 of file G4RootPNtupleManager.hh.

Constructor & Destructor Documentation

G4RootPNtupleManager::G4RootPNtupleManager ( G4RootMainNtupleManager main,
const G4AnalysisManagerState state 
)
explicit

Definition at line 45 of file G4RootPNtupleManager.cc.

G4RootPNtupleManager::~G4RootPNtupleManager ( )

Definition at line 54 of file G4RootPNtupleManager.cc.

References fNtupleDescriptionVector.

Member Function Documentation

G4bool G4RootPNtupleManager::AddNtupleRow ( )
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 358 of file G4RootPNtupleManager.cc.

References G4BaseAnalysisManager::fFirstId.

G4bool G4RootPNtupleManager::AddNtupleRow ( G4int  ntupleId)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 392 of file G4RootPNtupleManager.cc.

References G4BaseAnalysisManager::fState, G4Exception(), GetActivation(), G4AnalysisManagerState::GetIsActivation(), GetNtupleDescriptionInFunction(), G4AnalysisManagerState::GetVerboseL3(), G4AnalysisManagerState::GetVerboseL4(), JustWarning, and G4AnalysisVerbose::Message().

+ Here is the call graph for this function:

void G4RootPNtupleManager::CreateNtuple ( G4RootPNtupleDescription ntupleDescription,
tools::wroot::ntuple *  mainNtuple 
)
private

Definition at line 134 of file G4RootPNtupleManager.cc.

References G4RootPNtupleDescription::fFile, G4RootPNtupleDescription::fIsNtupleOwner, G4RootPNtupleDescription::fMainBranches, fMainNtupleManager, G4RootPNtupleDescription::fNtuple, G4RootPNtupleDescription::fNtupleBooking, fNtupleVector, G4BaseAnalysisManager::fState, G4cout, G4RootMainNtupleManager::GetNtupleDirectory(), G4RootMainNtupleManager::GetNtupleFile(), G4AnalysisManagerState::GetVerboseL3(), G4AnalysisManagerState::GetVerboseL4(), and G4AnalysisVerbose::Message().

Referenced by CreateNtuplesFromMain(), and FinishNtuple().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4RootPNtupleManager::CreateNtuple ( const G4String name,
const G4String title 
)
finalprivatevirtual
G4int G4RootPNtupleManager::CreateNtupleDColumn ( const G4String name,
std::vector< double > *  vector 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 262 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleDColumn ( G4int  ntupleId,
const G4String name,
std::vector< double > *  vector 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 298 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleFColumn ( const G4String name,
std::vector< float > *  vector 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 255 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleFColumn ( G4int  ntupleId,
const G4String name,
std::vector< float > *  vector 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 290 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleIColumn ( const G4String name,
std::vector< int > *  vector 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 248 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleIColumn ( G4int  ntupleId,
const G4String name,
std::vector< int > *  vector 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 283 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleSColumn ( const G4String name)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 269 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4int G4RootPNtupleManager::CreateNtupleSColumn ( G4int  ntupleId,
const G4String name 
)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 305 of file G4RootPNtupleManager.cc.

References G4InuclParticleNames::name().

+ Here is the call graph for this function:

void G4RootPNtupleManager::CreateNtuplesFromMain ( )
private

Definition at line 175 of file G4RootPNtupleManager.cc.

References CreateNtuple(), fCreateMode, fMainNtupleManager, fNtupleDescriptionVector, G4RootMainNtupleManager::GetNtupleVector(), kSlaveAfterOpen, kSlaveBeforeOpen, and kUndefined.

Referenced by G4RootAnalysisManager::OpenFileImpl().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
G4int G4RootPNtupleManager::CreateNtupleTColumn ( G4int  ntupleId,
const G4String name,
std::vector< T > *  vector 
)
private
template<typename T >
G4int G4RootPNtupleManager::CreateNtupleTColumn ( const G4String name,
std::vector< T > *  vector 
)
private

Definition at line 222 of file G4RootPNtupleManager.hh.

References G4BaseAnalysisManager::fFirstId, fNtupleDescriptionVector, and G4InuclParticleNames::name().

+ Here is the call graph for this function:

G4bool G4RootPNtupleManager::FillNtupleDColumn ( G4int  columnId,
G4double  value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 344 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleDColumn ( G4int  ntupleId,
G4int  columnId,
G4double  value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 378 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleFColumn ( G4int  columnId,
G4float  value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 337 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleFColumn ( G4int  ntupleId,
G4int  columnId,
G4float  value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 371 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleIColumn ( G4int  columnId,
G4int  value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 330 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleIColumn ( G4int  ntupleId,
G4int  columnId,
G4int  value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 364 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleSColumn ( G4int  columnId,
const G4String value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 351 of file G4RootPNtupleManager.cc.

G4bool G4RootPNtupleManager::FillNtupleSColumn ( G4int  ntupleId,
G4int  columnId,
const G4String value 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 385 of file G4RootPNtupleManager.cc.

template<typename T >
G4bool G4RootPNtupleManager::FillNtupleTColumn ( G4int  ntupleId,
G4int  columnId,
const T &  value 
)
private

Definition at line 288 of file G4RootPNtupleManager.hh.

References G4VNtupleManager::fFirstNtupleColumnId, G4BaseAnalysisManager::fState, G4cout, G4endl, G4Exception(), GetActivation(), G4AnalysisManagerState::GetIsActivation(), GetNtupleInFunction(), G4AnalysisManagerState::GetVerboseL4(), JustWarning, and G4AnalysisVerbose::Message().

Referenced by FillNtupleTColumn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
G4bool G4RootPNtupleManager::FillNtupleTColumn ( G4int  columnId,
const T &  value 
)
private

Definition at line 348 of file G4RootPNtupleManager.hh.

References FillNtupleTColumn().

+ Here is the call graph for this function:

template<>
G4bool G4RootPNtupleManager::FillNtupleTColumn ( G4int  ntupleId,
G4int  columnId,
const std::string &  value 
)
inline

Definition at line 231 of file G4RootPNtupleManager.hh.

References G4VNtupleManager::fFirstNtupleColumnId, G4BaseAnalysisManager::fState, G4cout, G4endl, G4Exception(), GetActivation(), G4AnalysisManagerState::GetIsActivation(), GetNtupleInFunction(), G4AnalysisManagerState::GetVerboseL4(), JustWarning, and G4AnalysisVerbose::Message().

+ Here is the call graph for this function:

void G4RootPNtupleManager::FinishNtuple ( )
overrideprivatevirtual
void G4RootPNtupleManager::FinishNtuple ( G4int  ntupleId)
overrideprivatevirtual

Implements G4VNtupleManager.

Definition at line 312 of file G4RootPNtupleManager.cc.

References CreateNtuple(), fCreateMode, GetMainNtupleInFunction(), GetNtupleDescriptionInFunction(), and kSlaveAfterOpen.

+ Here is the call graph for this function:

G4bool G4RootPNtupleManager::GetActivation ( G4int  ntupleId) const
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 515 of file G4RootPNtupleManager.cc.

References GetNtupleDescriptionInFunction().

Referenced by AddNtupleRow(), and FillNtupleTColumn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

tools::wroot::ntuple * G4RootPNtupleManager::GetMainNtupleInFunction ( G4int  id,
G4String  function,
G4bool  warn = true 
) const
private

Definition at line 107 of file G4RootPNtupleManager.cc.

References G4BaseAnalysisManager::fFirstId, fMainNtupleManager, G4Exception(), G4RootMainNtupleManager::GetNtupleVector(), and JustWarning.

Referenced by FinishNtuple().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4RootPNtupleManager::GetNofNtuples ( ) const
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 525 of file G4RootPNtupleManager.cc.

References fNtupleVector.

G4RootPNtupleDescription * G4RootPNtupleManager::GetNtupleDescriptionInFunction ( G4int  id,
G4String  function,
G4bool  warn = true 
) const
private

Definition at line 67 of file G4RootPNtupleManager.cc.

References G4BaseAnalysisManager::fFirstId, fNtupleDescriptionVector, G4Exception(), and JustWarning.

Referenced by AddNtupleRow(), CreateNtupleTColumn(), FinishNtuple(), GetActivation(), GetNtupleInFunction(), and SetActivation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

tools::wroot::pntuple * G4RootPNtupleManager::GetNtupleInFunction ( G4int  id,
G4String  function,
G4bool  warn = true 
) const
private

Definition at line 86 of file G4RootPNtupleManager.cc.

References G4Exception(), GetNtupleDescriptionInFunction(), and JustWarning.

Referenced by FillNtupleTColumn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4RootPNtupleManager::IsEmpty ( ) const
finalprivatevirtual

Definition at line 531 of file G4RootPNtupleManager.cc.

References fNtupleDescriptionVector.

G4bool G4RootPNtupleManager::Merge ( )
finalprivatevirtual

Definition at line 436 of file G4RootPNtupleManager.cc.

References fNtupleDescriptionVector, G4BaseAnalysisManager::fState, G4Exception(), G4AnalysisManagerState::GetVerboseL3(), G4AnalysisManagerState::GetVerboseL4(), JustWarning, and G4AnalysisVerbose::Message().

Referenced by G4RootAnalysisManager::WriteNtuple().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4RootPNtupleManager::Reset ( G4bool  deleteNtuple)
finalprivatevirtual

Definition at line 479 of file G4RootPNtupleManager.cc.

References fNtupleDescriptionVector, and fNtupleVector.

void G4RootPNtupleManager::SetActivation ( G4bool  activation)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 495 of file G4RootPNtupleManager.cc.

References fNtupleDescriptionVector.

void G4RootPNtupleManager::SetActivation ( G4int  ntupleId,
G4bool  activation 
)
finalprivatevirtual

Implements G4VNtupleManager.

Definition at line 505 of file G4RootPNtupleManager.cc.

References GetNtupleDescriptionInFunction().

+ Here is the call graph for this function:

Friends And Related Function Documentation

friend class G4RootAnalysisManager
friend

Definition at line 81 of file G4RootPNtupleManager.hh.

Member Data Documentation

G4PNtupleCreateMode G4RootPNtupleManager::fCreateMode
private

Definition at line 174 of file G4RootPNtupleManager.hh.

Referenced by CreateNtuple(), CreateNtuplesFromMain(), and FinishNtuple().

G4RootMainNtupleManager* G4RootPNtupleManager::fMainNtupleManager
private
std::vector<tools::wroot::pntuple*> G4RootPNtupleManager::fNtupleVector
private

Definition at line 177 of file G4RootPNtupleManager.hh.

Referenced by CreateNtuple(), GetNofNtuples(), and Reset().


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