next up previous contents index
Next: Performance Up: More general Ntuples: Previous: Data Compression

Storage Model

Column wise storage allows direct access to any column in the Ntuple. Histogramming one column from a 300 column CWN requires reading only 1/300 of the total data set. However, this storage scheme requires one memory buffer per column as opposed to only one buffer in total for an RWN. By default the buffer length is 1024 words, in which case a 100 column Ntuple requires 409600 bytes of buffer space. In general, performance increases with buffer size. Therefore, one should tune the buffer size (using routine HBSET) as a function of the number of columns and the amount of available memory. Highest efficiency is obtained when setting the buffer size equal to the record length of the RZ HBOOK file (as specified in the call to HROPEN). A further advantage of column wise storage is that a CWN can easily be extended with one or more new columns.

Columns are logically grouped into blocks (physically, however, all columns are independent). Blocks allow users to extend a CWN with private columns or to group relevant columns together. New blocks can even be defined after a CWN has been filled. The newly created blocks can be filled using routine HFNTB. For example, a given experiment might define a number of standard Ntuples. These would be booked in a section of the code that would not normally be touched by an individual physicist. However, with a CWN a user may easily add one or more blocks of information as required for their particular analysis.

Note that arrays are treated as a single column. This means that a CWN will behave like a RWN, with the addition of data typing and compression, if only one array of NVAR elements is declared. This is not recommended as one thereby loses the direct column access capabilities of a CWN.


next up previous contents index
Next: Performance Up: More general Ntuples: Previous: Data Compression

Janne Saarela
Tue May 16 09:09:27 METDST 1995