GraviDy  1.0
Gravitational Dynamics N-body integrator
Public Member Functions | Public Attributes | List of all members
Logger Class Reference

Class in charge of all the logging system in the code. More...

#include <Logger.hpp>

Collaboration diagram for Logger:
Collaboration graph
[legend]

Public Member Functions

 Logger (NbodySystem *ns)
 
 ~Logger ()
 
std::string get_timestamp ()
 
void print_info ()
 
void add_info (std::string key, std::string value)
 
void write_info ()
 
void write_snapshot (unsigned int snapshot_number, double ITIME)
 
void print_all (double ITIME, unsigned int snapshot_number)
 
void print_energy_log (double ITIME, unsigned int iterations, long long interactions, unsigned int nsteps, double new_energy)
 
void print_lagrange_radii (double ITIME, std::vector< double > lagrange_radii)
 
void log (int type, std::string msg)
 
void log_error (std::string msg)
 
void log_warning (std::string msg)
 
void log_success (std::string msg)
 
void log_info (std::string msg)
 

Public Attributes

NbodySystemns
 
bool print_screen
 
std::ofstream out_file
 
std::ofstream info_file
 
std::ostream * gstream
 
std::string ofname
 
std::string ofname_info
 

Detailed Description

Class in charge of all the logging system in the code.

This class includes the methods to be able to report something on-screen and also writing the infor and snapshot files.

Constructor & Destructor Documentation

§ Logger()

Logger::Logger ( NbodySystem ns)

§ ~Logger()

Logger::~Logger ( )

Member Function Documentation

§ add_info()

void Logger::add_info ( std::string  key,
std::string  value 
)

§ get_timestamp()

std::string Logger::get_timestamp ( )

§ log()

void Logger::log ( int  type,
std::string  msg 
)

§ log_error()

void Logger::log_error ( std::string  msg)

§ log_info()

void Logger::log_info ( std::string  msg)

§ log_success()

void Logger::log_success ( std::string  msg)

§ log_warning()

void Logger::log_warning ( std::string  msg)

§ print_all()

void Logger::print_all ( double  ITIME,
unsigned int  snapshot_number 
)

§ print_energy_log()

void Logger::print_energy_log ( double  ITIME,
unsigned int  iterations,
long long  interactions,
unsigned int  nsteps,
double  new_energy 
)

§ print_info()

void Logger::print_info ( )

§ print_lagrange_radii()

void Logger::print_lagrange_radii ( double  ITIME,
std::vector< double >  lagrange_radii 
)

§ write_info()

void Logger::write_info ( )

§ write_snapshot()

void Logger::write_snapshot ( unsigned int  snapshot_number,
double  ITIME 
)

Member Data Documentation

§ gstream

std::ostream* Logger::gstream

§ info_file

std::ofstream Logger::info_file

§ ns

NbodySystem* Logger::ns

§ ofname

std::string Logger::ofname

§ ofname_info

std::string Logger::ofname_info

§ out_file

std::ofstream Logger::out_file

§ print_screen

bool Logger::print_screen

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