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
17
#include "
DataSampling/DataSamplingHeader.h
"
18
19
namespace
o2::utilities
20
{
21
22
DataSamplingHeader::DataSamplingHeader
() :
BaseHeader
(sizeof(
DataSamplingHeader
), sHeaderType, sSerializationMethod, sVersion)
23
{
24
}
25
26
DataSamplingHeader::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
35
const
DataSamplingHeader
*
DataSamplingHeader::Get
(
const
BaseHeader
* baseHeader)
36
{
37
return
(baseHeader->
description
==
DataSamplingHeader::sHeaderType
) ?
static_cast<
const
DataSamplingHeader
*
>
(baseHeader) :
nullptr
;
38
}
39
40
// storage for DataSamplingHeader static members
41
const
uint32_t
o2::utilities::DataSamplingHeader::sVersion
= 1;
42
const
o2::header::HeaderType
o2::utilities::DataSamplingHeader::sHeaderType
= header::String2<uint64_t>(
"DataSamp"
);
43
const
o2::header::SerializationMethod
o2::utilities::DataSamplingHeader::sSerializationMethod
=
o2::header::gSerializationMethodNone
;
44
45
}
// namespace o2::utilities
DataSamplingHeader.h
A declaration of O2 Data Sampling Header.
o2::header::gSerializationMethodNone
constexpr o2::header::SerializationMethod gSerializationMethodNone
Definition
DataHeader.h:327
o2::utilities
A header which contains some meta-data generated by Data Sampling.
Definition
DataSampling.h:38
o2::header::BaseHeader
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::BaseHeader::description
o2::header::HeaderType description
header type description, set by derived header
Definition
DataHeader.h:385
o2::header::Descriptor< deviceIDTypeSize >
o2::utilities::DataSamplingHeader
Definition
DataSamplingHeader.h:27
o2::utilities::DataSamplingHeader::sHeaderType
static const o2::header::HeaderType sHeaderType
Definition
DataSamplingHeader.h:31
o2::utilities::DataSamplingHeader::sVersion
static const uint32_t sVersion
Definition
DataSamplingHeader.h:30
o2::utilities::DataSamplingHeader::sSerializationMethod
static const o2::header::SerializationMethod sSerializationMethod
Definition
DataSamplingHeader.h:32
o2::utilities::DataSamplingHeader::Get
static const DataSamplingHeader * Get(const BaseHeader *baseHeader)
Definition
DataSamplingHeader.cxx:35
o2::utilities::DataSamplingHeader::DataSamplingHeader
DataSamplingHeader()
Definition
DataSamplingHeader.cxx:22
Utilities
DataSampling
src
DataSamplingHeader.cxx
Generated on Tue Feb 25 2025 23:16:47 for Project by
1.9.8