Belle II Software  release-08-01-10
LogVar Class Reference

Class to store variables with their name which were sent to the logging service. More...

#include <LogVariableStream.h>

Collaboration diagram for LogVar:

Public Member Functions

template<class TVarType >
 LogVar (const std::string &name, const TVarType &v)
 Constructor which accepts any type as value and relies on boost lexical cast. More...
 
std::string getValue () const
 Returns the value stored for this variable.
 
std::string getName () const
 Returns the name stored for this variable.
 
bool operator== (const LogVar &lv) const
 Custom comparison operator.
 

Private Attributes

std::string m_name
 Stores the name of the variable. More...
 
std::string m_value
 String conversion of the value.
 

Detailed Description

Class to store variables with their name which were sent to the logging service.

Definition at line 24 of file LogVariableStream.h.

Constructor & Destructor Documentation

◆ LogVar()

LogVar ( const std::string &  name,
const TVarType &  v 
)
inline

Constructor which accepts any type as value and relies on boost lexical cast.

Parameters
nameString to identify the logged value
vValue to log, can be of any type which boost::lexical_cast is able to convert to a string.

Definition at line 33 of file LogVariableStream.h.

Member Data Documentation

◆ m_name

std::string m_name
private

Stores the name of the variable.

Best is a short string to describe which variable is presented, like "node number" etc.

Definition at line 66 of file LogVariableStream.h.


The documentation for this class was generated from the following file: