Berkeley Nuclear Data Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PostProcBase< T > Class Template Referenceabstract

#include <PostProcBase.h>

Collaboration diagram for PostProcBase< T >:
Collaboration graph
[legend]

Public Member Functions

 PostProcBase ()
 defualt constructor puts class into a working state More...
 
virtual int addFile (string a_filename)
 
virtual int addFilesFromDirectory (string a_dir, string a_ext)
 
virtual int loadEvent (int a_eventNumber)
 loads a specified event into memory More...
 
virtual int fileNotLoaded ()
 tests if a file is loaded and prinst a message if not More...
 
virtual int clearFileState ()
 
virtual std::ostream & printState (std::ostream &a_stream=std::cout)
 
virtual ~PostProcBase ()
 
TChain * getTrees ()
 danger danger, use this if you know what you are doing. More...
 

Protected Member Functions

virtual void setTreeName ()=0
 enforces that a tree name function can be set in a child class More...
 
virtual void setBranchName ()=0
 enforces that a branch name function can be set in a child class More...
 

Protected Attributes

TChain * m_trees
 for associating the trees from files More...
 
string m_treeName
 for storing the name of the tree More...
 
string m_branchName
 for storing the name of the branch More...
 
T * m_currentEvent
 for storing the current event More...
 
vector< string > m_loadedFiles
 for storing a list of loaded files More...
 
bool m_hasFile
 flag for wheter a file has been loaded More...
 

Detailed Description

template<class T>
class PostProcBase< T >

this class is intended as a base class for handling file io for files storing c++ classes in root TTrees

Constructor & Destructor Documentation

◆ PostProcBase()

template<class T >
PostProcBase< T >::PostProcBase

defualt constructor puts class into a working state

◆ ~PostProcBase()

template<class T >
PostProcBase< T >::~PostProcBase
virtual

Member Function Documentation

◆ addFile()

template<class T >
int PostProcBase< T >::addFile ( string  a_filename)
virtual

loads a file and associates the tree branch with internal memory for the event if a file has been loaded this checks to see if the call is a duplicitrous effort and if not adds the file to the TChain returns 0 when successful

Reimplemented in CompassPostProcBase, NSDAna::OrgScintGainDriftAna, CLYCTOFAna, and NSDAna::CloverGainDriftAna.

Here is the caller graph for this function:

◆ addFilesFromDirectory()

template<class T >
int PostProcBase< T >::addFilesFromDirectory ( string  a_dir,
string  a_ext 
)
virtual

this calls addFile on all files in a given directory with a match to the given extension

Here is the call graph for this function:

◆ clearFileState()

template<class T >
int PostProcBase< T >::clearFileState
virtual

resets the internal state of the class to be as if it was intially constructed with no files added to the file

Here is the caller graph for this function:

◆ fileNotLoaded()

template<class T >
int PostProcBase< T >::fileNotLoaded
virtual

tests if a file is loaded and prinst a message if not

◆ getTrees()

template<class T >
TChain * PostProcBase< T >::getTrees

danger danger, use this if you know what you are doing.

◆ loadEvent()

template<class T >
int PostProcBase< T >::loadEvent ( int  a_eventNumber)
virtual

loads a specified event into memory

◆ printState()

template<class T >
std::ostream & PostProcBase< T >::printState ( std::ostream &  a_stream = std::cout)
virtual

◆ setBranchName()

template<class T >
virtual void PostProcBase< T >::setBranchName ( )
protectedpure virtual

enforces that a branch name function can be set in a child class

Implemented in GenesisPhysEventAna, and CompassPostProcBase.

◆ setTreeName()

template<class T >
virtual void PostProcBase< T >::setTreeName ( )
protectedpure virtual

enforces that a tree name function can be set in a child class

Implemented in GenesisPhysEventAna, and CompassPostProcBase.

Member Data Documentation

◆ m_branchName

template<class T >
string PostProcBase< T >::m_branchName
protected

for storing the name of the branch

◆ m_currentEvent

template<class T >
T* PostProcBase< T >::m_currentEvent
protected

for storing the current event

◆ m_hasFile

template<class T >
bool PostProcBase< T >::m_hasFile
protected

flag for wheter a file has been loaded

◆ m_loadedFiles

template<class T >
vector<string> PostProcBase< T >::m_loadedFiles
protected

for storing a list of loaded files

◆ m_treeName

template<class T >
string PostProcBase< T >::m_treeName
protected

for storing the name of the tree

◆ m_trees

template<class T >
TChain* PostProcBase< T >::m_trees
protected

for associating the trees from files


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