|
||||
File indexing completed on 2025-01-18 09:57:46
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 #ifndef GAUDIUTILS_ISIGNALMONITOR_H 0012 #define GAUDIUTILS_ISIGNALMONITOR_H 0013 0014 #include "GaudiKernel/IInterface.h" 0015 0016 namespace Gaudi { 0017 0018 /** Interface for the service that monitors the occurrences of system signals. 0019 * 0020 * The signal to be monitored have to be declared via the method monitorSignal(). 0021 * The method gotSignal() can used to check if a signal has been received. 0022 * 0023 * Note that the service is passive, in the sense that it simply keeps track of 0024 * received signals without performing any action. So it is responsibility of the 0025 * users to add a check if the signal has been received or not. 0026 * 0027 * @author Marco Clemencic 0028 */ 0029 class GAUDI_API ISignalMonitor : virtual public IInterface { 0030 public: 0031 /// InterfaceID 0032 DeclareInterfaceID( ISignalMonitor, 1, 0 ); 0033 0034 /// Add a signal (number) to the list of signals to be monitored. 0035 /// It possible to choose if a previously installed signal handler should be 0036 /// called or not. 0037 /// 0038 /// @param signum: signal number 0039 /// @param propagate: if true (default) an already present signal handler is called, 0040 /// otherwise the signal is stopped in the service. 0041 virtual void monitorSignal( int signum, bool propagate = true ) = 0; 0042 0043 /// Ignore future occurrences of the given signal number. 0044 /// 0045 /// @param signum: signal number 0046 virtual void ignoreSignal( int signum ) = 0; 0047 0048 /// Tell if the given signal has been received or not. 0049 /// 0050 /// @param signum: signal number 0051 virtual bool gotSignal( int signum ) const = 0; 0052 0053 /// Set the flag for the given signal, as if the signal was received. 0054 /// 0055 /// @param signum: signal number 0056 virtual void setSignal( int signum ) = 0; 0057 0058 /// Clear the flag for the given signal, so that a new occurrence can be identified. 0059 /// 0060 /// @param signum: signal number 0061 virtual void clearSignal( int signum ) = 0; 0062 }; 0063 0064 } // namespace Gaudi 0065 0066 #endif /* GAUDIUTILS_ISIGNALMONITOR_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |