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);
75 using namespace KM3NETDAQ;
83 if (!writer.is_open()) {
93 Long64_t event_count = 0;
99 ifstream
in(
i->c_str());
103 STATUS(
"event: " << setw(10) << event_count <<
'\r');
DEBUG(endl);
105 if (!(
is >> preamble)) {
109 DEBUG(
"length " << preamble.getLength() << endl);
110 DEBUG(
"type " << preamble.getDataType() << endl);
114 ERROR(
"File " << *
i <<
" invalid length " << preamble.getLength() << endl);
121 if (i != writer.end()) {
123 buffer.resize(preamble.getLength());
132 i->second->copy(bin);
138 ERROR(
"Illegal data type, skip" << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Auxiliary class to copy input data to corresponding TTree.
Auxiliary class for a type holder.
TTree reading for template data type.
static JKey_t getKey(JType< T > type)
Get key.
Binary input based on std::istream.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
map_type::iterator iterator
Simple data structure for the DAQ preamble required for a correct calculation of the object size for ...
virtual void open(const char *file_name) override
Open file.
General purpose messaging.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Utility class to parse command line options.
then set_variable DETECTOR set_variable OUTPUT_FILE set_variable DAQ_FILE set_variable PMT_FILE else fatal Wrong number of arguments fi JPrintTree f $DAQ_FILE type
size_t getSizeof< JDAQPreamble >()
Get size of type.
#define DEBUG(A)
Message macros.