STEP_Propagator,Extrapolator : try to avoid a few dynamic_casts
Looking at some of the profiles produced by @amete
We seem to spend some visible time doing dynamic_cast
There are 2 visible incoming lines in the full plot, one is from the STEP_propagator, the other is from the Extrapolator. Trying to get rid of them
Also since I was adding a new method on the package I tried to ensure that it follows as much as possible the ATLAS coding style guidelines. So methods are both marked as virtual
and as override
Always re-declare virtual functions as virtual in derived classes. [redeclare-virtual]
This is just for clarity of code. The compiler will know it is virtual, but the human reader may not. This, of course, also includes the destructor, as stated in item [1]. Virtual functions in derived classes which override methods from the base class should also be declared with the override keyword. If the signature of the method is changed in the base class, so that the declaration in the derived class is no longer overriding it, this will cause the compiler to flag an error. (As an exception, override is not required for destructors. Since there is only one possible signature for a destructor, override doesn't add anything.)
class B
{
public:
virtual void foo(int);
};
class D : public B
{
public:
// Declare foo as a virtual method that overrides
// a method from the base class.
virtual void foo(int) override;
};
Edited by Christos Anastopoulos