GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
virtual UInt_t ADF::Signal::GetLast ( ) const
inlinevirtualinherited

Return the real last position used.

When asking for a given value in the array, one may ask for out of range values. To avoid throwing exceptions (even if it could be better), the first value is always return in case of out of range. To check if you get the value you want:

Signal s(10u);
s.Set(1,1u); // s.GetLast() = 1
Double_t d = s.Get(d,9); // s.GetLast() = 9
s.Set(-2,11u) = -2. // s.GetLast() = 9 !! not 11

Definition at line 376 of file Signals.h.