| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 <string>
6 #include <map>
7 #include <memory>
8
9
10
15 class GAUDI_API ThreadGaudi {
16 public:
17 typedef std::map< System::ThreadHandle , std::string > ThreadMap;
19 static ThreadGaudi* instance() ;
21 void setThreadID(const std::string& threadID) ;
23 ThreadMap* getThreadMap() ;
25 const std::string& getThreadID() ;
26
27 protected:
28 ThreadGaudi() ;
29 virtual ~ThreadGaudi() = default;
30 std::unique_ptr<ThreadMap> m_threadMap ;
31 };
32
34 GAUDI_API std::string getGaudiThreadIDfromID(int iCopy) ;
36 GAUDI_API std::string getGaudiThreadIDfromName(const std::string& name) ;
38 GAUDI_API std::string getGaudiThreadGenericName(const std::string& name) ;
40 GAUDI_API bool isGaudiThreaded(const std::string& name);
41
42 #endif // GAUDI_KERNEL_THREADLIBGAUDI_H
System.h
ThreadGaudi::m_threadMap
std::unique_ptr< ThreadMap > m_threadMap
Definition: ThreadGaudi.h:30
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
ThreadGaudi::ThreadMap
std::map< System::ThreadHandle, std::string > ThreadMap
Definition: ThreadGaudi.h:17
std::map
STL class.
isGaudiThreaded
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
Definition: ThreadGaudi.cpp:73
ThreadGaudi
singleton mapping the pthread ID to the Gaudi thread ID
Definition: ThreadGaudi.h:15
std::string
STL class.
getGaudiThreadIDfromID
GAUDI_API std::string getGaudiThreadIDfromID(int iCopy)
helper function to extract Gaudi Thread ID from thread copy number
Definition: ThreadGaudi.cpp:16
std::unique_ptr
STL class.
getGaudiThreadIDfromName
GAUDI_API std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name
Definition: ThreadGaudi.cpp:26
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
getGaudiThreadGenericName
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
Definition: ThreadGaudi.cpp:50