DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ers::ExitStream Struct Reference

Terminates the current application. More...

#include <ExitStream.hpp>

Inheritance diagram for ers::ExitStream:
[legend]
Collaboration diagram for ers::ExitStream:
[legend]

Public Member Functions

 ExitStream (const std::string &exit_code="1")
 
void write (const Issue &issue) override
 
- Public Member Functions inherited from ers::OutputStream
virtual ~OutputStream ()
 Sends the issue into this stream.
 

Private Attributes

int m_exit_code
 

Additional Inherited Members

- Protected Member Functions inherited from ers::OutputStream
 OutputStream ()
 
OutputStreamchained ()
 
virtual bool isNull () const
 

Detailed Description

Terminates the current application.

This class implements a stream, which exits the application whenever it receives an issue. In order to employ this implementation in a stream configuration the name to be used is "exit". E.g. the following configuration will print a first issue that is passed to the FATAL ERS stream to the standard output and then terminates the application:

    export DUNEDAQ_ERS_FATAL="stdout,exit"
Author
Serguei Kolos
Version
1.0

Definition at line 36 of file ExitStream.hpp.

Constructor & Destructor Documentation

◆ ExitStream()

ers::ExitStream::ExitStream ( const std::string & exit_code = "1")
explicit

Creates a new instance of Exit stream.

Parameters
exit_codeThis sting shall contain a number that will be used as the application exit status.

Member Function Documentation

◆ write()

void ers::ExitStream::write ( const Issue & issue)
overridevirtual

Implements ers::OutputStream.

Member Data Documentation

◆ m_exit_code

int ers::ExitStream::m_exit_code
private

Definition at line 48 of file ExitStream.hpp.


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