EVDIR  -  find entries in Event Directory

Author:   Sergey Moukhine
               HERA-B Collaboration

Package EVDIR is called from package gpack only.  It is used to provide a selection criteria for events read from common (public) Event Directory or from private Notebook.

Syntax of a sentence for selecting events ("EvdirSql sentence") is a simplified and a bit changed  syntax of SQL sentences. The changes are as follows. It is possible to use two  kinds of NUMBERs: usual NUMBER and BIT_INDEX_NUMBER. The last is a NUMBER with a sign # before it. Semantic of BIT_INDEX_NUMBER: it is a value of a referenced bit in the corresponding field (usually in the classword). The least significant bit has index zero. The second difference: DATE may be presented only in a form "DD-MON-YYYY" (notice double quotation mark " instead of single quotation mark ' in SQL). Here DD is a day (2 digits), MON is a month (3 characters), YYYY is a year (4 digits).

It is important to say that the search through Event Directory will work faster if EvdirSql sentence has one of the following two forms:


or simply


Here RUN_SELECTION is a sentance containing only the keyword run and OTHEN_SELECTION_TERM has no or operator at the same level as and between RUN_SELECTION and OTHEN_SELECTION_TERM.

The following names of fields can be used in EvdirSql sentence:

        Class, Date, Time, Exp, Run, Event

These names are not case sensitive and can be shortend till the name is unambiguous.

Some examples of EvdirSql sentences
Example 1

((run = 10 or run = 20) or (run between 3 and 7)) and class = #1

This example has RUN_SELECTION part.

Example 2

run = 4377 and (Class between #1 and #15 or Date > "28-feb-1998" or Time = 23:00:01)
or Class not in (#1, #3, #5)

This example has no RUN_SELECTION part because of or before the last Class.