#include #include #include "JDAQ/JDAQEventIO.hh" #include "JSupport/JFileRecorder.hh" #include "JSupport/JSupport.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to test ordered I/O of KM3NETDAQ::JDAQEvent. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; using namespace KM3NETDAQ; JFileRecorder outputFile; Long64_t numberOfEvents; int debug; try { JParser<> zap("Auxiliary program to test ordered I/O of events."); zap['o'] = make_field(outputFile) = "timeslice.root"; zap['n'] = make_field(numberOfEvents) = 10; zap['d'] = make_field(debug) = 3; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } cout.tie(&cerr); outputFile.open(); if (!outputFile.is_open()) { FATAL("Error opening file " << outputFile << endl); } for (int frame_index = 1; frame_index <= numberOfEvents; ++frame_index) { outputFile.put(JDAQEvent(JDAQChronometer(0, 0, frame_index, JDAQUTCExtended()), JDAQTriggerMask())); } outputFile.close(); return 0; }