GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Constructors of FairHit and FairBasePoint and const
Constructors of FairHit and FairBasePoint and const [message #10603] Wed, 28 April 2010 13:52
Felix Boehmer is currently offline  Felix Boehmer
Messages: 149
Registered: May 2007
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Dear developers,

as I am currently working on the inheritance of some TPC classes from FairHit I stumbled upon a "const issue":

The constructors of FairHit and FairBasePoint take non-const references to TVector3's. This is a problem as soon as you want to implement e.g. a copy-constructor for a derived class MyClass : public FairHit that takes a const reference to MyClass as usual. If you then want to extract a data field and pass it to the constructor of FairHit, you actually need to manually remove the const-ness of that data with a cast or work around that by using the default constructor and set-functions.

Is there a reason to keep this or could we agree on changing the constructors?

Kind Regards,

Felix
Previous Topic: Processing draw_geom.C
Next Topic: CHEP 2010: deadline of the Call for Abstracts has been extended!!!
Goto Forum:
  


Current Time: Fri Oct 04 05:19:20 CEST 2024

Total time taken to generate the page: 0.00527 seconds