Xyst test code coverage report
Current view: top level - UnitTest - QuietCerr.hpp (source / functions) Hit Total Coverage
Commit: 5689ba12dc66a776d3d75f1ee48cc7d78eaa18dc Lines: 1 1 100.0 %
Date: 2024-11-22 19:02:53 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/UnitTest/QuietCerr.hpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.,
       7                 :            :              2022-2024 J. Bakosi
       8                 :            :              All rights reserved. See the LICENSE file for details.
       9                 :            :   \brief     Charm++ nodegroup to quiet std::cerr in a thread-safe fashion
      10                 :            :   \details   Charm++ nodegroup to quiet std::cerr in a thread-safe fashion.
      11                 :            : */
      12                 :            : // *****************************************************************************
      13                 :            : #ifndef QuietCerr_h
      14                 :            : #define QuietCerr_h
      15                 :            : 
      16                 :            : #include "NoWarning/quietcerr.decl.h"
      17                 :            : 
      18                 :            : namespace tk {
      19                 :            : 
      20                 :            : //! Chare state Charm++ chare nodegroup class
      21                 :            : //! \details Instantiations of QuietCerr comprise a processor aware Charm++
      22                 :            : //!   chare node group. When instantiated, a new object is created on each
      23                 :            : //!   compute node and not more (as opposed to individual chares or chare array
      24                 :            : //!   object elements). See also the Charm++ interface file quietcerr.ci.
      25         [ +  - ]:          6 : class QuietCerr : public CBase_QuietCerr {
      26                 :            : 
      27                 :            :   public:
      28                 :            :     //! Quiet std::cerr by redirecting its stream state to a stringstream
      29                 :            :     static void quiet();
      30                 :            : 
      31                 :            :     //! Destructor: restore std::cerr's stream state
      32                 :            :     ~QuietCerr() override;
      33                 :            : };
      34                 :            : 
      35                 :            : } // tk::
      36                 :            : 
      37                 :            : #endif // QuietCerr_h

Generated by: LCOV version 1.16