24{
26
27
28 uint32_t dummy_data[256];
29 for (size_t i=0; i<256; ++i) dummy_data[i] = i;
30
34 const uint32_t run_no = 1001;
35 const uint32_t lvl1_id = 2222;
36 const uint32_t bc_id = 3333;
37 const uint32_t lvl1_type = 2;
38 const uint32_t event_type = 1;
39 const uint32_t global_id = 5555;
40 const uint32_t lvl2_info = 3;
41 const uint32_t ef_info[4] = { 0, 1, 2, 3 };
42
44 lvl1_type, event_type, 256, dummy_data,
47 lvl1_type, event_type, 256, dummy_data,
50 lvl1_type, event_type, 256, dummy_data,
52
54 ros.append(&rob1);
55 ros.append(&rob2);
56 ros.append(&rob3);
57
59 sd.append(&ros);
60
62 lvl1_id, lvl1_type, lvl2_info, ef_info);
63 fe.append(&sd);
64
65
67 struct iovec iov[128];
68 uint32_t total_pages = write::shallow_copy(*fe_list, iov, 128);
70
71 try {
72 FullEventFragment <PagedMemory<>::const_iterator> ferd(mem.begin());
73 ferd.check_tree();
74
75 std::cout << "Generated event seems Ok." << std::endl;
76 }
78 std::cerr << std::endl
79 <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
80 }
82 std::cerr << std::endl
83 <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
84 }
85 catch (std::exception& ex) {
86 std::cerr << std::endl
87 << "Uncaught std exception: " << ex.what() << std::endl;
88 }
89 catch (...) {
90 std::cerr << std::endl << "Uncaught unknown exception" << std::endl;
91 }
92
93 return 0;
94}
const char * what() const
Human description message.