BOSS 7.0.6
BESIII Offline Software System
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

◆ main()

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

Definition at line 4 of file test_write.cxx.

5{
6 if ( argc != 3 ) {
7 std::cout << "Usage: " << argv[0] << " datafile nevt" << std::endl;
8 exit(1);
9 }
10
11 uint32_t dummy[10000] = { 0 };
12
13 uint32_t nevt = atoi(argv[2]);
14
15 uint32_t seed = nevt;
16
17 RawFileWriter fwriter(argv[1]);
18
19 while ( dummy[8]++ < nevt ) { //dummy[8]: EventID ( dummy[5] = 0 )
20 dummy[1] = 3000 + rand_r(&seed)%500;
21 fwriter.writeEvent(dummy);
22 }
23
24 return 0;
25}