BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
DistBoss/RootFile/RootFile-00-00-05/test/test.cxx File Reference
#include "RootFile/RootFileWriter.h"
#include <fstream>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 5 of file DistBoss/RootFile/RootFile-00-00-05/test/test.cxx.

6{
7 if ( argc != 2 ) {
8 std::cout << "Usage: " << argv[0] << " input.file" << std::endl;
9 exit(0);
10 }
11
12 char buf[512*1024];
13 std::ifstream ifs(argv[1], std::ios::binary);
14 ifs.read(buf, 512*1024);
15
16 RootFileWriter writer("test_out.root");
17 writer.writeEvent((void*)buf, ifs.gcount());
18
19 writer.close();
20
21 return 0;
22}