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));
321 if (!total.is_valid()) {
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);
333 const long double T_ns = ((
long double) JDAQUTCExtended::getTick() + 1.0e9l * (
long double)
getTimeDifference(total.getLowerLimit(), total.getUpperLimit())) / (
long double) numberOfFiles.total;
335 for (
long double t1 = total.getLowerLimit().getTimeNanoSecond(); t1 < (
long double) total.getUpperLimit().getTimeNanoSecond(); t1 += T_ns) {
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());
Utility class to parse command line options.
then echo Test string reversed by master(hit< return > to continue)." $DIR/JProcess -c "$DIR/JEcho" -rC fi if (( 1 ))
Auxiliary class for ROOT class selection.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Data structure for UTC time.
#define MAKE_STRING(A)
Make string.
static const char WILDCARD
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
set_variable E_E log10(E_{fit}/E_{#mu})"
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
JTOOLS::JRange< JDAQUTCExtended > JDAQUTCTimeRange
Type definition for DAQ UTC time range.
Auxiliary data structure for sequence of same character.
do echo n Creating graphics for string $STRING for((FLOOR=$FIRST_FLOOR;$FLOOR<=$LAST_FLOOR;FLOOR+=1))
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.