1 DATABASE
  Syntax: DATABASE DB_HISTORY|DB_SNAP

  Interface to plotting from the L3 database. This facility should be able
  to be  easily  extended to  anyone who  uses an RZ  based  database. The
  following  detector databases are  known: FLUM, ECAL,  HCAL, TECH, MUCH,
  L3RC.

  Following the L3 database conventions years after 1999 should be
  given in the form (100 + YY), i.e. 2000 is year 100 etc.

2 DB_HISTORY
  Syntax:  DB_HISTORY[/qual] directory chan1 chan2 start stop mode [version]
  where:   qual       is PLOT|NOPLOT|PEDESTAL|NOPEDESTAL
           directory  is the full pathname (e.g. //DBFL/BGO/LED/AVG)
           chan1      is the first channel number
           chan2      is the last channel number
           start      is the starting date and time (default=today)
           stop       is the finishing date and time (default=today)
           mode       specifies the mode to plot (default is S)
                      U  plots the numbers as is
                      S  scales them by a reference entry
                         - you give the date/time
                      C  scales them by the latest entry
           version    is the FLUM database version or
                      specifies the detector part for the ECAL database

  Plots one or more elements of a database vs. time.  The default
  qualifiers are `/PLOT/NOPEDESTAL'. You can use the `SET TIME'
  command to specify which mode to store the data (default is
  days). In the future you will be able to set the plotting mode
  (`DATE' or `TIME'). For now if no x label has been given the
  reference time will be shown (i.e. T=0 on the plot).

  If you give more than 1 channel they will be averaged. All times
  should be given in the form `yYYMMDD.HHMMSS'. Year 2000 should be
  given as 100 etc. The default starting time and finishing times are
  the current time. If you want the database entries prior to some
  time, give that time first and the number of days, months, years
  before as a negative number. e.g. 0 -20 will get the database
  entries for the past 20 days and 941030 -100 will get the database
  entries between 940930 and 941030. If the time is omitted it is
  000000 by default.

  You can plot the data as is or scaled by either a reference entry, for
  which you give the date and time, or the latest entry.

  The version number is required for the ECAL database and optional
  for all the others.

  The ECAL database has a separate bank for each of the half-barrels
  and each of the endcaps. The version number is in the form kji where:

  k =  0  means get the top-level data (e.g. the pedestals)
    =  1  means get the data from the down link (e.g. the pedestal widths)
  j =  0  means low energy data
    =  1  means low energy data
    =  2  means high energy data
  i = -1  means get the -Z detector data (barrel + endcap)
    = -2  means get the +Z detector data (barrel + endcap)
    =  0  means get all the data - does not work!
    =  1  means get the data for -Z half-barrel
    =  2  means get the data for +Z half-barrel
    =  3  means get the data for -Z endcap 1
    =  4  means get the data for +Z endcap 2

  For example version 111 for directory //DBEC/ELECTRONICS/PEDESTALS/BEAM
  will get the pedestals widths for the -Z half-barrel, for the low
  energy range of the Level-1 board. i=0,-1 and -2 do not work yet,
  nor does pedestal subtraction.

  The channel number for the ECAL database is interpreted as the box number.

  The plot  is stored  in  identifier 98766  with the  current secondary
  identifier (specified with the `SET IDB' command).

2 DB_SNAP
  Syntax: DB_SNAP[/qual] directory chan1 chan2 time mode [version]
  where:  qual       is PLOT|NOPLOT|PEDESTAL|NOPEDESTAL
          directory  is the full pathname (e.g. //DBFL/BGO/LED/AVG)
          chan1      is the first channel number
          chan2      is the last channel number
          time       is the time for which you want the data
                     (default = latest)
          mode       specifies the mode to plot (default is S)
                     U  plots the numbers as is
                     S  scales them by a reference entry
                        - you give the date/time
                     P  scales them by the previous entry
                     D  gives the difference between the previous entry
                     RD gives the difference between a reference entry
                        - you give the date/time
          version    is the FLUM database version or
                     specifies the detector part for the ECAL database

  Plots part or all of the contents of a database directory. By
  default the qualifiers are `/PLOT/NOPEDESTAL'.

  Time should be given in the form (`yYYMMDD.HHMMSS'). Year 2000
  should be given as 100 etc. The default time gets you the last
  entry. You can plot the data as is or scaled by either a reference
  entry, for which you give the date and time, or the previous entry.

  The plot  is stored  in  identifier 98767  with the  current secondary
  identifier (specified with the `SET IDB' command).

  The version number is required for the ECAL database and optional
  for all the others.

  The ECAL database has a separate bank for each of the half-barrels
  and each of the endcaps. The version number is in the form kji where:

  k =  0  means get the top-level data (e.g. the pedestals)
    =  1  means get the data from the down link (e.g. the pedestal widths)
  j =  0  means low energy data
    =  1  means low energy data
    =  2  means high energy data
  i = -1  means get the -Z detector data (barrel + endcap)
    = -2  means get the +Z detector data (barrel + endcap)
    =  0  means get all the data - does not work!
    =  1  means get the data for -Z half-barrel
    =  2  means get the data for +Z half-barrel
    =  3  means get the data for -Z endcap 1
    =  4  means get the data for +Z endcap 2

  For example version -111 for directory //DBEC/ELECTRONICS/PEDESTALS/BEAM
  will get the pedestals widths for the -Z detector (half-barrel +
  endcap), for the low energy range of the Level-1 board.

  For the ECAL data base the data always gets stored in a 160x41
  2-dimensional histogram for now, so that it is easily interfaced
  with the BGEO ECAL display.
  See HELP SET PARAMETER ECAL for more details.


