1 ROOT_FETCH
  Syntax: ROOT_FETCH tid1[;id1][,tid2[;id2]]
      or  ROOT_FETCH 0
      or  ROOT_FETCH id1:id2
  where   tid1,tid2  are the root histogram identifiers
          id1,id2    are the (optional) Mn_Fit identifiers to use.

  Fetches ROOT histograms from a file. Note that you must use the command
  `ROOT_OPEN' to open the file before trying to fetch some histograms.
  
  1-D, 2-D and 3-D histograms and prifle plots (1-D and 2-D) can be
  fetched. Ntuples cannot be fetched.

  ROOT histograms have string rather than integer identifiers. If the
  identifiers is of the for `h102', etc. then the first character will be
  stripped and the identifier converted to an integer. If the identifier is a
  string you can specify the integer identifier that it should be given using
  the syntax `tid;id'. At present, if you want to use a register of something
  for the identifier you have to use the `PARSE' command - see Example 4, as
  the identifier must be given as a number. You can use the `SET IDR' or `SET
  ROOT_ID' commands to give a default identifier. 
  See HELP SET IDR or SET ROOT_ID for more details.

  If you give the command `ROOT_FETCH 0' all histograms in the current ROOT
  directory will be fetched. The will be given consecutive identifiers
  starting with the 1 or the value specified in the last `SET IDR' command.

  If you want to fetch a range of histograms, then their identifiers must be
  of the form `hNNN', e.g. `h101, h1, h998'.

  Note that Mn_Fit calculates the number of entries, the lower and upper
  limits on the number of entries, as well the mean and RMS for each axis
  from the bin contents. At present it is not possible to access the root
  statistics, which are calculated also using underflows and overflows.

  If the histogram number you ask to fetch already exists it will be
  overwritten.  All the histograms will be given the default secondary
  identifier.

  NOT SUPPORTED YET: You can use the secondary identifier to specify which
  cycle to fetch from ROOT files. The cycle number will be added to the
  current setting for the secondary identifier.  Use the `LDIR' command to see
  which cycle numbers exist.

  If your histograms are in several subdirectories, you should use `SET
  DIRECTORY' or 'CDIR' command in connection with the `SET IDB' command to
  give them different secondary identifiers. See the examples. If you do not
  know the directory structure of the file use the `LDIR' and `CDIR' commands
  to list what is in the directory, before giving the `ROOT_FETCH' command.

  Note that the top level directory name for the file is `//root'. Use the
  command `CDIR //root' (`//root' is case sensitive) to get to the top-level
  directory.

2 Examples

!\begin{enumerate}
!\item
!^
  Example 1:
     Get all plots from a file:
       root_open filename
       ROOT_FETCH 0

!\item
!^
  Example 2:
     Get some plots from a file where the IDs are h101, h102 etc:
       root_fetch h101,h102,h103

!\item
!^
  Example 3:
     Get some plots from a file where the IDs are strings:
       root_fetch hpx;10,hpy;11,hpz;12

!\item
!^
  Example 3:
     Get all the plots from various subdirectories:
       ROOT_OPEN filename
       SET DIRECTORY dir1 IDB 100 ENDSET  FETCH h101,h102
       SET DIRECTORY dir2 IDB 200 ENDSET  FETCH h101,h102
       SET DIRECTORY dir3 IDB 300 ENDSET  FETCH hpx;101,hpy;102

     Note that the directory name you give is relative to the top directory.

!\item
!^
  Example 4:
     Use a `DO' loop to calculate and fetch the histograms that are
     required:
       root_open filename.root
       do i=1,10
         fetch h@i
         deposit r1 = 1000 + @i
         parse fetch h{ir1,(i4)};{ir1,(i4)}
       enddo

     The `PARSE' command is needed here, because the integer identifier must
     be given as a number.

!\end{enumerate}


