Project
Loading...
Searching...
No Matches
DataSamplingHeader.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
19namespace o2::utilities
20{
21
22DataSamplingHeader::DataSamplingHeader(uint64_t _sampleTimeUs, uint32_t _totalAcceptedMessages, uint32_t _totalEvaluatedMessages, DeviceIDType _deviceID, header::DataHeader const& _original)
23 : BaseHeader(sizeof(DataSamplingHeader), sHeaderType, sSerializationMethod, sVersion),
24 sampleTimeUs(_sampleTimeUs),
25 totalAcceptedMessages(_totalAcceptedMessages),
26 totalEvaluatedMessages(_totalEvaluatedMessages),
27 deviceID(_deviceID),
28 dataDescription(_original.dataDescription),
29 dataOrigin(_original.dataOrigin),
30 subSpecification(_original.subSpecification)
31{
32}
33
35{
36 return (baseHeader->description == DataSamplingHeader::sHeaderType) ? static_cast<const DataSamplingHeader*>(baseHeader) : nullptr;
37}
38
39// storage for DataSamplingHeader static members
41const o2::header::HeaderType o2::utilities::DataSamplingHeader::sHeaderType = header::String2<uint64_t>("DataSamp");
43
44} // namespace o2::utilities
A declaration of O2 Data Sampling Header.
constexpr o2::header::SerializationMethod gSerializationMethodNone
Definition DataHeader.h:327
A header which contains some meta-data generated by Data Sampling.
the base header struct Every header type must begin (i.e. derive) with this. Don't use this struct di...
Definition DataHeader.h:351
o2::header::HeaderType description
header type description, set by derived header
Definition DataHeader.h:385
the main header struct
Definition DataHeader.h:618
static const o2::header::HeaderType sHeaderType
static const o2::header::SerializationMethod sSerializationMethod
static const DataSamplingHeader * Get(const BaseHeader *baseHeader)