TGraph::TGraph(Int_t n, Float_t *x, Float_t *y)
: TNamed("Graph","Graph"), TAttLine(), TAttFill(), TAttMarker()
{
//*-*-*-*-*-*-*-*-*-*-*Graph normal
constructor-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-* ========================
if (n <= 0) {
Error("TGraph", "illegal number of points (%d)", n);
return;
}
fFunctions = new TList(this);
fHistogram = 0;
fNpoints = n;
fX = new Float_t[n];
fY = new Float_t[n];
fMaximum = -1111;
fMinimum = -1111;
if (!x || !y) return;
for (Int_t i=0;i<n;i++) {
fX[i] = x[i];
fY[i] = y[i];
}
}
It looks to me as if the contructor checks if `x' and `y' are NULL
pointers (?). This would be quite nice if they were also default
arguments, such that I can construct a TGraph, without given x and y.
However, in the header file I cannot find the default arguments. Is there
something wrong? Is it alright if I just add default arguments in the
headerfile ?
Regards,
Wouter