DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
DDG4
src
Geant4Interrupts.cpp
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 : M.Frank
11
//
12
//==========================================================================
13
14
// Framework include files
15
#include <
DD4hep/Printout.h
>
16
#include <
DDG4/Geant4Kernel.h
>
17
#include <
DDG4/Geant4Interrupts.h
>
18
20
bool
dd4hep::sim::Geant4Interrupts::default_sigint_handler
(
void
* user_context,
int
) {
21
Geant4Kernel
* krnl = (
Geant4Kernel
*)user_context;
22
if
( krnl ) {
23
krnl->
triggerStop
();
24
return
true
;
25
}
26
except(
"Geant4Interrupts"
,
"+++ Internal error: no user context in default SIGINT handler!"
);
27
return
true
;
28
}
29
31
bool
dd4hep::sim::Geant4Interrupts::registerHandler_SIGINT
() {
32
return
this->registerHandler(SIGINT, &m_kernel, default_sigint_handler);
33
}
dd4hep::sim::Geant4Kernel::triggerStop
void triggerStop()
Trigger smooth end-of-event-loop with finishing currently processing event.
Definition:
Geant4Kernel.cpp:184
Geant4Interrupts.h
dd4hep::sim::Geant4Kernel
Class, which allows all Geant4Action derivatives to access the DDG4 kernel structures.
Definition:
Geant4Kernel.h:64
Geant4Kernel.h
dd4hep::sim::Geant4Interrupts::default_sigint_handler
static bool default_sigint_handler(void *user_context, int signum)
Default SIGINT handler: trigger end-of-event-loop in Geant4Kernel object.
Definition:
Geant4Interrupts.cpp:20
dd4hep::sim::Geant4Interrupts::registerHandler_SIGINT
bool registerHandler_SIGINT()
Specialized handler for SIGINT.
Definition:
Geant4Interrupts.cpp:31
Printout.h
Generated on Tue Dec 10 2024 18:30:10 for DD4hep by
1.8.18