diff --git a/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc b/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc index 3fae0e78d3bfc43f94f93f3231000c328929be4c..5c5ebc0efd68d2023af850fc3a8d63016dd2395b 100644 --- a/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc +++ b/MAC/APL/CEPCU/src/CEPlogProcessor/CEPlogProcessor.cc @@ -75,6 +75,7 @@ void CEPFeedback::addSubband(unsigned index) { setSubbandKey(index, "fileFormat", "AIPS++/CASA"); setSubbandKey(index, "filename", ""); + setSubbandKey(index, "size", "0"); setSubbandKey(index, "location", ""); setSubbandKey(index, "percentageWritten", "0"); setSubbandKey(index, "startTime", ""); @@ -1152,6 +1153,20 @@ void CEPlogProcessor::_processStorageLine(const struct logline &logline) } } + if ((result = strstr(logline.msg, "Final characteristics: "))) { + int bytes = 0; + double duration = 0.0; + if (sscanf(result, "Final characteristics: duration %lf s, size %d bytes", &duration, &bytes) == 2) { + + if (feedback) { + feedback->setSubbandKey(streamNr, "size", formatString("%d", bytes)); + feedback->setSubbandKey(streamNr, "duration", formatString("%.4lf", duration)); + } + + LOG_DEBUG_STR("Observation " << logline.obsID << " stream " << streamNr << " has " << duration << " s duration and is " << bytes << " bytes"); + } + } + // Storage_main@locus088 10-02-12 13:20:01.056 INFO [obs 45784 type 2 stream 12 writer 0] [OutputThread] Written block with seqno = 479, 480 blocks written, 0 blocks dropped if ((result = strstr(logline.msg, "Written block"))) { int seqno = 0, written = 0, dropped = 0, perc_written = 0;