Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
40 const std::string&
getMessage()
const {
return m_message; }
49 void setType(
int msg_type ) { m_type = msg_type; }
52 const std::string&
getSource()
const {
return m_source; }
55 void setSource( std::string_view src ) { m_source = src; }
65 const std::string&
getFormat()
const {
return m_format; }
71 void setFormat( std::string
msg )
const;
80 void setTimeFormat( std::string timeFormat )
const;
93 void invalidFormat()
const;
96 void makeFormattedMsg(
const std::string&
format )
const;
99 void decodeFormat(
const std::string&
format )
const;
102 void sizeField(
const std::string& text,
bool middle =
false )
const;
105 void setWidth(
const std::string& formatArg )
const;
108 std::string m_source{
"UNKNOWN" };
110 mutable std::string m_format{ DEFAULT_FORMAT };
111 mutable std::string m_time_format{ DEFAULT_TIME_FORMAT };
113 mutable char m_fill{
' ' };
114 mutable int m_width{ 0 };
115 mutable bool m_left{
true };
122 pthread_t m_ecThrd{};
127 static const char FORMAT_PREFIX =
'%';
131 static const char JUSTIFY_LEFT =
'L';
134 static const char JUSTIFY_RIGHT =
'R';
137 static const char MESSAGE =
'M';
140 static const char TYPE =
'T';
143 static const char TIME =
't';
146 static const char UTIME =
'u';
149 static const char SOURCE =
'S';
152 static const char COMP =
'C';
155 static const char SLOT =
's';
158 static const char EVTNUM =
'e';
161 static const char THREAD =
'X';
164 static const char EVENTID =
'E';
167 static const char FILL =
'F';
170 static const char WIDTH =
'W';
174 static constexpr
const char* DEFAULT_FORMAT =
"% F%18W%S%7W%R%T %0W%M";
177 static constexpr
const char* DEFAULT_TIME_FORMAT =
"%Y-%m-%d %H:%M:%S,%f";
bool operator<(backwards_compatibility_hack_time_timespan, backwards_compatibility_hack_time_timespan)
~Message()=default
Default destructor.
static constexpr ContextID_t INVALID_CONTEXT_ID
Message()=default
Default constructor.
static const std::string getDefaultFormat()
Get the default format string.
void setMessage(std::string msg)
Set the message string.
const std::string & getTimeFormat() const
Get the time format string.
std::ostream & operator<<(std::ostream &o, const Catalog &c)
printout operator
EventContext::ContextID_t getEventSlot() const
static constexpr ContextEvt_t INVALID_CONTEXT_EVT
void setSource(std::string_view src)
Set the message source.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
EventContext::ContextEvt_t getEventNumber() const
std::string m_message
The message text.
const EventIDBase & getEventID() const
const std::string & getMessage() const
Get the message string.
const std::string & getFormat() const
Get the format string.
EventIDBase m_ecEvtId
Full event ID.
std::string m_formatted_msg
Formatted message.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
static const std::string getDefaultTimeFormat()
Get the default time format string.
int getType() const
Get the message type.
void setType(int msg_type)
Set the message type.
const std::string & getSource() const
Get the message source.
bool operator==(const PropertyId &lhs, const PropertyId &rhs)