Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Framework/Utils/include/DPLUtils/DPLRawParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "Framework/DataRef.h"
#include "Framework/DataRefUtils.h"
#include "Framework/Logger.h"
#include "Framework/DataProcessingHeader.h"
#include "Headers/DataHeader.h"
#include <utility> // std::declval

Expand Down Expand Up @@ -149,6 +150,15 @@ class DPLRawParser
return nullptr;
}

/// get DataProcessingHeader of the current input message
o2::framework::DataProcessingHeader const* o2DataProcessingHeader() const
{
if (mInputIterator != mEnd) {
return DataRefUtils::getHeader<o2::framework::DataProcessingHeader*>(*mPartIterator);
}
return nullptr;
}

/// get pointer to raw block at current position, rdh starts here
buffer_type const* raw() const
{
Expand Down
19 changes: 14 additions & 5 deletions Framework/Utils/src/raw-parser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,26 @@ WorkflowSpec defineDataProcessing(ConfigContext const& config)
}
// print the DataHeader information only for the first part or if we have high verbosity
if (loglevel > 1 || dh->splitPayloadIndex == 0) {
rdhprintout << dh->dataOrigin.as<std::string>() << "/"
rdhprintout << "DH: "
<< dh->dataOrigin.as<std::string>() << "/"
<< dh->dataDescription.as<std::string>() << "/"
<< dh->subSpecification << " ";
<< dh->subSpecification << " "
<< " TF " << dh->tfCounter << " Run " << dh->runNumber << " |";

// at high verbosity print part number, otherwise only the total number of parts
if (loglevel > 1) {
rdhprintout << "part " + std::to_string(dh->splitPayloadIndex) + " of " + std::to_string(dh->splitPayloadParts);
rdhprintout << " part " + std::to_string(dh->splitPayloadIndex) + " of " + std::to_string(dh->splitPayloadParts);
} else {
rdhprintout << " " + std::to_string(dh->splitPayloadParts) + " part(s)";
}
rdhprintout << " payload size " << dh->payloadSize
<< std::endl;
rdhprintout << " payload size " << dh->payloadSize;

const auto* dph = it.o2DataProcessingHeader();
if (dph) {
rdhprintout << " | DPH: "
<< " Start " << dph->startTime << " dT " << dph->duration << " Creation " << dph->creation;
}
rdhprintout << std::endl;
}
rdhprintout << DPLRawParser::RDHInfo(it) << std::endl;
}
Expand Down