TSelector

TSelector

new TSelector()

Class to read data from TTree

Source:

Instance of TSelector can be used to access TTree data

Methods

Abort()

call this function to abort processing

Source:

addBranch(branch, nameopt, directopt)

Add branch to the selector

Source:

Either branch name or branch itself should be specified Second parameter defines member name in the tgtobj If selector.addBranch('px', 'read_px') is called, branch will be read into selector.tgtobj.read_px member If second parameter not specified, branch name (here 'px') will be used If branch object specified as first parameter and second parameter missing, then member like 'br0', 'br1' and so on will be assigned

Parameters:
Name Type Attributes Description
branch string | Object

name of branch (or branch object itself}

name string <optional>

member name in tgtobj where data will be read

direct boolean <optional>

if only branch without any children should be read

(abstract) Begin(tree)

function called before start processing

Source:
Parameters:
Name Type Description
tree object

tree object

getBranch()

returns branch by index used in selector

Source:

numBranches()

returns number of branches used in selector

Source:

(abstract) Process(entry)

function called when next entry extracted from the tree

Source:
Parameters:
Name Type Description
entry number

read entry number

(abstract) ShowProgress(progress)

function called during TTree processing

Source:
Parameters:
Name Type Description
progress number

current value between 0 and 1

(abstract) Terminate(res)

function called at the very end of processing

Source:
Parameters:
Name Type Description
res boolean

true if all data were correctly processed