Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:15:10

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2024 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 GAUDIKERNEL_IALGTOOL_H
0012 #define GAUDIKERNEL_IALGTOOL_H
0013 
0014 // Include files
0015 #include <GaudiKernel/INamedInterface.h>
0016 #include <GaudiKernel/IStateful.h>
0017 #include <string>
0018 
0019 // Forward declarations
0020 class IAlgorithm;
0021 
0022 /** @class IAlgTool IAlgTool.h GaudiKernel/IAlgTool.h
0023 
0024     The interface implemented by the AlgTool base class.
0025     Concrete tools, derived from the AlgTool based class are
0026     controlled via this interface.
0027 
0028     @author Gloria Corti
0029     @author Pere Mato
0030     @date 15/11/01 version 2 introduced
0031 */
0032 
0033 class GAUDI_API IAlgTool : virtual public INamedInterface {
0034 public:
0035   /// InterfaceID
0036   DeclareInterfaceID( IAlgTool, 4, 0 );
0037 
0038   /// The type of an AlgTool, meaning the concrete AlgTool class.
0039   virtual const std::string& type() const = 0;
0040 
0041   /** The parent of the concrete AlgTool. It can be an Algorithm
0042       or a Service. A common AlgTool has the ToolSvc as parent.
0043   */
0044   virtual const IInterface* parent() const = 0;
0045 
0046   // --- Methods from IStateful ---
0047   /** Configuration (from OFFLINE to CONFIGURED).
0048    */
0049   virtual StatusCode configure() = 0;
0050 
0051   /** Initialization (from CONFIGURED to INITIALIZED).
0052    */
0053   virtual StatusCode initialize() = 0;
0054 
0055   /** Start (from INITIALIZED to RUNNING).
0056    */
0057   virtual StatusCode start() = 0;
0058 
0059   /** Stop (from RUNNING to INITIALIZED).
0060    */
0061   virtual StatusCode stop() = 0;
0062 
0063   /** Finalize (from INITIALIZED to CONFIGURED).
0064    */
0065   virtual StatusCode finalize() = 0;
0066 
0067   /** Initialization (from CONFIGURED to OFFLINE).
0068    */
0069   virtual StatusCode terminate() = 0;
0070 
0071   /** Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
0072    */
0073   virtual StatusCode reinitialize() = 0;
0074 
0075   /** Initialization (from RUNNING to RUNNING, via INITIALIZED).
0076    */
0077   virtual StatusCode restart() = 0;
0078 
0079   /** Get the current state.
0080    */
0081   virtual Gaudi::StateMachine::State FSMState() const = 0;
0082 
0083   /** Initialization of the Tool. This method is called typically
0084    *  by the ToolSvc. It allows to complete  the initialization that
0085    *  could not be done with a simply a constructor.
0086    */
0087   virtual StatusCode sysInitialize() = 0;
0088 
0089   /** Initialization of the Tool. This method is called typically
0090    *  by the ToolSvc. It allows to complete  the initialization that
0091    *  could not be done with a simply a constructor.
0092    */
0093   virtual StatusCode sysStart() = 0;
0094 
0095   /** Initialization of the Tool. This method is called typically
0096    *  by the ToolSvc. It allows to complete  the initialization that
0097    *  could not be done with a simply a constructor.
0098    */
0099   virtual StatusCode sysStop() = 0;
0100 
0101   /** Finalization of the Tool. This method is called typically
0102    *  by the ToolSvc. For completeless this method is called before
0103    *  the tool is destructed.
0104    */
0105   virtual StatusCode sysFinalize() = 0;
0106 
0107   /** Initialization of the Tool. This method is called typically
0108    *  by the ToolSvc. It allows to complete  the initialization that
0109    *  could not be done with a simply a constructor.
0110    */
0111   virtual StatusCode sysReinitialize() = 0;
0112 
0113   /** Initialization of the Tool. This method is called typically
0114    *  by the ToolSvc. It allows to complete  the initialization that
0115    *  could not be done with a simply a constructor.
0116    */
0117   virtual StatusCode sysRestart() = 0;
0118 };
0119 
0120 #endif // GAUDIKERNEL_IALGTOOL_H