23 {
25
26
27 uint32_t dummy_data[256];
28 for ( size_t i = 0; i < 256; ++i ) dummy_data[i] = i;
29
33 const uint32_t run_no = 1001;
34 const uint32_t lvl1_id = 2222;
35 const uint32_t bc_id = 3333;
36 const uint32_t lvl1_type = 2;
37 const uint32_t event_type = 1;
38 const uint32_t global_id = 5555;
39 const uint32_t lvl2_info = 3;
40 const uint32_t ef_info[4] = { 0, 1, 2, 3 };
41
42 write::ROBFragment rob1( src1.code(), run_no, lvl1_id, bc_id, lvl1_type, event_type, 256,
44 write::ROBFragment rob2( src2.code(), run_no, lvl1_id, bc_id, lvl1_type, event_type, 256,
46 write::ROBFragment rob3( src3.code(), run_no, lvl1_id, bc_id, lvl1_type, event_type, 256,
48
50 ros.append( &rob1 );
51 ros.append( &rob2 );
52 ros.append( &rob3 );
53
55 sd.append( &ros );
56
58 lvl2_info, ef_info );
59 fe.append( &sd );
60
61
63 struct iovec iov[128];
66
67 try
68 {
70 ferd.check_tree();
71
72 std::cout << "Generated event seems Ok." << std::endl;
74 {
75 std::cerr << std::endl <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
77 {
78 std::cerr << std::endl <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
79 } catch ( std::exception& ex )
80 {
81 std::cerr << std::endl << "Uncaught std exception: " << ex.what() << std::endl;
82 } catch ( ... )
83 { std::cerr << std::endl << "Uncaught unknown exception" << std::endl; }
84
85 return 0;
86}
const char * what() const
Human description message.