TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::utility::crash_logger

#include <triqs/utility/crash_logger.hpp>

Detailed Description

RAII helper that writes user-registered objects to an HDF5 crash dump on abnormal scope exit.

Warning
This is unused. It might be removed in the future.

Definition at line 46 of file crash_logger.hpp.

Public Member Functions

 crash_logger (const crash_logger &)=delete
 Deleted copy constructor.
 crash_logger (crash_logger &&)=default
 Default move constructor.
 crash_logger (std::string filename)
 Construct a crash logger that will write to an HDF5 file on abnormal exit.
 ~crash_logger () noexcept
 Destructor writes all registered objects to the dump file if there has not been a call to dismiss().
void dismiss ()
 Dismiss the logger by suppressing scope-exit dumps and by releasing registered objects.
template<typename T>
crash_loggeroperator() (T const &obj, std::string name)
 Register an object to be dumped to a given HDF5 path on abnormal exit.
crash_loggeroperator= (const crash_logger &)=delete
 Deleted copy-assignment.
crash_loggeroperator= (crash_logger &&x) noexcept
 Move-assignment takes over guards and names from x.

Constructor & Destructor Documentation

◆ crash_logger()

triqs::utility::crash_logger::crash_logger ( std::string filename)
inline

Construct a crash logger that will write to an HDF5 file on abnormal exit.

Parameters
filenameHDF5 file to write to.

Definition at line 56 of file crash_logger.hpp.

Member Function Documentation

◆ operator()()

template<typename T>
crash_logger & triqs::utility::crash_logger::operator() ( T const & obj,
std::string name )
inline

Register an object to be dumped to a given HDF5 path on abnormal exit.

Template Parameters
THDF5-serializable type.
Parameters
objObject to dump on abnormal exit.
nameHDF5 path / dataset name.
Returns
Reference to *this for chained registration.

Definition at line 88 of file crash_logger.hpp.

◆ operator=()

crash_logger & triqs::utility::crash_logger::operator= ( crash_logger && x)
inlinenoexcept

Move-assignment takes over guards and names from x.

Parameters
xOther crash_logger to move from.
Returns
Reference to *this.

Definition at line 73 of file crash_logger.hpp.


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