Message: crash during PrintAllHits() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None crash during PrintAllHits() 

Forum: Hits, Digitization and Pileup
Date: 07 May, 2013
From: Florian Zenoni <Florian Zenoni>

Dear experts,

Until now I made a proficient usage of the 2010 CERN Tutorial (
Unfortunately since several days I'm stuck on Task4c exercise 1 (, which is about Hits creation and usage. Compilation goes fine, but when I run my code, I get an error in my SDClass::EndOfEvent, precisely at hitCollection->PrintAllHits().

I do not follow exactly the geometry proposed by the tutorial, but the substance should not change too much.

You may find the Hit class here (cc): and here (hh): Lines in Print() must be replaced with something like this:
G4cout << "GasGapHit: Gap=" << layerNumber << " Edep=" << G4BestUnit(eDep,"Energy") << G4endl ;

Please find also the content of the tutorial SD class that I copied and adapted:

In my SDclass basically every function's content is commented except what is inside EndOfEvent, where the problem arises.

If you need more information please ask.
Thank you very much in advance.


 Add Message Add Message
to: "crash during PrintAllHits()"

 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 ]