00001
00014 #ifndef ROOTINPUTSTREAM_H
00015 #define ROOTINPUTSTREAM_H
00016
00017 #include "RootIOStream.h"
00018 #include "RootInputFile.h"
00019
00020 #include "DybKernel/MsgStreamMember.h"
00021
00022 #include <string>
00023 #include <vector>
00024
00025 class RootInputStream : public RootIOStream {
00026
00027 RootInputFileList m_files;
00028 int m_entry;
00029 int m_clid;
00030 int m_entries;
00031
00032 std::string m_treepath, m_branchname;
00033
00034 Dyb::MsgStreamMember log;
00035 public:
00036
00038 RootInputStream(void* addr,
00039 const std::string& treepath,
00040 const std::string& branchname);
00041 virtual ~RootInputStream();
00042
00044
00045 std::string path();
00046 std::string filename();
00047 int fileNumber();
00048 int clID();
00049
00050 int getEntry() { return m_entry; }
00051 RootInputFileList getFiles() { return m_files; }
00052
00053
00055 bool append(const std::string& filename);
00056
00059 bool append(const std::string& filename,
00060 const std::string& treepath,
00061 const std::string& branchname);
00062
00064 bool read();
00065
00068 bool setEntry(int entry, bool read=true);
00069
00073 bool setFileEntry(int file, int entry, bool read=true);
00074
00077 bool next(int steps=1, bool read=true);
00078
00081 bool prev(int nsteps=1, bool read=true);
00082
00084 bool first(bool read=true);
00085
00087 bool last(bool read=true);
00088
00090 int entries();
00091
00092 };
00093
00094 #endif // ROOTINPUTSTREAM_H