Message: Re: Writing output Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Writing output  

Forum: Analysis
Re: Question Writing output (Pradip Datta)
Date: 14 May, 2009
From: Paul Nicholas Colin Gloster <Paul Nicholas Colin Gloster>

On Thu, 14 May 2009, Pradip Datta wrote:

|--------------------------------------------------------------------------------|
|"[..] For this purpose I have modified                                          |
|the novice prog N02. If I set the tracking verbosity to "1", I am               |
|getting output about the energy deposition, copy no of the segment and          |
|other outputs listed in ExN02SteppingVerbose.cc (I have add only one            |
|line to extract the information about the segment no). Now I would like         |
|to write the energy and segment no in a output file. To be specific, I          |
|would like to generate a zero suppressed unformatted binary data file           |
|for further analysis.                                                           |
|                                                                                |
|I have little understanding (I admit) about the architecture and the            |
|data flow between the hits and events in Geant4. Such limited knowledge         |
|really makes it difficult for me decide where should I include the              |
|fwrite statement to write the data.                                             |
|                                                                                |
|Probably, I can always do it in SteppingVerbose.cc file within the              |
|tracking verbosity=1 loop. In that case, I have to comment all the G4out        |
|statement in side the tracking verbosity=1 loop to avoid writing in             |
|stdout instead I should include                                                 |
|                                                                                |
|fwrite(.....fStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber()....)|
|                                                                                |
|and                                                                             |
|                                                                                |
|fwrite(....fStep->GetTotalEnergyDeposit()......)                                |
|                                                                                |
|But I don't thinks this is the correct way to do this job. I really need        |
|an expert advise about my problem. Thus, I appreciate any sorts of              |
|input."                                                                         |
|--------------------------------------------------------------------------------|

An alternative method which you can exploit is
void ExN02SteppingAction::UserSteppingAction(const G4Step*)
in  ExN02SteppingAction.cc  and another is
G4bool ExN02TrackerSD::ProcessHits(G4Step* aStep,G4TouchableHistory*)
in  ExN02TrackerSD.cc  .

With kind regards,
Paul Colin Gloster

 Add Message Add Message
to: "Re: Writing output "

 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 ]