CbmRoot
Loading...
Searching...
No Matches
CbmErrorMessage.h
Go to the documentation of this file.
1/* Copyright (C) 2020 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
11#ifndef CBMERRORMESSAGE_H
12#define CBMERRORMESSAGE_H 1
13
15#include "CbmDefs.h"
16
18
20#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
21
22#include <boost/serialization/access.hpp>
23#include <boost/serialization/base_object.hpp>
24
26#include <cstdint>
27#include <memory> // for unique_ptr
28#include <string> // for string
29
45
46public:
49
58 CbmErrorMessage(ECbmModuleId sysId, double dTime, uint32_t uAddress, uint32_t uFlags, uint32_t uPayload = 0);
59
60
63
64
68 static const char* GetClassName() { return "CbmErrorMessage"; }
69
70
73
74
76 double GetTime() const { return fdTime; }
77
78
80 uint32_t GetAddress() const { return fuAddress; }
81
82
84 uint32_t GetFlags() const { return fuFlags; }
85
86
88 uint32_t GetPayload() const { return fuPayload; }
89
90
92 std::string ToString() const;
93
94
95 template<class Archive>
96 void serialize(Archive& ar, const unsigned int /*version*/)
97 {
98 ar& fModuleId;
99 ar& fdTime;
100 ar& fuAddress;
101 ar& fuFlags;
102 ar& fuPayload;
103 }
104
105private:
107
109 double fdTime = -1.0;
110 uint32_t fuAddress = 0;
111 uint32_t fuFlags = 0;
112 uint32_t fuPayload = 0;
113
114
116};
117
118#endif
ECbmModuleId
Definition CbmDefs.h:39
@ kLastModule
For loops over all modules.
CbmRoot (+externals) headers.
ECbmModuleId fModuleId
uint32_t GetFlags() const
Flags (bitfield)
double GetTime() const
Absolute time [ns]
ClassDefNV(CbmErrorMessage, 1)
std::string ToString() const
Output information.
uint32_t GetAddress() const
Origin address
uint32_t GetPayload() const
Payload (optional)
void serialize(Archive &ar, const unsigned int)
ECbmModuleId GetSystemId() const
System (enum DetectorId)
friend class boost::serialization::access
static const char * GetClassName()
Class name (static)