![]() |
|
|||
File indexing completed on 2025-02-22 10:36:06
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 ///////////////////////// -*- C++ -*- ///////////////////////////// 0012 // IIoComponentMgr.h 0013 // Header file for class IIoComponentMgr 0014 // Author: S.Binet<binet@cern.ch> 0015 /////////////////////////////////////////////////////////////////// 0016 #ifndef GAUDIKERNEL_IIOCOMPONENTMGR_H 0017 #define GAUDIKERNEL_IIOCOMPONENTMGR_H 1 0018 0019 /** @class IIoComponentMgr 0020 */ 0021 0022 // STL includes 0023 #include <string> 0024 0025 // GaudiKernel includes 0026 #include "GaudiKernel/INamedInterface.h" 0027 #include "GaudiKernel/StatusCode.h" 0028 0029 // forward declare 0030 class IIoComponent; 0031 0032 class GAUDI_API IIoComponentMgr : virtual public INamedInterface { 0033 public: 0034 DeclareInterfaceID( IIoComponentMgr, 1, 0 ); 0035 0036 /////////////////////////////////////////////////////////////////// 0037 // Public enums: 0038 /////////////////////////////////////////////////////////////////// 0039 public: 0040 struct IoMode { 0041 enum Type { READ = 0, WRITE, RW, INVALID }; 0042 }; 0043 0044 /////////////////////////////////////////////////////////////////// 0045 // Public methods: 0046 /////////////////////////////////////////////////////////////////// 0047 public: 0048 /** @brief: allow a @c IIoComponent to register itself with this 0049 * manager so appropriate actions can be taken when e.g. 0050 * a @c fork(2) has been issued (this is usually handled 0051 * by calling @c IIoComponent::io_reinit on every registered 0052 * component) 0053 */ 0054 virtual StatusCode io_register( IIoComponent* iocomponent ) = 0; 0055 0056 /** @brief: allow a @c IIoComponent to register itself with this 0057 * manager so appropriate actions can be taken when e.g. 0058 * a @c fork(2) has been issued (this is usually handled 0059 * by calling @c IIoComponent::io_reinit on every registered 0060 * component) 0061 */ 0062 virtual StatusCode io_register( IIoComponent* iocomponent, IIoComponentMgr::IoMode::Type iomode, 0063 const std::string& fname, const std::string& pfn = "" ) = 0; 0064 0065 /** @brief: allow a @c IIoComponent to update the contents of the 0066 * registry with a new file name 0067 */ 0068 virtual StatusCode io_update( IIoComponent* iocomponent, const std::string& old_fname, 0069 const std::string& new_fname ) = 0; 0070 0071 /** @brief: allow a @c IIoComponent to update the contents of the 0072 * registry with a new work directory 0073 */ 0074 virtual StatusCode io_update( IIoComponent* iocomponent, const std::string& work_dir ) = 0; 0075 0076 // VT. new method 0077 /** @brief: Update all @c IIoComponents with a new work directory 0078 */ 0079 virtual StatusCode io_update_all( const std::string& work_dir ) = 0; 0080 0081 /** @brief: check if the registry contains a given @c IIoComponent 0082 */ 0083 virtual bool io_hasitem( IIoComponent* iocomponent ) const = 0; 0084 0085 /** @brief: check if the registry contains a given @c IIoComponent and 0086 * that component had @param `fname` as a filename 0087 */ 0088 virtual bool io_contains( IIoComponent* iocomponent, const std::string& fname ) const = 0; 0089 0090 /** @brief: retrieve all registered filenames for a given @c IIoComponent 0091 */ 0092 virtual std::vector<std::string> io_retrieve( IIoComponent* iocomponent ) = 0; 0093 0094 /** @brief: retrieve the new filename for a given @c IIoComponent and 0095 * @param `fname` filename 0096 */ 0097 virtual StatusCode io_retrieve( IIoComponent* iocomponent, std::string& fname ) = 0; 0098 0099 /** @brief: reinitialize the I/O subsystem. 0100 * This effectively calls @c IIoComponent::io_reinit on all the registered 0101 * @c IIoComponent. 0102 */ 0103 virtual StatusCode io_reinitialize() = 0; 0104 0105 /** @brief: finalize the I/O subsystem. 0106 * Hook to allow to e.g. give a chance to I/O subsystems to merge output 0107 * files. Not sure how to do this correctly though... 0108 */ 0109 virtual StatusCode io_finalize() = 0; 0110 }; 0111 0112 #endif //> !GAUDIKERNEL_IIOCOMPONENTMGR_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |