32{
34
35 if ( argc != 2 ) {
36 std::cerr << "usage: " << argv[0] << " <file>" << std::endl;
37 std::exit(1);
38 }
39
40
41 std::fstream in(argv[1], std::ios::in|std::ios::binary);
42 if (!in) {
43 std::cerr << "File `" << argv[1] << "' does not exist?!" << std::endl;
44 std::exit(1);
45 }
47
48 while (true) {
49
51
52 try {
54
55 fe.check_tree();
56
57
58 std::cout << "Event " << fe.lvl1_id() << " is Ok." << std::endl;
59 }
61 std::cerr << std::endl
62 <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
63 std::cout << "Trying to continue..." << std::endl;
64 continue;
65 }
67 std::cerr << std::endl
68 <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
69 delete[] event;
70 std::exit(1);
71 }
72 catch (std::exception& ex) {
73 std::cerr << std::endl
74 << "Uncaught std exception: " << ex.what() << std::endl;
75 delete[] event;
76 std::exit(1);
77 }
78 catch (...) {
79 std::cerr << std::endl << "Uncaught unknown exception" << std::endl;
80 delete[] event;
81 std::exit(1);
82 }
83
84 }
85
86 delete[] event;
87 return 0;
88}
const size_t MAX_EVENT_SIZE
const char * what() const
Human description message.