It is commonly called in some circles a NTuple. A computer scientist, however, would call each row a n-tuple. In addition to the data, the NTuple has a title, and labels for each column. To uniquely identify an NTuple object in an application, it also has a unique name. The name will be a filename with the full path, if associated with a file, or some unique string if the NTuple is only in memory.
double
floating point numbers for each column. This class provides the most efficient access to the data. However, all the data is always contained in memory so if one's data set has a very large number of columns and rows it could consume lots of memory and cause the computer to do a lot of swapping.If the contents of a column is changed, the changes will be reflected in any displays using that column automatically. In same cases, re-displaying with every change might be too often, such in a data acquisition system. One can use the interval counter feature of the NTuple class to set the updating to every n-th change.
list
objects. No copy of the data is made. An empty ListTuple can be created from Python and columns of data can be added.
If the data contained by the Python list
changes, they will be reflected in any displays using that column once HippoDraw has been notified changes have been made. This is not automatic since Python list
objects to not emit any notification message.
array
objects. No copy of the data is made. With this release, only rank 1 array objects is supported. As with the ListTuple class, HippoDraw needs to be notified if the data changes before it will reflected in and displays using it.Only ROOT files whose TTree objects contain TBranch objects with only one TLeaf is supported. This is a fairly common practice. If more than one TTree is in the file, then a dialog will appear on which one can select the desired TTree.
When the ROOT file is opened, the names of the TBranch objects is used as column labels, but no data is read. As a column is used, a copy of the data for that column is made.
If the TLeaf is a multiple dimension array, a new NTuple is created, which each column representing an element of the array.
HippoDraw also provided a Python interface to the ROOT files. See Using ROOT files for an example.
list
when used with an integer index, and a Python dictionary when used with column labels.These functions are used by menu items on the CanvasWindow.
They are also available to the Python extension module although it is easy enough to handle this format directly in Python. From Python one can also add new columns, and replace the data in existing columns. In each case, a copy of the data is made. One can also add to the data set by adding a row.
Mark II Z0 scan Energy Sigma binsize error 90.73999786 29 0.25999999 5.9000001 91.05999756 30 0.23 3.1500001 91.43000031 28.39999962 0.25999999 3 91.5 28.79999924 0.28999999 5.80000019 92.16000366 21.95000076 0.22 7.9000001 92.22000122 22.89999962 0.25 3.0999999 92.95999908 13.5 0.20999999 4.5999999 89.23999786 4.5 0.28 3.5 89.98000336 10.80000019 0.27000001 4.5999999 90.34999847 24.20000076 0.25999999 3.5999999
The first line is the title. It can contain any number of spaces and is terminated by the new line character. The second line contains the labels. You can't see it but they are separated by the tab character to allow blanks to be in the labels. The remaining lines are the data, row by row. Any white space can separate the data.