All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
8 
9 
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() ;
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
ThreadMap * m_threadMap
Definition: ThreadGaudi.h:30
std::map< System::ThreadHandle, std::string > ThreadMap
Definition: ThreadGaudi.h:17
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
Definition: ThreadGaudi.cpp:75
singleton mapping the pthread ID to the Gaudi thread ID
Definition: ThreadGaudi.h:15
GAUDI_API std::string getGaudiThreadIDfromID(int iCopy)
helper function to extract Gaudi Thread ID from thread copy number
Definition: ThreadGaudi.cpp:18
GAUDI_API std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name
Definition: ThreadGaudi.cpp:28
#define GAUDI_API
Definition: Kernel.h:108
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
Definition: ThreadGaudi.cpp:52