278 std::string inputFile;
280 JSplit numberOfFiles;
287 JParser<> zap(
"Auxiliary program to split DAQ data into multiple output files.");
295 "Precede name of data structure by a '+' or '-' "
296 "to add or remove data types in the output, respectively."
302 catch(
const exception& error) {
303 FATAL(error.what() << endl);
307 if ((numberOfFiles.total == 0 && ranges.empty()) ||
308 (numberOfFiles.total != 0 && !ranges.empty())) {
309 FATAL(
"Invalid splitting " << numberOfFiles <<
' ' << ranges.size() <<
"; use either option -N or -r." << endl);
314 if (pos == string::npos) {
319 getUTCTimeRange<JDAQEvent> (inputFile));
322 FATAL(
"No (valid) summary or event data in input file " << inputFile <<
' ' << total << endl);
325 NOTICE(
"Total UTC time range " << total << endl);
327 if (!ranges.empty()) {
329 sort(ranges.begin(), ranges.end(), compare);
343 JCopyMaster<JDAQTypes_t> master(inputFile, selection);
345 const int width = (int) (log10(ranges.size() + 1) + 1);
347 for (
size_t i = 0; i != ranges.size(); ++i) {
349 if (numberOfFiles.index == numberOfFiles.invalid || numberOfFiles.index == i) {
353 STATUS(
"Writing " << file_name <<
' ' << ranges[i] <<
"... " << flush);
355 master.open(file_name.c_str());
357 master.put(
JMeta(argc, argv));
360 master.copy(ranges[i]);
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_STRING(A)
Make string.
Utility class to parse command line options.
Data structure for UTC time.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JTOOLS::JRange< JDAQUTCExtended > JDAQUTCTimeRange
Type definition for DAQ UTC time range.
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
static const char WILDCARD
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
Auxiliary data structure for sequence of same character.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for ROOT class selection.