[Gate-users] Adding G4MTRunManager Support to GATE
Yann PERROT
perrot at clermont.in2p3.fr
Wed Apr 1 15:28:05 CEST 2015
Dear Alex,
Seeing the error message:
"For multi-threaded version, define G4UserEventAction in
G4VUserActionInitialization"
I have a naive question: do you have an ActionInitialization class which
is mandatory to define user action classes?
Bests,
Yann
Date: Wed, 1 Apr 2015 08:51:52 -0400
From: alexvergaragil at gmail.com
To: verderi at in2p3.fr
CC: gate-users at lists.opengatecollaboration.org
Subject: Re: [Gate-users] Adding G4MTRunManager Support to GATE
Dear Marc
I have updated a lot of code adding support for G4MTRunManager, but in
several places gate code uses pointer casts to get G4RunManager
singleton instance to manage the run like the line
G4RunManager* runManager = G4RunManager::GetRunManager();
Is it correct my update to
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = G4MTRunManager::GetMasterRunManager();
#else
G4RunManager* runManager = G4RunManager::GetRunManager();
#endif
??
In other cases there is a typecast like
const G4Run* currentRun = G4RunManager::GetRunManager()->GetCurrentRun();
So again, Is it correct my update to
#ifdef G4MULTITHREADED
const G4Run* currentRun =
G4MTRunManager::GetRunManager()->GetCurrentRun();
#else
const G4Run* currentRun = G4RunManager::GetRunManager()->GetCurrentRun();
#endif
??
I feel I am missing something here, however the code compiles fine but the
error
[G4-cerr]
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Run3011
issued by : G4MTRunManager::SetUserAction()
For multi-threaded version, define G4UserEventAction in
G4VUserActionInitialization.
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------
[G4-cerr]
[G4-cerr] *** G4Exception: Aborting execution ***
remains on launching Gate
Regards
Alex
2015-04-01 3:49 GMT-04:00, Marc Verderi <verderi at in2p3.fr>:
> Hi Alex,
>
> The part you wrote in the GateActionInitialization class in fine to me.
> I suspect that the problem (please remember I don't know GATE code) may
> come from:
>
> new GateUserActions( runManager, myRecords );
>
> given the runManager is passed to the class, it may set the event action
> internally, using the non-MT methods ?
>
> Cheers,
> Marc
>
_______________________________________________ Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
More information about the Gate-users
mailing list