The Gaudi Framework  v29r0 (ff2e7097)
ThreadGaudi.h
Go to the documentation of this file.
1 #ifndef GAUDI_KERNEL_THREADLIBGAUDI_H
2 #define GAUDI_KERNEL_THREADLIBGAUDI_H
3 
4 #include "GaudiKernel/System.h" /* ThreadHandle" */
5 #include <map>
6 #include <memory>
7 #include <string>
8 
14 {
15 public:
18  static ThreadGaudi* instance();
20  void setThreadID( const std::string& threadID );
22  ThreadMap* getThreadMap();
24  const std::string& getThreadID();
25 
26 protected:
27  ThreadGaudi();
28  virtual ~ThreadGaudi() = default;
30 };
31 
40 
41 #endif // GAUDI_KERNEL_THREADLIBGAUDI_H
std::unique_ptr< ThreadMap > m_threadMap
Definition: ThreadGaudi.h:29
STL class.
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
Definition: ThreadGaudi.cpp:76
singleton mapping the pthread ID to the Gaudi thread ID
Definition: ThreadGaudi.h:13
STL class.
std::map< System::ThreadHandle, std::string > ThreadMap
Definition: ThreadGaudi.h:16
GAUDI_API std::string getGaudiThreadIDfromID(int iCopy)
helper function to extract Gaudi Thread ID from thread copy number
Definition: ThreadGaudi.cpp:16
STL class.
GAUDI_API std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name
Definition: ThreadGaudi.cpp:27
#define GAUDI_API
Definition: Kernel.h:110
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
Definition: ThreadGaudi.cpp:52