| The Gaudi Framework v27r1

- 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/SmartIF.h"
5 #include "GaudiKernel/ISvcLocator.h"
6 #include "GaudiKernel/ToolHandle.h"
7 #include "GaudiKernel/IThreadInitTool.h"
8
9 #include <vector>
10 #include <string>
11 #include "tbb/task.h"
12 #include "boost/thread.hpp"
13
14 class ThreadInitTask: virtual public tbb::task
15
16 {
17
18 public:
19 ThreadInitTask( ToolHandleArray<IThreadInitTool>& tools,
20 boost::barrier* b,
21 ISvcLocator* svcLocator,
22 bool terminate=false):
23 m_tools(tools), m_barrier(b), m_serviceLocator(svcLocator),
24 m_terminate(terminate){};
25
26 virtual tbb::task* execute();
27
28 static bool execFailed() { return m_execFailed; }
29
30 private:
31
32 ToolHandleArray<IThreadInitTool>& m_tools;
33
34 boost::barrier *m_barrier;
35 SmartIF<ISvcLocator> m_serviceLocator;
36 bool m_terminate;
37
38 static std::atomic<bool> m_execFailed;
39
40 };
41
42 #endif
ThreadInitTask::ThreadInitTask
ThreadInitTask(ToolHandleArray< IThreadInitTool > &tools, boost::barrier *b, ISvcLocator *svcLocator, bool terminate=false)
Definition: ThreadInitTask.h:19
SmartIF< ISvcLocator >
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:35
ThreadInitTask::m_execFailed
static std::atomic< bool > m_execFailed
Definition: ThreadInitTask.h:38
ThreadInitTask
Definition: ThreadInitTask.h:14
ThreadInitTask::m_tools
ToolHandleArray< IThreadInitTool > & m_tools
Definition: ThreadInitTask.h:32
ToolHandleArray< IThreadInitTool >
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
SmartIF.h
ThreadInitTask::execFailed
static bool execFailed()
Definition: ThreadInitTask.h:28
ThreadInitTask::execute
virtual tbb::task * execute()
Definition: ThreadInitTask.cpp:13
ThreadInitTask::m_terminate
bool m_terminate
Definition: ThreadInitTask.h:36
ThreadInitTask::m_barrier
boost::barrier * m_barrier
Definition: ThreadInitTask.h:34
ToolHandle.h
IThreadInitTool.h
ISvcLocator.h