BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
test_write.cxx
Go to the documentation of this file.
1
#include "RawFile/RawFileWriter.h"
2
#include <stdlib.h>
3
4
int
main
(
int
argc,
char
* argv[] ) {
5
if
( argc != 3 )
6
{
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
)
20
{
// dummy[8]: EventID ( dummy[5] = 0 )
21
dummy[1] = 3000 + rand_r( &seed ) % 500;
22
fwriter.
writeEvent
( dummy );
23
}
24
25
return
0;
26
}
nevt
Int_t nevt[10]
Definition
DataBase/tau_mode.c:48
RawFileWriter
Definition
Event/RawFile/include/RawFile/RawFileWriter.h:6
RawFileWriter::writeEvent
int writeEvent(const uint32_t *pevt)
Definition
RawFileWriter.cxx:9
main
int main()
Definition
phokhara.cc:42
8.0.0
BOSS_Source
Event
RawFile
test
test_write.cxx
Generated by
1.16.1