/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RawFile/RawFile-00-00-10/test/test_write.cxx File Reference

#include "RawFile/RawFileWriter.h"
#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 4 of file test_write.cxx.

References RawFileWriter::writeEvent().

00005 {
00006    if ( argc != 3 ) {
00007       std::cout << "Usage: " << argv[0] << " datafile nevt" << std::endl;
00008       exit(1);
00009    }
00010 
00011    uint32_t dummy[10000] = { 0 };
00012 
00013    uint32_t nevt = atoi(argv[2]);
00014 
00015    uint32_t seed = nevt;
00016 
00017    RawFileWriter fwriter(argv[1]);
00018 
00019    while ( dummy[8]++ < nevt ) {  //dummy[8]: EventID ( dummy[5] = 0 )
00020       dummy[1] = 3000 + rand_r(&seed)%500;
00021       fwriter.writeEvent(dummy);
00022    }
00023 
00024    return 0;
00025 }


Generated on Tue Nov 29 23:15:11 2016 for BOSS_7.0.2 by  doxygen 1.4.7