/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 00013 #ifndef ROOTOUTPUTSTREAM_H 00014 #define ROOTOUTPUTSTREAM_H 00015 00016 #include "RootIOStream.h" 00017 00018 #include "DybKernel/MsgStreamMember.h" 00019 00020 #include <string> 00021 00022 class TFile; 00023 class TTree; 00024 class TDirectory; 00025 00026 class RootOutputStream : public RootIOStream { 00027 00028 TFile* m_file; 00029 TTree* m_tree; 00030 TDirectory* m_dir; 00031 00032 std::string m_classname, m_treepath, m_branchname; 00033 00034 int m_entries; 00035 00036 Dyb::MsgStreamMember log; 00037 public: 00040 RootOutputStream(void* addr, const std::string& classname, 00041 const std::string& treepath = "", 00042 const std::string& branchname = ""); 00043 virtual ~RootOutputStream(); 00044 00046 void setIndexExpression(const std::string& major, const std::string& minor); 00047 00049 std::string path(); 00050 00052 bool write(); 00053 00055 bool close(); 00056 00058 bool newFile(const std::string& filename, 00059 const std::string& treepath = "", 00060 const std::string& branchname = ""); 00061 00063 int entries(); 00064 00066 int fileEntries(); 00067 00068 private: 00069 00070 bool handle_user_data(); 00071 std::string m_majorIndex, m_minorIndex; 00072 }; 00073 00074 #endif // ROOTOUTPUTSTREAM_H