Celeritas
0.5.0-56+6b053cd
|
At end of scope, print elapsed time and captured cout/cerr. More...
#include <ScopedTimeAndRedirect.hh>
Public Member Functions | |
ScopedTimeAndRedirect (std::string label) | |
Redirect cout/cerr on construction, and start timer implicitly. | |
~ScopedTimeAndRedirect () | |
Print any stored output/error messages on destruct. More... | |
CELER_DELETE_COPY_MOVE (ScopedTimeAndRedirect) | |
At end of scope, print elapsed time and captured cout/cerr.
This is designed to prevent other libraries (Geant4,VecGeom) from polluting stdout and breaking JSON reading ability.
celeritas::ScopedTimeAndRedirect::~ScopedTimeAndRedirect | ( | ) |
Print any stored output/error messages on destruct.
Note that these will only print on MPI rank 0, not on every process.
celeritas::ScopedTimeAndRedirect::CELER_DELETE_COPY_MOVE | ( | ScopedTimeAndRedirect | ) |
Prevent copying and moving for RAII class