| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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
21 class ThreadInitTask: virtual public tbb::task
22
23 {
24
25 public:
26 ThreadInitTask( ToolHandleArray<IThreadInitTool>& tools,
27 boost::barrier* b,
28 ISvcLocator* svcLocator,
29 bool terminate=false):
30 m_tools(tools), m_barrier(b), m_serviceLocator(svcLocator),
31 m_terminate(terminate){};
32
37 tbb::task* execute() override;
38
39 static bool execFailed() { return m_execFailed; }
40
41 private:
42
43 ToolHandleArray<IThreadInitTool>& m_tools;
44
45 boost::barrier *m_barrier;
46 SmartIF<ISvcLocator> m_serviceLocator;
47 bool m_terminate;
48
49 static std::atomic<bool> m_execFailed;
50
51 };
52
53 #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:13
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:46
ThreadInitTask::m_execFailed
static std::atomic< bool > m_execFailed
Definition: ThreadInitTask.h:49
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:43
ToolHandleArray< IThreadInitTool >
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
SmartIF.h
ThreadInitTask::execFailed
static bool execFailed()
Definition: ThreadInitTask.h:39
ThreadInitTask::m_terminate
bool m_terminate
Definition: ThreadInitTask.h:47
ThreadInitTask::m_barrier
boost::barrier * m_barrier
Definition: ThreadInitTask.h:45
ToolHandle.h
IThreadInitTool.h
ISvcLocator.h