20#include "eformat/old/eformat.h"
21#include "eformat/write/eformat.h"
22#include "eformat/eformat.h"
32int main (
int argc,
char** argv)
37 std::cerr <<
"usage: " << argv[0] <<
" <v2.4 file> <v3.0 file>"
43 std::fstream in(argv[1], std::ios::in|std::ios::binary);
45 std::cerr <<
"File `" << argv[1] <<
"' does not exist?!" << std::endl;
49 std::fstream out(argv[2], std::ios::out|std::ios::binary);
51 std::cerr <<
"Cannot write to `" << argv[1] <<
"?!" << std::endl;
69 std::cerr <<
" !! WARNING: found event with format version = "
71 if (ex.
current() != MAJOR_DEFAULT_VERSION) {
72 std::cerr <<
" -> I cannot cope with this format. Skipping..."
77 std::cout <<
" -> Event will be simply copied..." << std::endl;
81 std::cerr <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
82 std::cerr <<
" -> Trying to continue..."
87 std::cerr << std::endl <<
"Uncaught unknown exception" << std::endl;
96 <<
"] -> [" <<
HEX(0x03000000) <<
"]" << std::endl;
103 std::cerr <<
"Uncaught eformat issue: " << ex.
what() << std::endl;
104 std::cerr <<
" -> Trying to continue..."
109 std::cerr <<
"Uncaught ERS issue: " << ex.
what() << std::endl;
114 catch (std::exception& ex) {
115 std::cerr <<
"Uncaught std exception: " << ex.
what() << std::endl;
121 std::cerr << std::endl <<
"Uncaught unknown exception" << std::endl;
126 out.write(
reinterpret_cast<char*
>(nevent),
sizeof(uint32_t)*nevent[1]);
128 std::cout <<
" -> (new) event #" << l1id
129 <<
" converted, checked and saved."
const char * what() const
Human description message.
const size_t MAX_EVENT_SIZE