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

global writer for root files More...

Inheritance diagram for LRootGlobalWriter:
QGlobalWriter QNamed

Public Member Functions

 LRootGlobalWriter ()
 
 ~LRootGlobalWriter ()
 
QError SetQObject (const std::string &name, const std::string &className, const Diana::QObject *obj, const std::string &descr)
 
- Public Member Functions inherited from QGlobalWriter
 QGlobalWriter (const std::string &name)
 constructor More...
 
virtual ~QGlobalWriter ()
 destructor More...
 
template<class Q >
QError Set (const std::string &name, const Q &obj, const std::string &descr="")
 Set QObject, owned by the caller, - leave it undeclared if you can't implement it. 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

QError FlushCache (TFile *oFile)
 
QError Open (const std::string &filename, const std::string &opt="")
 Open file, called by QGlobalWriterDispatcher. More...
 
QError Close ()
 Close file, called by QGlobalWriterDispatcher. More...
 

Private Attributes

TFile * fFile
 
std::string fFileName
 
bool fIsMRootFileWriter
 
std::map< std::string, Diana::QObject * > fObjectCache
 

Additional Inherited Members

Detailed Description

global writer for root files

Author
Marco Vignati

Definition at line 20 of file LRootGlobalWriter.hh.

Constructor & Destructor Documentation

◆ LRootGlobalWriter()

LRootGlobalWriter::LRootGlobalWriter ( )

Definition at line 16 of file LRootGlobalWriter.cc.

◆ ~LRootGlobalWriter()

LRootGlobalWriter::~LRootGlobalWriter ( )

Definition at line 22 of file LRootGlobalWriter.cc.

References Close(), and fObjectCache.

Member Function Documentation

◆ Close()

QError LRootGlobalWriter::Close ( )
privatevirtual

Close file, called by QGlobalWriterDispatcher.

Implements QGlobalWriter.

Definition at line 169 of file LRootGlobalWriter.cc.

References err, fFile, fIsMRootFileWriter, and QERR_SUCCESS.

Referenced by ~LRootGlobalWriter().

◆ FlushCache()

QError LRootGlobalWriter::FlushCache ( TFile *  oFile)
private

◆ Open()

QError LRootGlobalWriter::Open ( const std::string &  filename,
const std::string &  opt = "" 
)
privatevirtual

◆ SetQObject()

QError LRootGlobalWriter::SetQObject ( const std::string &  name,
const std::string &  className,
const Diana::QObject *  obj,
const std::string &  descr 
)
virtual

Member Data Documentation

◆ fFile

TFile* LRootGlobalWriter::fFile
private

Definition at line 36 of file LRootGlobalWriter.hh.

Referenced by Close(), FlushCache(), Open(), and SetQObject().

◆ fFileName

std::string LRootGlobalWriter::fFileName
private

Definition at line 37 of file LRootGlobalWriter.hh.

Referenced by FlushCache(), and Open().

◆ fIsMRootFileWriter

bool LRootGlobalWriter::fIsMRootFileWriter
private

Definition at line 38 of file LRootGlobalWriter.hh.

Referenced by Close(), Open(), and SetQObject().

◆ fObjectCache

std::map<std::string, Diana::QObject*> LRootGlobalWriter::fObjectCache
private

Definition at line 39 of file LRootGlobalWriter.hh.

Referenced by FlushCache(), SetQObject(), and ~LRootGlobalWriter().


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