The tree structure of FARFALLA data is ideal for a very modular style of physics analysis programs. A single FARFALLA tree may be constructed in memory and then read or manipulated by many small, simple routines. Some routines add to the tree - they may put raw data onto the tree, or they may do some reconstruction calculations and add reconstructed data to the tree. In some applications, there may be routines that remove nodes from the tree - perhaps all vertical scintillator box hits will be removed, or all tracks less than 2 m long. Finally, there will be routines that locate the data they want in the tree and perform some simple analysis task - perhaps filling a histogram or ntuple, or accumulating data for a running average. Most routines will be only a page or two long, and may be shared among users. (Incidentally, Ed Kearns' DASH package provides the ideal environment for this style of analysis.)
In MACRO, usually a FARFALLA tree will represent one MACRO event. The tree may be created by a DREAM job, which will put raw data and data reconstructed by standard DREAM routines onto the tree and then write the tree to disk. The resulting disk file can be considered a Data Summary Tape (DST). As explained in the FARFALLA User Guide, there may be a number of different FARFALLA DSTs produced by MACRO collaborators at different sites, each with a different choice of what data to write to disk and what data to throw away. For a given site, there may be one FARFALLA DST file for every run. The file will contain a large number of FARFALLA trees, each one representing a single event.
Once the DST file has been written to disk, it may be analyzed many times by many different users. There exists a FARFALLA routine to read one tree off of disk and recreate the tree in memory exactly as it was in the program that wrote it to disk. Once the tree is in memory, user routines may add nodes, remove nodes or do analysis on information in the tree.
These ideas are not unique to FARFALLA. Note that everything in this section would be just as valid if we had chosen to use ZEBRA instead of FARFALLA as our memory-management/input-output package.