#include "RootFile/RootFileWriter.h"
#include <fstream>
#include <stdlib.h>
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 5 of file test.cxx.
References RootFileWriter::close(), and RootFileWriter::writeEvent().
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 }