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() : BaseHeader(sizeof(DataSamplingHeader), sHeaderType, sSerializationMethod, sVersion)
23{
24}
25
26DataSamplingHeader::DataSamplingHeader(uint64_t _sampleTimeUs, uint32_t _totalAcceptedMessages, uint32_t _totalEvaluatedMessages, DeviceIDType _deviceID)
27 : BaseHeader(sizeof(DataSamplingHeader), sHeaderType, sSerializationMethod, sVersion),
28 sampleTimeUs(_sampleTimeUs),
29 totalAcceptedMessages(_totalAcceptedMessages),
30 totalEvaluatedMessages(_totalEvaluatedMessages),
31 deviceID(_deviceID)
32{
33}
34
36{
37 return (baseHeader->description == DataSamplingHeader::sHeaderType) ? static_cast<const DataSamplingHeader*>(baseHeader) : nullptr;
38}
39
40// storage for DataSamplingHeader static members
42const o2::header::HeaderType o2::utilities::DataSamplingHeader::sHeaderType = header::String2<uint64_t>("DataSamp");
44
45} // 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
static const o2::header::HeaderType sHeaderType
static const o2::header::SerializationMethod sSerializationMethod
static const DataSamplingHeader * Get(const BaseHeader *baseHeader)