Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
_tdirectory.pyzdoc
Go to the documentation of this file.
1\pythondoc TDirectory
2
3It is possible to retrieve the content of a TDirectory object
4just like getting items from a Python dictionary.
5Moreover, once a subdirectory or object is accessed for the first time,
6it is cached for later use.
7For example, assuming `d` is a TDirectory instance:
8\code{.py}
9# Access a subdirectory
10d["subdir"]
11
12# We can go further down in the hierarchy of directories
13d["subdir"]["subsubdir"]
14
15# Access an object (e.g. a histogram) in the directory
16d["obj"]
17
18# ... or in a subdirectory
19d["subdir"]["obj"]
20
21# Wrong key: raises KeyError
22d["wrongAttr"]
23\endcode
24
25Furthermore, TDirectory implements a `WriteObject` Python method which relies
26on TDirectory::WriteObjectAny. This method is a no-op for TDirectory objects,
27but it is useful for objects of TDirectory subclasses such as TDirectoryFile
28and TFile, which inherit it. Please refer to the documentation of those classes
29for more information.
30
31\endpythondoc
#define d(i)
Definition RSha256.hxx:102
#define a(i)
Definition RSha256.hxx:99
static void retrieve(const gsl_integration_workspace *workspace, double *a, double *b, double *r, double *e)
static Roo_reg_AGKInteg1D instance
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
A ROOT file is structured in Directories (like a file system).
Describe directory structure in memory.
Definition TDirectory.h:45
virtual Int_t WriteObjectAny(const void *, const char *, const char *, Option_t *="", Int_t=0)
Definition TDirectory.h:300
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
TString as(SEXP s)
Definition RExports.h:86