DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
DDG4
include
DDG4
Python
Geant4PythonInitialization.h
Go to the documentation of this file.
1
//==========================================================================
2
// AIDA Detector description implementation
3
//--------------------------------------------------------------------------
4
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5
// All rights reserved.
6
//
7
// For the licensing terms see $DD4hepINSTALL/LICENSE.
8
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9
//
10
// \author Markus Frank
11
// \date 2015-11-03
12
//
13
//==========================================================================
14
#ifndef DDG4_PYTHON_GEANT4PYTHONINITIALIZATION_H
15
#define DDG4_PYTHON_GEANT4PYTHONINITIALIZATION_H
16
17
// Framework include files
18
#include <
DDG4/Geant4UserInitialization.h
>
19
#include <
DDG4/Python/Geant4PythonCall.h
>
20
22
namespace
dd4hep
{
23
25
namespace
sim {
26
28
59
class
Geant4PythonInitialization
:
public
Geant4UserInitialization
{
60
protected
:
62
Geant4PythonCall
m_masterSetup
;
64
Geant4PythonCall
m_workerSetup
;
65
67
void
exec
(
const
std::string& desc,
const
Geant4PythonCall
& cmd)
const
;
68
69
public
:
71
Geant4PythonInitialization
(
Geant4Context
* c,
const
std::string& nam);
73
virtual
~Geant4PythonInitialization
() {}
74
76
void
setMasterSetup
(PyObject* callable, PyObject* args);
78
void
setWorkerSetup
(PyObject* callable, PyObject* args);
80
virtual
void
build
()
const
;
82
virtual
void
buildMaster
()
const
;
83
};
84
}
// End namespace sim
85
}
// End namespace dd4hep
86
#endif // DDG4_PYTHON_GEANT4PYTHONINITIALIZATION_H
dd4hep::sim::Geant4PythonInitialization::~Geant4PythonInitialization
virtual ~Geant4PythonInitialization()
Default destructor.
Definition:
Geant4PythonInitialization.h:73
dd4hep::sim::Geant4PythonCall
Base class to initialize a multi-threaded or single threaded Geant4 application.
Definition:
Geant4PythonCall.h:32
dd4hep::sim::Geant4PythonInitialization
Base class to initialize a multi-threaded or single threaded Geant4 application.
Definition:
Geant4PythonInitialization.h:59
dd4hep::sim::Geant4UserInitialization
Base class to initialize a multi-threaded or single threaded Geant4 application.
Definition:
Geant4UserInitialization.h:33
dd4hep::sim::Geant4PythonInitialization::setMasterSetup
void setMasterSetup(PyObject *callable, PyObject *args)
Set the Detector initialization command.
Definition:
Geant4PythonInitialization.cpp:33
dd4hep::sim::Geant4PythonInitialization::m_masterSetup
Geant4PythonCall m_masterSetup
Master initialization command. Default: empty.
Definition:
Geant4PythonInitialization.h:62
dd4hep::sim::Geant4PythonInitialization::Geant4PythonInitialization
Geant4PythonInitialization(Geant4Context *c, const std::string &nam)
Standard constructor.
Definition:
Geant4PythonInitialization.cpp:26
dd4hep::sim::Geant4PythonInitialization::exec
void exec(const std::string &desc, const Geant4PythonCall &cmd) const
Execute command in the python interpreter.
Definition:
Geant4PythonInitialization.cpp:43
dd4hep::sim::Geant4PythonInitialization::build
virtual void build() const
Callback function to build setup for the MT worker thread.
Definition:
Geant4PythonInitialization.cpp:53
dd4hep
Namespace for the AIDA detector description toolkit.
Definition:
AlignmentsCalib.h:28
Geant4PythonCall.h
Geant4UserInitialization.h
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition:
Geant4Context.h:201
dd4hep::sim::Geant4PythonInitialization::buildMaster
virtual void buildMaster() const
Callback function to build setup for the MT master thread.
Definition:
Geant4PythonInitialization.cpp:60
dd4hep::sim::Geant4PythonInitialization::setWorkerSetup
void setWorkerSetup(PyObject *callable, PyObject *args)
Set the field initialization command.
Definition:
Geant4PythonInitialization.cpp:38
dd4hep::sim::Geant4PythonInitialization::m_workerSetup
Geant4PythonCall m_workerSetup
Worker initialization command. Default: empty.
Definition:
Geant4PythonInitialization.h:64
Generated on Thu Nov 7 2024 13:31:59 for DD4hep by
1.8.18