Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | List of all members
datatools::tracer Class Reference

A tracer object stores some arbitrary output in a trace file. More...

#include <bayeux/datatools/tracer.h>

Public Member Functions

 tracer ()
 
 tracer (int id_, const std::string &filename_, const std::string &label_="")
 
 ~tracer ()
 
void set_id (int)
 
int get_id () const
 
void set_label (const std::string &)
 
const std::string & get_label () const
 
void set_filename (const std::string &)
 
const std::string & get_filename () const
 
void set_preserved_file (bool pf_)
 
bool is_preserved_file () const
 
bool is_initialized () const
 
void initialize ()
 
void initialize (int id_)
 
void initialize (int id_, const std::string &filename_)
 
void initialize (int id_, const std::string &filename_, bool preserved_file_)
 
void reset ()
 
std::ofstream & out (bool increment_=true)
 
template<class Type >
void trace (const Type &value_, bool increment_=true)
 

Static Public Member Functions

static datatools::tracergrab_global_tracer (int id_, const std::string &filename_="")
 

Detailed Description

A tracer object stores some arbitrary output in a trace file.

Constructor & Destructor Documentation

◆ tracer() [1/2]

datatools::tracer::tracer ( )

◆ tracer() [2/2]

datatools::tracer::tracer ( int  id_,
const std::string &  filename_,
const std::string &  label_ = "" 
)

◆ ~tracer()

datatools::tracer::~tracer ( )

Member Function Documentation

◆ get_filename()

const std::string& datatools::tracer::get_filename ( ) const

◆ get_id()

int datatools::tracer::get_id ( ) const

◆ get_label()

const std::string& datatools::tracer::get_label ( ) const

◆ grab_global_tracer()

static datatools::tracer& datatools::tracer::grab_global_tracer ( int  id_,
const std::string &  filename_ = "" 
)
static

◆ initialize() [1/4]

void datatools::tracer::initialize ( )

◆ initialize() [2/4]

void datatools::tracer::initialize ( int  id_)

◆ initialize() [3/4]

void datatools::tracer::initialize ( int  id_,
const std::string &  filename_ 
)

◆ initialize() [4/4]

void datatools::tracer::initialize ( int  id_,
const std::string &  filename_,
bool  preserved_file_ 
)

◆ is_initialized()

bool datatools::tracer::is_initialized ( ) const

◆ is_preserved_file()

bool datatools::tracer::is_preserved_file ( ) const

◆ out()

std::ofstream& datatools::tracer::out ( bool  increment_ = true)

◆ reset()

void datatools::tracer::reset ( )

◆ set_filename()

void datatools::tracer::set_filename ( const std::string &  )

◆ set_id()

void datatools::tracer::set_id ( int  )

◆ set_label()

void datatools::tracer::set_label ( const std::string &  )

◆ set_preserved_file()

void datatools::tracer::set_preserved_file ( bool  pf_)

◆ trace()

template<class Type >
void datatools::tracer::trace ( const Type &  value_,
bool  increment_ = true 
)
inline

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