39 return KM3NETDAQ::getDataType<T>();
49 int main(
int argc,
char **argv)
55 Long64_t numberOfEvents;
60 JParser<> zap(
"Auxiliary program to convert binary data to ROOT formatted data.");
64 zap[
'n'] =
make_field(numberOfEvents) = numeric_limits<Long64_t>::max();
69 catch(
const exception &error) {
70 FATAL(error.what() << endl);
94 Long64_t event_count = 0;
98 STATUS(
"File: " << *i << endl);
100 ifstream in(i->c_str());
102 for (
JStreamReader is(in); event_count < numberOfEvents; ++event_count) {
104 STATUS(
"event: " << setw(10) << event_count <<
'\r');
DEBUG(endl);
106 if (!(is >> preamble)) {
110 DEBUG(
"length " << preamble.getLength() << endl);
111 DEBUG(
"type " << preamble.getDataType() << endl);
115 ERROR(
"File " << *i <<
" invalid length " << preamble.getLength() << endl);
122 if (i != writer.end()) {
124 buffer.resize(preamble.getLength());
133 i->second->copy(bin);
139 ERROR(
"Illegal data type, skip" << endl);