Diana Software
LRootGlobalReader.hh
Go to the documentation of this file.
1 #ifndef _L_ROOT_GLOBAL_READER_HH_
2 #define _L_ROOT_GLOBAL_READER_HH_
3 
12 #include "QGlobalReader.hh"
13 #include "TFile.h"
14 #include <map>
15 
16 class TObject;
17 namespace Diana {class QObject;};
18 
20 {
21  public:
23 
25 
26  QError Open(const std::string& filename, const std::string& opt = "");
27 
28  QError Close();
29 
30 
31  const Diana::QObject* GetQObject(const std::string& name,const std::string& className, QError& err) const;
32 
33  protected:
34  private:
35 
36  bool ReadingIsSafe() const;
37  std::string GetFullPath(const std::string& name) const;
38  std::string fFileName;
39  mutable TFile* fFile;
40  std::map<std::string, Diana::QObject*>* fQObjectCache;
41 
42 };
43 
44 #endif
err
Definition: CheckOF.C:114
global reader for root files
std::string GetFullPath(const std::string &name) const
QError Close()
Close file, called by QGlobalReaderDispatcher.
const Diana::QObject * GetQObject(const std::string &name, const std::string &className, QError &err) const
QError Open(const std::string &filename, const std::string &opt="")
Open file, called by QGlobalReaderDispatcher.
bool ReadingIsSafe() const
std::map< std::string, Diana::QObject * > * fQObjectCache
error class with error type and description
Definition: QError.hh:115
Abstract class for global readers.
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...