GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Bug in sigleton classes in fairbase/base
Re: Bug in sigleton classes in fairbase/base [message #9628 is a reply to message #9626] Tue, 27 October 2009 14:32 Go to previous messageGo to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi Bertram,

Thanks for having time to look into this! I know that in the design pattern book, there is this nice statement that the ctor of a singleton should be privet, and it is better to put it privet I agree. but I do not agree that you can create these classes more than once, there is protection in the ctor which prevent this, so I am wondering how could you create any of these more than once! did you try it?

the only reason that we kept this attempt to write singletons as it is that if we put the ctor as privet then you have to call always the instance so nobody can call new FairRun for example directly and this to be changed in all macros. Anyway I agree again that in the holy book of design pattern it is written that it should be privet but I do not see any problem of the protection we have and the main thing is to have a singleton that cannot be crated more than once and this is the case now. So when I will have time I will change it but now it has absolutely no priority to do this.


regards

Mohammad
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problems with integer FairTrackPar charge
Next Topic: Can't run Geane
Goto Forum:
  


Current Time: Mon Jun 17 21:55:12 CEST 2024

Total time taken to generate the page: 0.00956 seconds