| The Gaudi Framework v29r1 (5cd95fa2)

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

- File List
- File Members

ThreadInitTask.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_THREADINITTASK_H
2 #define GAUDIHIVE_THREADINITTASK_H
3
4 #include "GaudiKernel/ISvcLocator.h"
5 #include "GaudiKernel/IThreadInitTool.h"
6 #include "GaudiKernel/SmartIF.h"
7 #include "GaudiKernel/ToolHandle.h"
8
9 #include "boost/thread.hpp"
10 #include "tbb/task.h"
11 #include <string>
12 #include <vector>
13
21 class ThreadInitTask : virtual public tbb::task
22
23 {
24
25 public:
26 ThreadInitTask( ToolHandleArray<IThreadInitTool>& tools, boost::barrier* b, ISvcLocator* svcLocator,
27 bool terminate = false )
28 : m_tools( tools ), m_barrier( b ), m_serviceLocator( svcLocator ), m_terminate( terminate ){};
29
34 tbb::task* execute() override;
35
36 static bool execFailed() { return m_execFailed; }
37
38 private:
39 ToolHandleArray<IThreadInitTool>& m_tools;
40
41 boost::barrier* m_barrier;
42 SmartIF<ISvcLocator> m_serviceLocator;
43 bool m_terminate;
44
45 static std::atomic<bool> m_execFailed;
46 };
47
48 #endif
ThreadInitTask::ThreadInitTask
ThreadInitTask(ToolHandleArray< IThreadInitTool > &tools, boost::barrier *b, ISvcLocator *svcLocator, bool terminate=false)
Definition: ThreadInitTask.h:26
SmartIF< ISvcLocator >
ThreadInitTask::execute
tbb::task * execute() override
Execute the task.
Definition: ThreadInitTask.cpp:12
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
std::atomic< bool >
ThreadInitTask::m_serviceLocator
SmartIF< ISvcLocator > m_serviceLocator
Definition: ThreadInitTask.h:42
ThreadInitTask::m_execFailed
static std::atomic< bool > m_execFailed
Definition: ThreadInitTask.h:45
ThreadInitTask
Special TBB task used by ThreadPoolSvc to wrap execution of IThreadInitTools.
Definition: ThreadInitTask.h:21
ThreadInitTask::m_tools
ToolHandleArray< IThreadInitTool > & m_tools
Definition: ThreadInitTask.h:39
ToolHandleArray< IThreadInitTool >
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
SmartIF.h
ThreadInitTask::execFailed
static bool execFailed()
Definition: ThreadInitTask.h:36
ThreadInitTask::m_terminate
bool m_terminate
Definition: ThreadInitTask.h:43
ThreadInitTask::m_barrier
boost::barrier * m_barrier
Definition: ThreadInitTask.h:41
ToolHandle.h
IThreadInitTool.h
ISvcLocator.h