Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ThreadInitTask.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
15 #include <GaudiKernel/SmartIF.h>
16 #include <GaudiKernel/ToolHandle.h>
17 
18 #include <boost/thread.hpp>
19 #include <string>
20 #include <vector>
21 
30 
31 public:
33  bool terminate = false )
34  : m_tools( tools ), m_barrier( b ), m_serviceLocator( svcLocator ), m_terminate( terminate ){};
35 
40  void operator()() const;
41 
42  static bool execFailed() { return m_execFailed; }
43 
44 private:
46 
47  boost::barrier* m_barrier = nullptr;
49  bool m_terminate = false;
50 
51  static std::atomic<bool> m_execFailed;
52 };
IThreadInitTool.h
ISvcLocator
Definition: ISvcLocator.h:42
ThreadInitTask::m_serviceLocator
SmartIF< ISvcLocator > m_serviceLocator
Definition: ThreadInitTask.h:48
ThreadInitTask::execFailed
static bool execFailed()
Definition: ThreadInitTask.h:42
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
SmartIF.h
ThreadInitTask::m_barrier
boost::barrier * m_barrier
Definition: ThreadInitTask.h:47
ToolHandleArray< IThreadInitTool >
ThreadInitTask::operator()
void operator()() const
Execute the task.
Definition: ThreadInitTask.cpp:28
SmartIF< ISvcLocator >
ThreadInitTask
Special TBB task used by ThreadPoolSvc to wrap execution of IThreadInitTools.
Definition: ThreadInitTask.h:29
ToolHandle.h
ThreadInitTask::ThreadInitTask
ThreadInitTask(ToolHandleArray< IThreadInitTool > &tools, boost::barrier *b, ISvcLocator *svcLocator, bool terminate=false)
Definition: ThreadInitTask.h:32
ISvcLocator.h
ThreadInitTask::m_terminate
bool m_terminate
Definition: ThreadInitTask.h:49
ThreadInitTask::m_tools
ToolHandleArray< IThreadInitTool > m_tools
Definition: ThreadInitTask.h:45
ThreadInitTask::m_execFailed
static std::atomic< bool > m_execFailed
Definition: ThreadInitTask.h:51