Message: Re: Referencing/passing sensitive detector to analysis manager Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Referencing/passing sensitive detector to analysis manager 

Forum: Event and Track Management
Re: None Referencing/passing sensitive detector to analysis manager (Bethany)
Re: Idea Re: Referencing/passing sensitive detector to analysis manager (Zach Hartwig)
Date: 31 Aug, 2012
From: Bethany <Bethany>

Hi, thank you so much for the reply! This seems to be a far better method and I'm really glad Geant provides a way to do this! I have just a few questions and then hopefully I can get this to work. So I have added the lines:
>     if(TriggerScintillatorSD){
>        ScintillatorSD *SodiumIodideSD = (ScintillatorSD *)G4SDManager::GetSDMpointer()->FindSensitiveDetector("SodiumIodideSD",false);
>        if(SodiumIodideSD){
>          // ... call your SD function here ... //
>        }

and everything seems to work until the calling of the function. I'm not really sure of what syntax would be good. The function in my SD file is called Reset, and when I call it within the SD file where it's declared, I just have "Reset();". This doesn't work to call it here (Reset is not declared in this scope). I also tried ScintillatorSD.Reset(); since this is similar to how I call functions from AnalysisManager, but it doesn't like that either, although it doesn't tell me that the function is not declared; it complains about: error: expected unqualified-id before . token. Does this mean I'm getting closer, or is there a specific way of doing this that I'm just unaware of?

Does this have anything to do with your comment to "ensure that you cast the returned SD to the your SD class"? I'm really not sure what this means, could you explain further if that's something I should check on?

Thanks so much again!

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Referencing/passing sensitive detector to analysis manager   (Zach Hartwig - 31 Aug, 2012)
 Add Message Add Message
to: "Re: Referencing/passing sensitive detector to analysis manager"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]