QFileWriter.hh

Go to the documentation of this file.
00001 
00052 #ifndef _Q_FILEWRITER_HH_
00053 #define _Q_FILEWRITER_HH_
00054 
00055 #include "QWriter.hh"
00056 #include <string>
00057 #include <list>
00058 
00059 namespace Cuore {class QRunData;}
00060 
00061 class QFileWriter : public QWriter
00062 {
00063     public:
00065                 QFileWriter(const std::string& name, const std::string& extension, QSequence* s);
00066 
00068                 virtual ~QFileWriter();
00069 
00071         static const std::list<std::string>& GetFileList() { return fFullPathFilesList; }
00072         
00074         void Init();
00075 
00077         QEvent*  Do(QEvent* ev);
00078         
00080         void Done();
00081         
00083         virtual void Open(const std::string& filename)  = 0;
00084         
00086         virtual void Dump(const QEvent& ev) = 0;
00087         
00089         virtual void Close() = 0;
00090 
00091     protected:
00093         bool SaveAuxData() const { return fSaveAuxData; } 
00094 
00096         int fEventNumber;
00097         
00099         std::string fFileExtension;
00100 
00101     private:
00102         bool IsToOpen(const QRunData& runData);
00103 
00104         static std::list<std::string> fFullPathFilesList;
00105         std::list<std::string> fFilesList;
00106         std::list<std::string> fOldFilesList;
00107 
00109         std::string fFileNamePrefix;
00110         std::string fFileId;
00112         std::string fFileName; 
00113         std::string fOutputDir;
00115         std::string fFileFullPath;
00116 
00117         std::string fFilesListName;
00118 
00119         bool fSaveAuxData;
00120         bool fSetListForReader;
00121         std::string fOldFilesListName;
00122         std::string fCurrFilesListName;
00123         bool fWriteFilesList;
00124         bool fSaveTempFiles;
00125         int fPartialSize;
00126         bool fSyncWithReader;
00127         int fPartial;
00128         int fCurrentRun;
00129         bool fNewPartialOnRerun;
00130 };
00131 
00132 #endif

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1