User Tools

Site Tools


root.documents

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

root.documents [2010/08/04 17:44] (current)
jochen created
Line 1: Line 1:
 +====== root.Documents ======
  
 +===== Motivation =====
 +The reason why I wanted this method is to have an additional interface to access already loaded documents (from within scripts) without being given there handles. The method closely works together with the [[root.Document]] method--please also read this page...
 +
 +===== Method reference ('​root.Help('​Documents'​)'​) =====
 +<​file>​ ROOT::​Documents ​ - get list of "​Documents"​ (VB-Style interface)
 + 
 + ​FORMAT: ​      ​[docs,​ doct] = xff.Documents([type]);​
 + 
 + Input fields:
 + 
 +       ​type ​       if given, must be one of the valid 3/4 char types
 +                   or a regexpi list of types '​(ext1|ext2|ext3)'​
 + 
 + ​Output fields:
 + 
 +       ​docs ​       currently loaded documents
 +       ​doct ​       file types of loaded documents</​file>​
 +
 +===== Examples =====
 +To get a list of handles to all documents currently loaded by the xff class, a call without arguments can be used:
 +
 +<code matlab xff_root_documents_all.m>​% get root object handle
 +root = xff;
 +
 +% get handles to all documents
 +handles = root.Documents;</​code>​
 +
 +To further restrict the selection, you can give one extension, such as vmr:
 +
 +<code matlab xff_root_documents_vmrs.m>​% get root object handle
 +root = xff;
 +
 +% get handles to all VMR documents
 +vmrs = root.Documents('​vmr'​);</​code>​
 +
 +And to get documents of one of several types, a regular expression can be used:
 +
 +<code matlab xff_root_documents_maps.m>​% get root object handle
 +root = xff;
 +
 +% get handles to all statistical objects
 +stats = root.Documents('​(glm|vmp)'​);</​code>​
root.documents.txt ยท Last modified: 2010/08/04 17:44 by jochen