|
Celeritas 0.7.0-dev.194+develop.0df4cab59
|
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. | |
| 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