QFileReader.hh

Go to the documentation of this file.
00001 
00008 #ifndef _Q_FILEREADER_HH_
00009 #define _Q_FILEREADER_HH_
00010 
00011 #include "QReader.hh"
00012 #include "QError.hh"
00013 #include "QDbDetector.hh"
00014 #include <string>
00015 #include <vector>
00016 #include <list>
00017 
00018 
00019 class QFileReader : public QReader 
00020 {
00021     public:
00023                 QFileReader(const std::string& name, QSequence* s);
00024 
00026                 virtual ~QFileReader();
00027 
00032         virtual const QError& JumpToEvent(unsigned int event); 
00033         
00034         void Init();
00035         Cuore::QEvent*  Do(Cuore::QEvent* ev);
00036         void Done();
00037 
00039         unsigned int GetReadNumber() const {return fFileEventNumber > 0 ? (fFileEventNumber-1) : 0;}
00040 
00041     protected:
00043         virtual void Open(const std::string& fileName) = 0;
00045         virtual Cuore::QEvent* Fill(Cuore::QEvent* ev) = 0;
00046         virtual void Close() = 0;
00047 
00049         int fFileNumber;
00051         std::list<std::string> fFileList;
00052 
00054         unsigned int fFileEventNumber;
00055 
00057         bool fReadFileList;
00059         std::string fFileListPath;
00060 
00061     private:
00062         std::list<std::string>::const_iterator fFileListIter;
00063 
00064         friend class QSequence;
00065 
00066 };
00067 
00068 
00069 #endif

Generated on Tue Nov 16 10:49:56 2010 for CUORE Software by  doxygen 1.5.6