Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LRootGlobalReader Class Reference

global reader for root files More...

Inheritance diagram for LRootGlobalReader:
QGlobalReader QNamed

Public Member Functions

 LRootGlobalReader ()
 
 ~LRootGlobalReader ()
 
QError Open (const std::string &filename, const std::string &opt="")
 Open file, called by QGlobalReaderDispatcher. More...
 
QError Close ()
 Close file, called by QGlobalReaderDispatcher. More...
 
const Diana::QObject * GetQObject (const std::string &name, const std::string &className, QError &err) const
 
- Public Member Functions inherited from QGlobalReader
 QGlobalReader (const std::string &name)
 constructor More...
 
virtual ~QGlobalReader ()
 destructor More...
 
template<class Q >
const Q * Get (const std::string &name, QError &err) const
 Get QObject, owned by this reader. More...
 
template<class Q >
const Q * Get (const Diana::QGlobalLabel &label, QError &err) const
 Get QObject, owned by this reader. More...
 
- Public Member Functions inherited from QNamed
 QNamed ()
 
 QNamed (const std::string &Name)
 
virtual ~QNamed ()
 
const std::string & GetName () const
 
void SetName (const std::string &name)
 

Private Member Functions

bool ReadingIsSafe () const
 
std::string GetFullPath (const std::string &name) const
 

Private Attributes

std::string fFileName
 
TFile * fFile
 
std::map< std::string, Diana::QObject * > * fQObjectCache
 

Additional Inherited Members

- Protected Member Functions inherited from QGlobalReader
virtual const Diana::QObject * GetQObject (const Diana::QGlobalLabel &label, const std::string &className, QError &err) const
 

Detailed Description

global reader for root files

Author
Marco Vignati

Definition at line 19 of file LRootGlobalReader.hh.

Constructor & Destructor Documentation

◆ LRootGlobalReader()

LRootGlobalReader::LRootGlobalReader ( )

Definition at line 15 of file LRootGlobalReader.cc.

◆ ~LRootGlobalReader()

LRootGlobalReader::~LRootGlobalReader ( )

Definition at line 21 of file LRootGlobalReader.cc.

References fQObjectCache.

Member Function Documentation

◆ Close()

QError LRootGlobalReader::Close ( )
virtual

Close file, called by QGlobalReaderDispatcher.

Implements QGlobalReader.

Definition at line 46 of file LRootGlobalReader.cc.

References err, fFile, fQObjectCache, and QERR_SUCCESS.

◆ GetFullPath()

std::string LRootGlobalReader::GetFullPath ( const std::string &  name) const
private

Definition at line 68 of file LRootGlobalReader.cc.

References ROOT_GLOBAL_DIR.

Referenced by GetQObject().

◆ GetQObject()

const QObject * LRootGlobalReader::GetQObject ( const std::string &  name,
const std::string &  className,
QError err 
) const
virtual

◆ Open()

QError LRootGlobalReader::Open ( const std::string &  filename,
const std::string &  opt = "" 
)
virtual

Open file, called by QGlobalReaderDispatcher.

Implements QGlobalReader.

Definition at line 26 of file LRootGlobalReader.cc.

References err, fFile, QERR_CANNOT_OPEN_FILE, and QERR_SUCCESS.

◆ ReadingIsSafe()

bool LRootGlobalReader::ReadingIsSafe ( ) const
private

Definition at line 62 of file LRootGlobalReader.cc.

References fFile.

Referenced by GetQObject().

Member Data Documentation

◆ fFile

TFile* LRootGlobalReader::fFile
mutableprivate

Definition at line 39 of file LRootGlobalReader.hh.

Referenced by Close(), GetQObject(), Open(), and ReadingIsSafe().

◆ fFileName

std::string LRootGlobalReader::fFileName
private

Definition at line 38 of file LRootGlobalReader.hh.

◆ fQObjectCache

std::map<std::string, Diana::QObject*>* LRootGlobalReader::fQObjectCache
private

Definition at line 40 of file LRootGlobalReader.hh.

Referenced by Close(), GetQObject(), and ~LRootGlobalReader().


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