CbmRoot
CbmErrorMessage.h
Go to the documentation of this file.
1 
7 #ifndef CBMERRORMESSAGE_H
8 #define CBMERRORMESSAGE_H 1
9 
11 #include "CbmDefs.h"
12 
14 
16 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
17 #include <RtypesCore.h> // for UInt_t, Double_t, Int_t
18 #include <boost/serialization/access.hpp>
19 #include <boost/serialization/base_object.hpp>
20 
22 #include <memory> // for unique_ptr
23 #include <string> // for string
24 
40 
41 public:
44 
54  Double_t dTime,
55  UInt_t uAddress,
56  UInt_t uFlags,
57  UInt_t uPayload = 0);
58 
59 
62 
63 
67  static const char* GetClassName() { return "CbmErrorMessage"; }
68 
69 
71  ECbmModuleId GetSystemId() const { return fModuleId; }
72 
73 
75  Double_t GetTime() const { return fdTime; }
76 
77 
79  UInt_t GetAddress() const { return fuAddress; }
80 
81 
83  UInt_t GetFlags() const { return fuFlags; }
84 
85 
87  UInt_t GetPayload() const { return fuPayload; }
88 
89 
91  std::string ToString() const;
92 
93 
94  template<class Archive>
95  void serialize(Archive& ar, const unsigned int /*version*/) {
96  ar& fModuleId;
97  ar& fdTime;
98  ar& fuAddress;
99  ar& fuFlags;
100  ar& fuPayload;
101  }
102 
103 private:
105 
107  Double_t fdTime = -1.0;
108  UInt_t fuAddress = 0;
109  UInt_t fuFlags = 0;
110  UInt_t fuPayload = 0;
111 
112 
114 };
115 
116 #endif
CbmErrorMessage::fuAddress
UInt_t fuAddress
Definition: CbmErrorMessage.h:108
CbmErrorMessage::GetAddress
UInt_t GetAddress() const
Origin address
Definition: CbmErrorMessage.h:79
CbmErrorMessage::ClassDefNV
ClassDefNV(CbmErrorMessage, 1)
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmErrorMessage::fModuleId
ECbmModuleId fModuleId
Definition: CbmErrorMessage.h:106
CbmErrorMessage::GetTime
Double_t GetTime() const
Absolute time [ns]
Definition: CbmErrorMessage.h:75
CbmErrorMessage::ToString
std::string ToString() const
Output information.
Definition: CbmErrorMessage.cxx:32
CbmErrorMessage::GetFlags
UInt_t GetFlags() const
Flags (bitfield)
Definition: CbmErrorMessage.h:83
CbmErrorMessage::access
friend class boost::serialization::access
Definition: CbmErrorMessage.h:104
CbmErrorMessage::GetPayload
UInt_t GetPayload() const
Payload (optional)
Definition: CbmErrorMessage.h:87
CbmErrorMessage
CbmRoot (+externals) headers.
Definition: CbmErrorMessage.h:39
CbmErrorMessage::fuFlags
UInt_t fuFlags
Definition: CbmErrorMessage.h:109
CbmErrorMessage::GetSystemId
ECbmModuleId GetSystemId() const
System (enum DetectorId)
Definition: CbmErrorMessage.h:71
CbmErrorMessage::CbmErrorMessage
CbmErrorMessage()
Definition: CbmErrorMessage.h:43
CbmErrorMessage::~CbmErrorMessage
~CbmErrorMessage()
Definition: CbmErrorMessage.cxx:27
ECbmModuleId::kLastModule
@ kLastModule
For loops over all modules.
CbmErrorMessage::GetClassName
static const char * GetClassName()
Class name (static)
Definition: CbmErrorMessage.h:67
CbmErrorMessage::serialize
void serialize(Archive &ar, const unsigned int)
Definition: CbmErrorMessage.h:95
CbmErrorMessage::fuPayload
UInt_t fuPayload
Definition: CbmErrorMessage.h:110
CbmErrorMessage::fdTime
Double_t fdTime
Definition: CbmErrorMessage.h:107
CbmDefs.h