Diana Software
LRootGlobalWriter.hh
Go to the documentation of this file.
1 #ifndef _L_ROOT_GLOBAL_WRITER_HH_
2 #define _L_ROOT_GLOBAL_WRITER_HH_
3 
13 #include "QGlobalWriter.hh"
14 #include <map>
15 #include "QError.hh"
16 
17 class TFile;
18 namespace Diana { class QObject; };
19 
21 {
22  public:
25 
26  QError SetQObject(const std::string& name, const std::string& className, const Diana::QObject* obj, const std::string& descr);
27 
28 
29  protected:
30 
31  private:
32  QError FlushCache(TFile* oFile);
33 
34  QError Open(const std::string& filename, const std::string& opt = "");
35  QError Close();
36  TFile* fFile;
37  std::string fFileName;
39  std::map<std::string, Diana::QObject*> fObjectCache;
40 
41 };
42 
43 #endif
global writer for root files
QError Open(const std::string &filename, const std::string &opt="")
Open file, called by QGlobalWriterDispatcher.
std::map< std::string, Diana::QObject * > fObjectCache
QError FlushCache(TFile *oFile)
QError SetQObject(const std::string &name, const std::string &className, const Diana::QObject *obj, const std::string &descr)
QError Close()
Close file, called by QGlobalWriterDispatcher.
error class with error type and description
Definition: QError.hh:115
Abstract class for global writers.
base class for objects handled by QEvent and QGlobalDataManager.
Definition: QObject.hh:76
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...