Project
Loading...
Searching...
No Matches
RawInputSpecHandler.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
18#include "Framework/Logger.h"
22
23namespace o2
24{
25namespace mid
26{
27
29{
31 static size_t contDeadBeef = 0; // number of times 0xDEADBEEF was seen continuously
32 std::vector<o2::framework::InputSpec> dummy{o2::framework::InputSpec{"dummy", o2::framework::ConcreteDataMatcher{origin, o2::header::gDataDescriptionRawData, 0xDEADBEEF}}};
33 for (const auto& ref : o2::framework::InputRecordWalker(pc.inputs(), dummy)) {
34 const auto dh = o2::framework::DataRefUtils::getHeader<o2::header::DataHeader*>(ref);
36 if (payloadSize == 0) {
38 if (++contDeadBeef <= maxWarn) {
39 LOGP(alarm, "Found input [{}/{}/{:#x}] TF#{} 1st_orbit:{} Payload {} : assuming no payload for all links in this TF{}",
40 dh->dataOrigin.str, dh->dataDescription.str, dh->subSpecification, dh->tfCounter, dh->firstTForbit, payloadSize,
41 contDeadBeef == maxWarn ? fmt::format(". {} such inputs in row received, stopping reporting", contDeadBeef) : "");
42 }
43 return true;
44 }
45 }
46 contDeadBeef = 0; // if good data, reset the counter
47 return false;
48}
49} // namespace mid
50} // namespace o2
A helper class to iteratate over all parts of all input routes.
Handler for raw data input specs.
A helper class to iteratate over all parts of all input routes.
InputRecord & inputs()
The inputs associated with this processing context.
constexpr o2::header::DataDescription gDataDescriptionRawData
Definition DataHeader.h:597
bool isDroppedTF(o2::framework::ProcessingContext &pc, o2::header::DataOrigin origin=o2::header::gDataOriginMID)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static o2::header::DataHeader::PayloadSizeType getPayloadSize(const DataRef &ref)