66 mVerbosity = ic.
options().
get<
int>(
"log-level");
84 static uint64_t nErr[3] = {0};
85 for (
auto it = parser.
begin(),
end = parser.
end(); it !=
end; ++it) {
91 LOG(warning) <<
"ZDCDataReaderDPLSpec::run - Missing RAWDataHeader on page " <<
count;
92 }
else if (nErr[0] == 5) {
93 LOG(warning) <<
"ZDCDataReaderDPLSpec::run - Missing RAWDataHeader on page " <<
count <<
" suppressing further messages";
96 if (it.data() ==
nullptr) {
98 }
else if (it.size() == 0) {
102 auto const* raw = it.raw();
104 auto const* payload = it.data();
106 size_t payloadSize = it.size();
108 size_t offset = it.offset();
109 int dataFormat = o2::raw::RDHUtils::getDataFormat(rdhPtr);
111 int linkID = o2::raw::RDHUtils::getLinkID(rdhPtr);
112 LOG(info) <<
count <<
" ZDCRawParserDPLSpec::run: fmt=" << dataFormat <<
" size=" << it.size() <<
" link=" << linkID;
114 if (dataFormat == 2) {
116 const uint32_t* gbtw = (
const uint32_t*)&payload[ip];
120 if (gbtw[0] != 0xffffffff || gbtw[1] != 0xffffffff || (gbtw[2] & 0xffff) != 0xffff) {
124 }
else if (dataFormat == 0) {
125 for (int32_t ip = 0; ip < payloadSize; ip +=
NBPerGBTW) {
129 mWorker.
processWord((
const uint32_t*)&payload[ip]);
132 LOG(error) <<
"ZDCDataReaderDPLSpec::run - Unsupported DataFormat " << dataFormat;
138 LOG(info) <<
"ZDCDataReaderDPLSpec::run processed pages: " <<
count;
140 LOG(warning) <<
"ZDCDataReaderDPLSpec::run - Missing RAWDataHeader occurrences " << nErr[0];
143 LOG(warning) <<
"ZDCDataReaderDPLSpec::run - Null payload pointer occurrences " << nErr[1];
146 LOG(warning) <<
"ZDCDataReaderDPLSpec::run - No payload occurrences " << nErr[2];
154 LOGF(info,
"ZDC RAW data parsing: Cpu: %.3e Real: %.3e s in %d slots", mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
160 std::vector<InputSpec> inputs;
163 std::vector<OutputSpec> outputs;
Class to describe fired triggered and/or stored channels for the BC and to refer to channel data.
A raw page parser for DPL input.
Definition of the Names Generator class.
Class to describe pedestal data accumulated over the orbit.
Class to describe reconstructed ZDC event (single BC with signal in one of detectors)
converts digits to raw format
T get(const char *key) const
The parser handles transparently input in the format of raw pages.
const_iterator end() const
const_iterator begin() const
ConfigParamRegistry const & options()
InputRecord & inputs()
The inputs associated with this processing context.
static void print_gbt_word(const uint32_t *word, const ModuleConfig *moduleConfig=nullptr)
int processWord(const uint32_t *word)
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > select(char const *matcher="")
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
constexpr int PayloadPerGBTW
framework::DataProcessorSpec getZDCRawParserDPLSpec()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static bool checkRDH(const RDHv4 &rdh, bool verbose=true, bool checkZeros=false)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"