Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHNodeIOManager Class Reference

#include <coresoftware/blob/master/offline/framework/phool/PHNodeIOManager.h>

+ Inheritance diagram for PHNodeIOManager:
+ Collaboration diagram for PHNodeIOManager:

Public Member Functions

 PHNodeIOManager ()
 
 PHNodeIOManager (const std::string &, const PHAccessType=PHReadOnly)
 
 PHNodeIOManager (const std::string &, const std::string &, const PHAccessType=PHReadOnly)
 
 PHNodeIOManager (const std::string &, const PHAccessType, const PHTreeType)
 
 ~PHNodeIOManager () override
 
void closeFile () override
 
bool write (PHCompositeNode *) override
 
void print () const override
 
bool setFile (const std::string &, const std::string &, const PHAccessType=PHReadOnly)
 
PHCompositeNoderead (PHCompositeNode *=nullptr, size_t=0)
 
bool read (size_t requestedEvent)
 
int readSpecific (size_t requestedEvent, const std::string &objectName)
 
void selectObjectToRead (const std::string &objectName, bool readit)
 
bool isSelected (const std::string &objectName)
 
int isFunctional () const
 
bool SetCompressionSetting (const int level)
 
uint64_t GetBytesWritten ()
 
uint64_t GetFileSize ()
 
std::map< std::string, TBranch * > * GetBranchMap ()
 
bool write (TObject **, const std::string &, int buffersize, int splitlevel)
 
bool NodeExist (const std::string &nodename)
 
- Public Member Functions inherited from PHIOManager
virtual ~PHIOManager ()
 
std::string getFilename () const
 
size_t getEventNumber () const
 
void setEventNumber (const size_t evno)
 

Private Member Functions

int FillBranchMap ()
 
PHCompositeNodereconstructNodeTree (PHCompositeNode *)
 
bool readEventFromFile (size_t requestedEvent)
 
std::string getBranchClassName (TBranch *)
 

Private Attributes

TFile * file {nullptr}
 
TTree * tree {nullptr}
 
std::string TreeName {"T"}
 
int accessMode {PHReadOnly}
 
int m_CompressionSetting {505}
 
int isFunctionalFlag {0}
 
std::map< std::string, TBranch * > fBranches
 
std::map< std::string, bool > objectToRead
 

Additional Inherited Members

- Protected Member Functions inherited from PHIOManager
 PHIOManager ()
 
- Protected Attributes inherited from PHIOManager
std::string filename
 
size_t eventNumber = 0
 

Detailed Description

Definition at line 22 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 22 of file PHNodeIOManager.h

Constructor & Destructor Documentation

PHNodeIOManager::PHNodeIOManager ( )
inline

Definition at line 25 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 25 of file PHNodeIOManager.h

PHNodeIOManager::PHNodeIOManager ( const std::string &  f,
const PHAccessType  a = PHReadOnly 
)

Definition at line 36 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 36 of file PHNodeIOManager.cc

References isFunctionalFlag, and setFile().

+ Here is the call graph for this function:

PHNodeIOManager::PHNodeIOManager ( const std::string &  f,
const std::string &  title,
const PHAccessType  a = PHReadOnly 
)

Definition at line 42 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 42 of file PHNodeIOManager.cc

References isFunctionalFlag, and setFile().

+ Here is the call graph for this function:

PHNodeIOManager::PHNodeIOManager ( const std::string &  f,
const PHAccessType  a,
const PHTreeType  treeindex 
)

Definition at line 48 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 48 of file PHNodeIOManager.cc

References isFunctionalFlag, PHEventTree, setFile(), and TreeName.

+ Here is the call graph for this function:

PHNodeIOManager::~PHNodeIOManager ( )
override

Definition at line 60 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 60 of file PHNodeIOManager.cc

References closeFile(), and file.

+ Here is the call graph for this function:

Member Function Documentation

void PHNodeIOManager::closeFile ( )
overridevirtual

Implements PHIOManager.

Definition at line 66 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 66 of file PHNodeIOManager.cc

References accessMode, file, PHUpdate, and PHWrite.

Referenced by setFile(), and ~PHNodeIOManager().

+ Here is the caller graph for this function:

int PHNodeIOManager::FillBranchMap ( )
private

Definition at line 562 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 562 of file PHNodeIOManager.cc

References fBranches, file, PHIOManager::filename, i, PHWHERE, and TreeName.

Referenced by GetBranchMap(), and NodeExist().

+ Here is the caller graph for this function:

std::string PHNodeIOManager::getBranchClassName ( TBranch *  branch)
private

Definition at line 238 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 238 of file PHNodeIOManager.cc

References assert, and PHWHERE.

Referenced by reconstructNodeTree().

+ Here is the caller graph for this function:

std::map< std::string, TBranch * > * PHNodeIOManager::GetBranchMap ( )

Definition at line 556 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 556 of file PHNodeIOManager.cc

References fBranches, and FillBranchMap().

Referenced by Fun4AllDstInputManager::ReadNextEventSyncObject().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint64_t PHNodeIOManager::GetBytesWritten ( )

Definition at line 542 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 542 of file PHNodeIOManager.cc

References file.

uint64_t PHNodeIOManager::GetFileSize ( )

Definition at line 549 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 549 of file PHNodeIOManager.cc

References file.

int PHNodeIOManager::isFunctional ( ) const
inline

Definition at line 42 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 42 of file PHNodeIOManager.h

References isFunctionalFlag.

Referenced by Fun4AllDstInputManager::fileopen().

+ Here is the caller graph for this function:

bool PHNodeIOManager::isSelected ( const std::string &  objectName)

Definition at line 514 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 514 of file PHNodeIOManager.cc

References fBranches, and merge_hashes::p.

bool PHNodeIOManager::NodeExist ( const std::string &  nodename)

Definition at line 587 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 587 of file PHNodeIOManager.cc

References phooldefs::branchpathdelim, fBranches, FillBranchMap(), and phooldefs::legacypathdelims.

Referenced by Fun4AllDstInputManager::fileopen().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHNodeIOManager::print ( ) const
overridevirtual

Implements PHIOManager.

Definition at line 212 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 212 of file PHNodeIOManager.cc

References accessMode, file, PHIOManager::filename, objectToRead, PHReadOnly, and tree.

Referenced by Fun4AllDstInputManager::fileopen(), Fun4AllRunNodeInputManager::fileopen(), and Fun4AllDstInputManager::Print().

+ Here is the caller graph for this function:

PHCompositeNode * PHNodeIOManager::read ( PHCompositeNode topNode = nullptr,
size_t  requestedEvent = 0 
)

Definition at line 192 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 192 of file PHNodeIOManager.cc

References readEventFromFile(), reconstructNodeTree(), and tree.

Referenced by Fun4AllDstInputManager::fileopen(), Fun4AllRunNodeInputManager::fileopen(), Fun4AllSingleDstPileupInputManager::fileopen(), Fun4AllDstPileupInputManager::fileopen(), Fun4AllDstInputManager::ReadNextEventSyncObject(), Fun4AllDstInputManager::run(), and Fun4AllDstInputManager::SyncIt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PHNodeIOManager::read ( size_t  requestedEvent)

Definition at line 179 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 179 of file PHNodeIOManager.cc

References readEventFromFile().

+ Here is the call graph for this function:

bool PHNodeIOManager::readEventFromFile ( size_t  requestedEvent)
private

Definition at line 273 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 273 of file PHNodeIOManager.cc

References PHIOManager::eventNumber, file, PHError, PHMessage(), PHWHERE, and tree.

Referenced by read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHNodeIOManager::readSpecific ( size_t  requestedEvent,
const std::string &  objectName 
)

Definition at line 321 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 321 of file PHNodeIOManager.cc

References fBranches, merge_hashes::p, PHError, and PHMessage().

Referenced by Fun4AllDstInputManager::ReadNextEventSyncObject().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHCompositeNode * PHNodeIOManager::reconstructNodeTree ( PHCompositeNode topNode)
private

Definition at line 345 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 345 of file PHNodeIOManager.cc

References PHNodeIterator::addNode(), assert, phooldefs::branchpathdelim, PHNodeIterator::cd(), PHDataNode< T >::data, fBranches, file, PHIOManager::filename, PHNodeIterator::findFirst(), getBranchClassName(), PHDataNode< T >::getData(), i, it, j, phooldefs::legacypathdelims, objectToRead, PHWHERE, PHNode::setObjectType(), tree, and TreeName.

Referenced by read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHNodeIOManager::selectObjectToRead ( const std::string &  objectName,
bool  readit 
)

Definition at line 496 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 496 of file PHNodeIOManager.cc

References it, objectToRead, and tree.

Referenced by Fun4AllDstInputManager::setBranches(), setFile(), and Fun4AllDstInputManager::setSyncBranches().

+ Here is the caller graph for this function:

bool PHNodeIOManager::SetCompressionSetting ( const int  level)

Definition at line 526 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 526 of file PHNodeIOManager.cc

References file, physmon_simulation::level, and m_CompressionSetting.

bool PHNodeIOManager::setFile ( const std::string &  f,
const std::string &  title,
const PHAccessType  a = PHReadOnly 
)

Definition at line 78 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 78 of file PHNodeIOManager.cc

References KFPMath::a, accessMode, closeFile(), f, file, PHIOManager::filename, m_CompressionSetting, PHReadOnly, PHUpdate, PHWrite, selectObjectToRead(), tree, and TreeName.

Referenced by PHNodeIOManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PHNodeIOManager::write ( PHCompositeNode topNode)
overridevirtual

Implements PHIOManager.

Definition at line 135 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 135 of file PHNodeIOManager.cc

References PHIOManager::eventNumber, file, tree, and PHCompositeNode::write().

Referenced by PHIODataNode< T >::write(), Fun4AllDstOutputManager::Write(), and Fun4AllDstOutputManager::WriteNode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PHNodeIOManager::write ( TObject **  data,
const std::string &  path,
int  buffersize,
int  splitlevel 
)

Definition at line 156 of file PHNodeIOManager.cc.

View newest version in sPHENIX GitHub at line 156 of file PHNodeIOManager.cc

References configureMap::data, file, and tree.

Member Data Documentation

int PHNodeIOManager::accessMode {PHReadOnly}
private

Definition at line 60 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 60 of file PHNodeIOManager.h

Referenced by closeFile(), print(), and setFile().

std::map<std::string, TBranch *> PHNodeIOManager::fBranches
private

Definition at line 63 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 63 of file PHNodeIOManager.h

Referenced by FillBranchMap(), GetBranchMap(), isSelected(), NodeExist(), readSpecific(), and reconstructNodeTree().

TFile* PHNodeIOManager::file {nullptr}
private
int PHNodeIOManager::isFunctionalFlag {0}
private

Definition at line 62 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 62 of file PHNodeIOManager.h

Referenced by isFunctional(), and PHNodeIOManager().

int PHNodeIOManager::m_CompressionSetting {505}
private

Definition at line 61 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 61 of file PHNodeIOManager.h

Referenced by SetCompressionSetting(), and setFile().

std::map<std::string, bool> PHNodeIOManager::objectToRead
private

Definition at line 64 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 64 of file PHNodeIOManager.h

Referenced by print(), reconstructNodeTree(), and selectObjectToRead().

TTree* PHNodeIOManager::tree {nullptr}
private

Definition at line 58 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 58 of file PHNodeIOManager.h

Referenced by print(), read(), readEventFromFile(), reconstructNodeTree(), selectObjectToRead(), setFile(), and write().

std::string PHNodeIOManager::TreeName {"T"}
private

Definition at line 59 of file PHNodeIOManager.h.

View newest version in sPHENIX GitHub at line 59 of file PHNodeIOManager.h

Referenced by FillBranchMap(), PHNodeIOManager(), reconstructNodeTree(), and setFile().


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