GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Bug in PndEmcHitProducer
Re: Bug in PndEmcHitProducer [message #10533 is a reply to message #10529] Wed, 14 April 2010 20:01 Go to previous messageGo to previous message
Elwin Dijck
Messages: 16
Registered: June 2009
Location: Groningen, The Netherland...
occasional visitor
From: *
Hi all,

I don't think there was any problem with undefined values: if you try to access an element in a std::map that is not in the map using the []-operator, that element will be added with its default value. The default 'constructor' float() is not undefined and will simply give 0.0, so the usage of fTrackEnergy with += will work properly without explicit initialization.

However it is indeed true that fTrackTime needs initialization here, in the old code the result would always be the default value of zero since point_time is never < 0.

Read Message
Read Message
Read Message
Read Message
Previous Topic: *** glibc detected *** double free or corruption (out): 0x0a0c66f0 ***
Next Topic: Genfit server is down
Goto Forum:

Current Time: Tue Mar 05 16:09:27 CET 2024

Total time taken to generate the page: 0.01180 seconds