Hi Rene,
What I have done is made an interface to a series of digital to analog devices. The interface allows the user to obtain a time series and manipulate it with fft etc.
I used to allocate arrays seperately and then call Tgraph at the end of the process. After looking at the code, I noticed that when TGraph is called with a number, some large arrays are allocated. It seemed better from a coding standpoint to let TGraph manage the arrays and fill them. It appears to allocate quite a bit and only plot what has been filled. Hence the message before was pretty handy.
I’d rather do a set after increasing the size such that if a memory allocation needs to occur it won’t occur during he middle of an acquisition.
TGraph::SetPoint double the current number of allocated points in case you try to set a point outside the current allocation.
You can tune this process by calling, eg TGraph::Expand(newsize,step)