The Gaudi Framework  master (37c0b60a)
Gaudi::Parsers::Messages Class Referencefinal

#include </builds/gaudi/Gaudi/GaudiCoreSvc/src/JobOptionsSvc/Messages.h>

Collaboration diagram for Gaudi::Parsers::Messages:

Public Member Functions

 Messages (MsgStream &stream)
 
void AddInfo (std::string_view info)
 
void AddWarning (std::string_view warning)
 
void AddError (std::string_view error)
 
void AddInfo (const Position &pos, std::string_view info)
 
void AddWarning (const Position &pos, std::string_view warning)
 
void AddError (const Position &pos, std::string_view error)
 

Private Member Functions

void AddMessage (MSG::Level level, std::string_view message)
 
void AddMessage (MSG::Level level, const Position &pos, std::string_view message)
 

Private Attributes

MsgStreamstream_
 
std::string m_currentFilename
 Name of last printed filename. More...
 

Detailed Description

Definition at line 31 of file Messages.h.

Constructor & Destructor Documentation

◆ Messages()

Gaudi::Parsers::Messages::Messages ( MsgStream stream)
inline

Definition at line 33 of file Messages.h.

33 : stream_( stream ) {}

Member Function Documentation

◆ AddError() [1/2]

void Gaudi::Parsers::Messages::AddError ( const Position pos,
std::string_view  error 
)
inline

Definition at line 45 of file Messages.h.

45 { AddMessage( MSG::ERROR, pos, error ); }

◆ AddError() [2/2]

void Gaudi::Parsers::Messages::AddError ( std::string_view  error)
inline

Definition at line 39 of file Messages.h.

39 { AddMessage( MSG::ERROR, error ); }

◆ AddInfo() [1/2]

void Gaudi::Parsers::Messages::AddInfo ( const Position pos,
std::string_view  info 
)
inline

Definition at line 41 of file Messages.h.

41 { AddMessage( MSG::INFO, pos, info ); }

◆ AddInfo() [2/2]

void Gaudi::Parsers::Messages::AddInfo ( std::string_view  info)
inline

Definition at line 35 of file Messages.h.

35 { AddMessage( MSG::INFO, info ); }

◆ AddMessage() [1/2]

void Gaudi::Parsers::Messages::AddMessage ( MSG::Level  level,
const Position pos,
std::string_view  message 
)
private

Definition at line 19 of file Message.cpp.

19  {
20  if ( pos.filename() != m_currentFilename ) {
21  stream_ << level << "# =======> " << pos.filename() << endmsg;
22  m_currentFilename = pos.filename();
23  }
24  stream_ << level << fmt::format( "# ({},{}): {}", pos.line(), pos.column(), message ) << endmsg;
25 }

◆ AddMessage() [2/2]

void Gaudi::Parsers::Messages::AddMessage ( MSG::Level  level,
std::string_view  message 
)
private

Definition at line 17 of file Message.cpp.

17 { stream_ << level << message << endmsg; }

◆ AddWarning() [1/2]

void Gaudi::Parsers::Messages::AddWarning ( const Position pos,
std::string_view  warning 
)
inline

Definition at line 43 of file Messages.h.

43 { AddMessage( MSG::WARNING, pos, warning ); }

◆ AddWarning() [2/2]

void Gaudi::Parsers::Messages::AddWarning ( std::string_view  warning)
inline

Definition at line 37 of file Messages.h.

37 { AddMessage( MSG::WARNING, warning ); }

Member Data Documentation

◆ m_currentFilename

std::string Gaudi::Parsers::Messages::m_currentFilename
private

Name of last printed filename.

Definition at line 55 of file Messages.h.

◆ stream_

MsgStream& Gaudi::Parsers::Messages::stream_
private

Definition at line 53 of file Messages.h.


The documentation for this class was generated from the following files:
Write.stream
stream
Definition: Write.py:32
precedence.message
message
Definition: precedence.py:19
MSG::INFO
@ INFO
Definition: IMessageSvc.h:25
Gaudi::Parsers::Messages::m_currentFilename
std::string m_currentFilename
Name of last printed filename.
Definition: Messages.h:55
MSG::WARNING
@ WARNING
Definition: IMessageSvc.h:25
Gaudi::Parsers::Messages::stream_
MsgStream & stream_
Definition: Messages.h:53
Gaudi::Parsers::Messages::AddMessage
void AddMessage(MSG::Level level, std::string_view message)
Definition: Message.cpp:17
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
gaudirun.level
level
Definition: gaudirun.py:364
MSG::ERROR
@ ERROR
Definition: IMessageSvc.h:25