00001 /* 00002 * Root Raw Tree definition, a thin wrapper for raw binary data file 00003 * 00004 * Zhe Wang 00005 * 24 Jan., 2010 00006 * 00007 */ 00008 00009 #ifndef _ROOT_RAW_TREE_ 00010 #define _ROOT_RAW_TREE_ 00011 00012 #include "TFile.h" 00013 #include "TTree.h" 00014 00015 typedef Int_t Int32; 00016 00017 class RRawTree 00018 { 00019 public: 00020 RRawTree(); 00021 ~RRawTree(); 00022 00024 00026 int open(const char* filename); 00028 int fill(Int32* buffer, Int32 size); 00030 int close(); 00031 00032 private: 00033 TFile* m_file; 00034 TTree* m_tree; 00035 00036 Int32 m_buffer[50000]; 00037 Int32 m_size; 00038 }; 00039 00040 #endif // _ROOT_RAW_TREE_ 00041 00042