00001 #include "RootFile/RootFileWriter.h" 00002 #include <fstream> 00003 #include <stdlib.h> 00004 00005 int main(int argc, char* argv[]) 00006 { 00007 if ( argc != 2 ) { 00008 std::cout << "Usage: " << argv[0] << " input.file" << std::endl; 00009 exit(0); 00010 } 00011 00012 char buf[512*1024]; 00013 std::ifstream ifs(argv[1], std::ios::binary); 00014 ifs.read(buf, 512*1024); 00015 00016 RootFileWriter writer("test_out.root"); 00017 writer.writeEvent((void*)buf, ifs.gcount()); 00018 00019 writer.close(); 00020 00021 return 0; 00022 }