/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/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

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 }


Generated on Tue Nov 29 23:14:56 2016 for BOSS_7.0.2 by  doxygen 1.4.7