Message: Untitled Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Untitled 

Forum: Event and Track Management
Date: 08 Jul, 2011
From: Victor <Victor>

--bcaec548a0b92db8dd04a797c757
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have been trying to learn to UserEventInformation Class since it
simplifies the collection of data per event.
But I ran into a small problem :

In eventAction::EndOfEvent I get the pointer to user information by
(MyUserEventInformation*)G4EventManager::GetEventManager()
->GetUserInformation()
I update the information in that member function. And later in the end of
the run, I grab the collection of all events and go through each one.
But when I try to output, for example:

userInfo =
(UserEventInformation*)(*aRun->GetEventVector())[i]->GetUserInformation()
G4cout << userInfo->GetNumberPhotons_Produced();

It gives me a sementation fault. Could someone please clarify what I'm doing
wrong in here?
I just wanted to output the data into the file in the end of run, going
through the collection of all events. I thought that since I can access the
collection of all events, I can access information for each event. As I
understand each event has its own UserEventInformation pointer.

Thanks a lot.
Victor.

--bcaec548a0b92db8dd04a797c757
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi, <br><br>I have been trying to learn to UserEventInformation Class since=
 it simplifies the collection of data per event.<br>But I ran into a small =
problem : <br><br>In eventAction::EndOfEvent I get the pointer to user info=
rmation by (MyUserEventInformation*)G4EventManager::GetEventManager()<br>
-&gt;GetUserInformation()<br>I update the information in that member functi=
on. And later in the end of the run, I grab the collection of all events an=
d go through each one.<br>But when I try to output, for example:<br><br>
userInfo =3D (UserEventInformation*)(*aRun-&gt;GetEventVector())[i]-&gt;Get=
UserInformation()<br>G4cout &lt;&lt; userInfo-&gt;GetNumberPhotons_Produced=
();<br><br>It gives me a sementation fault. Could someone please clarify wh=
at I&#39;m doing wrong in here?<br>
I just wanted to output the data into the file in the end of run, going thr=
ough the collection of all events. I thought that since I can access the co=
llection of all events, I can access information for each event. As I under=
stand each event has its own UserEventInformation pointer.<br>
<br>Thanks a lot.<br>Victor.<br>

--bcaec548a0b92db8dd04a797c757--

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

1 Feedback: Re: Untitled   (Gumplinger Peter - 11 Jul, 2011)
 Add Message Add Message
to: "Untitled"

 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 ]