19 ost << threadSeparator << iCopy <<
std::ends;
34 size_t pp = name.
find(
"." );
35 if ( ( pp > 0 ) && ( pp <= name.
length() ) ) {
36 parent_name = name.
substr( 0, name.
find(
"." ) - 1 );
41 pp = parent_name.
find( threadSeparator );
42 if ( ( pp > 0 ) && ( pp <= parent_name.
length() ) ) {
43 threadAppendix = parent_name.
substr( parent_name.
find( threadSeparator ) );
45 return threadAppendix;
59 size_t pp = name.
find(
"." );
60 if ( ( pp > 0 ) && ( pp <= name.
length() ) ) {
61 parent_name = name.
substr( 0, name.
find(
"." ) - 1 );
66 pp = parent_name.
find( threadSeparator );
67 if ( ( pp > 0 ) && ( pp <= parent_name.
length() ) ) {
68 genericName = parent_name.
substr( 0, parent_name.
find( threadSeparator ) ) + tool_name;
88 if ( !ThreadGaudiInstance ) ThreadGaudiInstance =
new ThreadGaudi();
97 if ( p_threadMap->
count( s_pid ) == 0 ) {
98 ( *p_threadMap )[s_pid] = threadID;
99 #ifdef THREAD_GAUDI__DEBUG 100 std::cout <<
" *** ThreadGaudi setThreadID *** value set for *** " << threadID <<
" thread ID : " << s_pid
112 if ( p_threadMap->
find( s_pid ) != p_threadMap->
end() ) {
113 return ( *p_threadMap->
find( s_pid ) ).
second;
std::unique_ptr< ThreadMap > m_threadMap
static ThreadGaudi * instance()
singleton access
const std::string & getThreadID()
get Gaudi ID of current pthread
void * ThreadHandle
A Thread handle.
ThreadGaudi * ThreadGaudiInstance
std::string getGaudiThreadIDfromID(int iCopy)
helper function to extract Gaudi Thread ID from thread copy number
std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
singleton mapping the pthread ID to the Gaudi thread ID
ThreadMap * getThreadMap()
access the whole map
std::map< System::ThreadHandle, std::string > ThreadMap
void setThreadID(const std::string &threadID)
associate Gaudi ID to pthread
const std::string threadSeparator
const std::string algToolSeparator
ThreadHandle threadSelf()
thread handle "accessor"
bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name