1 ROOT_FETCH
  Syntax: FETCH tid1[:id1][,id2[:tid2]]
  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.
  
  At present (Mn_Fit version v5_06) 1-D, 2-D and 3-D histograms can be
  fetched. No check is made on whether the histograms have equally spaced
  bins. Profile plots cannot yet 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.

  Note that Mn_Fit calculates the number of entries, the lower and upper
  limits on the number of entries, as well the as mean and RMD for each axis
  fromt he 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: To fetch all histograms give the command `ROOT_FETCH
  0'. To specify a range of histograms give the command `ROOT_FETCH id1:id2'.

  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 `ZDIR' 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'.

2 Examples

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

     This command does not work yet!

!\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}


