Celeritas 0.7.0-dev.172+develop.fe2a0acd4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::ScopedGeantLogger Class Reference

Install a Geant output destination during this class's lifetime. More...

#include <ScopedGeantLogger.hh>

Public Member Functions

 ScopedGeantLogger (Logger &)
 Install the Celeritas Geant4 logger.
 
 ScopedGeantLogger ()
 Install the Celeritas Geant4 logger using the world logger.
 
 ~ScopedGeantLogger ()
 Revert to the previous exception handler.
 
 CELER_DELETE_COPY_MOVE (ScopedGeantLogger)
 Prevent copying and moving for RAII class.
 

Static Public Member Functions

static bool enabled ()
 Enable and disable to avoid recursion with accel/Logger.
 
static void enabled (bool)
 Enable and disable to avoid recursion with accel/Logger.
 

Detailed Description

Install a Geant output destination during this class's lifetime.

Since the Geant4 output streams are thread-local, this class is as well. Multiple geant loggers can be nested, and only the outermost on a given thread will "own" the log destination.

Constructor & Destructor Documentation

◆ ScopedGeantLogger()

celeritas::ScopedGeantLogger::ScopedGeantLogger ( Logger celer_log)
inlineexplicit

Install the Celeritas Geant4 logger.

A global flag allows multiple logger adapters to be nested without consequence.


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