Diana Software
QGlobalWriterDispatcher.hh
Go to the documentation of this file.
1 #ifndef _Q_GLOBAL_WRITER_DISPATCHER_HH_
2 #define _Q_GLOBAL_WRITER_DISPATCHER_HH_
15 #include <map>
16 #include <string>
17 #include "QNamed.hh"
18 #include "QDiana.hh"
19 
20 class QGlobalWriter;
21 class QError;
22 
23 namespace Diana {class QSequence; };
24 
25 
27 {
28  public:
30 
32 
37  QGlobalWriter* GetWriter(const std::string& filename, QError& err);
38 
39  void SetCurrentWriterFilename(const std::string& filename) { fCurrentWriterFilename = filename; };
40  void Clear();
41  private:
43  std::map<std::string, QGlobalWriter*> fWriters;
46  friend class Diana::QSequence;
47 };
48 
49 #endif
err
Definition: CheckOF.C:114
error class with error type and description
Definition: QError.hh:115
Class that returns a pointer to the writer matching the given input filename.
QGlobalWriter * GetWriter(const std::string &filename, QError &err)
get writer
std::map< std::string, QGlobalWriter * > fWriters
static QGlobalWriterDispatcher & GetInstance()
void SetCurrentWriterFilename(const std::string &filename)
Abstract class for global writers.
base class for anything that has a name
Definition: QNamed.hh:14
Diana Reconstruction program.
Definition: QSequence.hh:40
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...