Problem 452 - Ownership of SensDets in external frameworks which integrate G4SD
Summary: Ownership of SensDets in external frameworks which integrate G4SD
Status: CLOSED DUPLICATE of problem 451
Alias: None
Product: Geant4
Classification: Unclassified
Component: digits_hits (show other problems)
Version: 4.1
Hardware: PC Linux
: P2 normal
Assignee: Makoto.Asai
URL:
Depends on:
Blocks:
 
Reported: 2003-02-03 07:51 CET by schiefer
Modified: 2012-02-15 09:55 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description schiefer 2003-02-03 07:51:18 CET
We are with the ATLAS Collaboration and try to develop a common interface
between a Gaudi AlgTool and a G4VSensitiveDetector class. The AlgTool provides
nothing but runtime instantiation, as we would like to assign SensDets
dynamically at runtime.

The problem we ran into is that the G4SDManager seems to take ownership of the
SDs and deletes them once the G4RunManager terminates. Now, of course, the Gaudi
ToolSvc comes along and wants to do the same thing with the SD as a AlgTool
component, and the second delete causes a segfault.

I wonder if this isn't a very common case, other collaborations integrating G4
code into their frameworks, and if it would not be reasonable to provide a
switch for keeping ownership at some places in the G4 code, probably the SDs are
not the only component where this makes sense.
Comment 1 Makoto.Asai 2003-02-03 09:44:59 CET
*** This bug has been marked as a duplicate of 451 ***
*** 'Makoto.Asai@cern.ch' will be responsible for this bug. ***