ATLAS Offline Software
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTools
src
G4ThreadInitTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef G4ATLASTOOLS_G4THREADINITTOOL_H
6
#define G4ATLASTOOLS_G4THREADINITTOOL_H
7
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
#include "GaudiKernel/IThreadInitTool.h"
10
11
#include <string>
12
#include <atomic>
13
19
class
G4ThreadInitTool
:
virtual
public
extends<AthAlgTool, IThreadInitTool>
20
{
21
22
public
:
23
25
G4ThreadInitTool
(
const
std::string&,
const
std::string&,
const
IInterface*);
26
28
virtual
void
initThread
()
override
final
;
29
31
virtual
void
terminateThread
()
override
final
;
32
36
virtual
unsigned
int
nInit
()
const
override final {
37
return
m_nInitThreads
;
38
}
39
40
private
:
41
43
std::atomic_uint
m_nInitThreads
;
44
45
};
// class G4ThreadInitTool
46
47
#endif
// G4ATLASTOOLS_G4THREADINITTOOL_H
AthAlgTool.h
G4ThreadInitTool::terminateThread
virtual void terminateThread() override final
Tear down the Geant4 workspace for this worker thread.
Definition
G4ThreadInitTool.cxx:123
G4ThreadInitTool::nInit
virtual unsigned int nInit() const override final
Counter used for barrier mechanism in thread initialization.
Definition
G4ThreadInitTool.h:36
G4ThreadInitTool::m_nInitThreads
std::atomic_uint m_nInitThreads
Counter of threads that have been initialized.
Definition
G4ThreadInitTool.h:43
G4ThreadInitTool::G4ThreadInitTool
G4ThreadInitTool(const std::string &, const std::string &, const IInterface *)
Standard tool constructor.
Definition
G4ThreadInitTool.cxx:27
G4ThreadInitTool::initThread
virtual void initThread() override final
Set up the Geant4 workspace for this worker thread.
Definition
G4ThreadInitTool.cxx:38
const
Generated on
for ATLAS Offline Software by
1.14.0