CbmRoot
CbmErrorMessage.cxx
Go to the documentation of this file.
1 
5 #include "CbmErrorMessage.h"
6 
7 
8 #include <iomanip> // for operator<<, setw
9 #include <sstream> // for basic_ostream, operator<<, stringstream
10 #include <string> // for char_traits
11 
12 // ----- Standard constructor ------------------------------------------
14  Double_t dTime,
15  UInt_t uAddress,
16  UInt_t uFlags,
17  UInt_t uPayload)
18  : fModuleId(sysId)
19  , fdTime(dTime)
20  , fuAddress(uAddress)
21  , fuFlags(uFlags)
22  , fuPayload(uPayload) {}
23 // -------------------------------------------------------------------------
24 
25 
26 // ----- Destructor ----------------------------------------------------
28 // -------------------------------------------------------------------------
29 
30 
31 // ----- Info to string ------------------------------------------------
32 std::string CbmErrorMessage::ToString() const {
33  std::stringstream ss;
34  ss << "Error message: System " << GetSystemId() << " | time " << GetTime()
35  << " | address " << GetAddress();
36  char cPrev = ss.fill('0');
37  ss << " | flags 0x" << std::hex << std::setw(8) << GetFlags() << std::dec
38  << " | fulPayload 0x" << std::hex << std::setw(8) << GetPayload()
39  << std::dec;
40  ss.fill(cPrev);
41  return ss.str();
42 }
43 // -------------------------------------------------------------------------
44 
45 
CbmErrorMessage::GetAddress
UInt_t GetAddress() const
Origin address
Definition: CbmErrorMessage.h:79
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
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.h
CbmErrorMessage::GetPayload
UInt_t GetPayload() const
Payload (optional)
Definition: CbmErrorMessage.h:87
CbmErrorMessage
CbmRoot (+externals) headers.
Definition: CbmErrorMessage.h:39
CbmErrorMessage::GetSystemId
ECbmModuleId GetSystemId() const
System (enum DetectorId)
Definition: CbmErrorMessage.h:71
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmErrorMessage::CbmErrorMessage
CbmErrorMessage()
Definition: CbmErrorMessage.h:43
CbmErrorMessage::~CbmErrorMessage
~CbmErrorMessage()
Definition: CbmErrorMessage.cxx:27