Constructors of FairHit and FairBasePoint and const [message #10603] |
Wed, 28 April 2010 13:52 |
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
|
|
|