Project
Loading...
Searching...
No Matches
SourceInfoHeader.h
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#ifndef FRAMEWORK_SOURCEINFOHEADER_H
12#define FRAMEWORK_SOURCEINFOHEADER_H
13
14#include "Headers/DataHeader.h"
16
17#include <cstdint>
18#include <memory>
19#include <cassert>
20
21namespace o2::framework
22{
23
24//__________________________________________________________________________________________________
29
30//__________________________________________________________________________________________________
40 constexpr static const o2::header::HeaderType sHeaderType = "SrcInfo";
41 static const uint32_t sVersion = 1;
42
44 : BaseHeader(sizeof(SourceInfoHeader), sHeaderType, header::gSerializationMethodNone, sVersion)
45 {
46 }
47
49
51 static const SourceInfoHeader* Get(const BaseHeader* baseHeader)
52 {
53 return (baseHeader->description == SourceInfoHeader::sHeaderType) ? static_cast<const SourceInfoHeader*>(baseHeader) : nullptr;
54 }
55};
56
57} // namespace o2::framework
58
59#endif // FRAMEWORK_SOURCEINFOHEADER_H
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
@ Running
The channel is actively receiving data.
a BaseHeader with state information from the source
SourceInfoHeader(const SourceInfoHeader &)=default
static constexpr const o2::header::HeaderType sHeaderType
static const SourceInfoHeader * Get(const BaseHeader *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::HeaderType description
header type description, set by derived header
Definition DataHeader.h:385