ATLAS Offline Software
|
Functions | |
def | _invalidName (flags, name) |
Check if name is an allowed histogram/branch name. More... | |
def | _alias (varname) |
Generate an alias for a set of variables. More... | |
def | _validateOptions (user, default) |
Validate user inputs for "opt" argument of defineHistogram. More... | |
def | _options (opt) |
Generate dictionary entries for opt strings. More... | |
def | defineHistogram (flags, varname, type='TH1F', path=None, title=None, weight=None, xbins=100, xmin=0, xmax=1, xlabels=None, ybins=None, ymin=None, ymax=None, ylabels=None, zmin=None, zmax=None, zlabels=None, opt=None, convention=None, cutmask=None, treedef=None, merge=None) |
Generate histogram definition string for the GenericMonitoringTool.Histograms property. More... | |
def | defineTree (flags, varname, treedef, path=None, title=None, opt='', convention=None, cutmask=None) |
Generate tree definition string for the GenericMonitoringTool.Histograms property. More... | |
|
private |
Generate an alias for a set of variables.
A helper function is useful for this operation, since it is used both by the module function defineHistogram, as well as by the GenericMonitoringArray defineHistogram member function.
varname | unparsed |
Definition at line 199 of file GenericMonitoringTool.py.
|
private |
Check if name is an allowed histogram/branch name.
Certain characers are best avoided in ROOT histogram names as it makes interactive use awkward. Also there are additional constraints from OH and MDA archiving for online running (ATR-15173).
flags | configuration flags |
name | string to check |
Definition at line 185 of file GenericMonitoringTool.py.
|
private |
Generate dictionary entries for opt strings.
opt | string or dictionary specifying type |
Definition at line 238 of file GenericMonitoringTool.py.
|
private |
Validate user inputs for "opt" argument of defineHistogram.
Check that the user-provided option for a specific "opt" argument exists in the default dictionary, and that it has the expected type.
user | the option dictionary provided by the user |
default | the default dictionary of options |
Definition at line 218 of file GenericMonitoringTool.py.
def GenericMonitoringTool.defineHistogram | ( | flags, | |
varname, | |||
type = 'TH1F' , |
|||
path = None , |
|||
title = None , |
|||
weight = None , |
|||
xbins = 100 , |
|||
xmin = 0 , |
|||
xmax = 1 , |
|||
xlabels = None , |
|||
ybins = None , |
|||
ymin = None , |
|||
ymax = None , |
|||
ylabels = None , |
|||
zmin = None , |
|||
zmax = None , |
|||
zlabels = None , |
|||
opt = None , |
|||
convention = None , |
|||
cutmask = None , |
|||
treedef = None , |
|||
merge = None |
|||
) |
Generate histogram definition string for the GenericMonitoringTool.Histograms
property.
For full details see the GenericMonitoringTool documentation.
flags | configuration flags object |
varname | one (1D) or two (2D) variable names separated by comma optionally give histogram name by appending ";" plus the name |
type | histogram type |
path | top-level histogram directory (e.g. EXPERT, SHIFT, etc.) |
title | Histogram title and optional axis title (same syntax as in TH constructor) |
weight | Name of the variable containing the fill weight |
cutmask | Name of the boolean-castable variable that determines if the plot is filled |
opt | String or dictionary of histogram options (see _options()) |
treedef | Internal use only. Use defineTree() method. |
xlabels | List of x bin labels. |
ylabels | List of y bin labels. |
zlabels | List of x bin labels. |
merge | Merge method to use for object, if not default. Possible algorithms for offline DQM are given in https://twiki.cern.ch/twiki/bin/view/Atlas/DQMergeAlgs |
Definition at line 306 of file GenericMonitoringTool.py.
def GenericMonitoringTool.defineTree | ( | flags, | |
varname, | |||
treedef, | |||
path = None , |
|||
title = None , |
|||
opt = '' , |
|||
convention = None , |
|||
cutmask = None |
|||
) |
Generate tree definition string for the GenericMonitoringTool.Histograms
property.
Convenience tool for
For full details see the GenericMonitoringTool documentation.
flags | configuration flags object |
varname | at least one variable name (more than one should be separated by comma); optionally give the name of the tree by appending ";" plus the tree name |
treedef | TTree branch definition string. Looks like the standard TTree definition (see https://root.cern.ch/doc/master/classTTree.html#addcolumnoffundamentaltypes). In fact if only scalars are given, it is exactly the same as you would use to define the TTree directly: "varA/F:varB/I:...". Vectors can be defined by giving "vector<int>", etc., instead of "I". |
path | top-level histogram directory (e.g. EXPERT, SHIFT, etc.) |
title | Histogram title and optional axis title (same syntax as in TH constructor) |
cutmask | Name of the boolean-castable variable that determines if the plot is filled |
opt | TTree options (none currently) |
convention | Expert option for how the objects are placed in ROOT |
Definition at line 491 of file GenericMonitoringTool.py.