File indexing completed on 2025-02-21 10:00:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIKERNEL_CONCURRENCYFLAGS_H
0012 #define GAUDIKERNEL_CONCURRENCYFLAGS_H 1
0013
0014 #include <cstddef>
0015
0016 #include "GaudiKernel/Kernel.h"
0017
0018 class ThreadPoolSvc;
0019 class HiveWhiteBoard;
0020 class SGHiveMgrSvc;
0021 class AthMpEvtLoopMgr;
0022 class EvtStoreSvc;
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 namespace SG {
0035 class HiveMgrSvc;
0036 }
0037
0038 namespace Gaudi {
0039
0040 namespace Concurrency {
0041
0042 class ConcurrencyFlags {
0043
0044 friend class ::ThreadPoolSvc;
0045 friend class ::HiveWhiteBoard;
0046 friend class ::EvtStoreSvc;
0047 friend class SG::HiveMgrSvc;
0048 friend class ::AthMpEvtLoopMgr;
0049
0050 public:
0051
0052
0053 static GAUDI_API std::size_t numThreads() { return n_threads; }
0054
0055
0056
0057 static GAUDI_API std::size_t numConcurrentEvents() { return n_concEvts; }
0058
0059
0060
0061 static GAUDI_API std::size_t numProcs() { return n_procs; }
0062
0063
0064
0065 static GAUDI_API bool concurrent() { return ( n_threads || n_concEvts || n_procs ); }
0066
0067 private:
0068 static GAUDI_API void setNumThreads( const std::size_t& nT ) { n_threads = nT; }
0069 static GAUDI_API void setNumConcEvents( const std::size_t& nE ) { n_concEvts = nE; }
0070 static GAUDI_API void setNumProcs( const std::size_t& nP ) { n_procs = nP; }
0071
0072 private:
0073 static std::size_t n_threads;
0074 static std::size_t n_concEvts;
0075 static std::size_t n_procs;
0076 };
0077 }
0078 }
0079
0080 #endif