DATA SELECTION REQUIREMENTS This section describes how an analysis tool can select data and events from a stream of identically structured events. We have the following requirements: Macro Language -------------- 1. The analysis tool should include a full featured macro language, as commonly understood, and as outlined below. 2. The macro language should have some understanding of events as objects, as opposed to some simpler structure, such as arrays of numbers. The analysis tool's object model should be compatible with standard object oriented programming languages, such as C++. Note that PAW's columnwise ntuple event model does not really meet this requirement. 3. The macro language should be able to extract data (as built-in data types or subobjects) from events objects for histogramming, printing, or other processing. 4. The macro language should be able to express complex mathematical expressions using event data. 5. The macro language should have debugging facilities. 6. It should be possible to interface the macro language to dynamically linked compiled high level languages, such C, C++, or Fortran. Selection --------- 7. It should be possible make decisions and to program selection criteria based on event data using data extracted by any of the above methods, so that only selected events are histogrammed, output, or subjected to some kind of further processing. 8. The analysis tool should be able to display selection criteria as text (on histograms or for printed output, etc.). I/O --- 9. The analysis tool should support its own object I/O format. 10. The anlsysis tool should include libraries that allows its object files to be read or written from compiled programs. 11. The macro language should be able to write selected event objects to one or more output streams based on arbitrary selection criteria. 12. The analysis tool should provide an object definition language and/or be able to define new object formats programmatically. 13. From the previous criteria, it should be possible within the macro language to read events in one format, convert and write them out in a different format. 14. The analysis tool should support "virtual streaming," which means that it can tag a set of selected events, and read them back, without physically writing them to a separate output stream.