JG ROOT Tools libraries  version 5.0 - august 2014
RTreeFunctions.hh File Reference
#include "RBaseFunctions.hh"
#include <TTree.h>
#include <TBranch.h>
#include <TLeaf.h>
#include <TTreeFormula.h>
#include <TList.h>

Go to the source code of this file.

Functions

TTree aliases and conditions
bool RIsTreeFormula (TTree &tree, const string &variable)
 
TTreeFormula * RGetTreeFormula (TTree &tree, const string &variable)
 
int RGetTreeValue (TTree &tree, const string &variable, double &value)
 
string RTreeSelectEq (const string &leaf, const double val, const double prec=0.001)
 

Detailed Description

Include file for functions related to ROOT TGraph class.

Function Documentation

bool RIsTreeFormula ( TTree &  tree,
const string &  variable 
)

Return true if the variable is a formula of the TTree.

Parameters
treethe TTree object
variablename of the variable to check

Referenced by RGraphFromTree().

TTreeFormula* RGetTreeFormula ( TTree &  tree,
const string &  variable 
)

Create a formula from a TTree alias. The returned pointer is NULL if the variable is not an alias.

Parameters
treethe TTree object
variablename of the aliased variable

Referenced by RGetTreeValue(), and RGraphFromTree().

int RGetTreeValue ( TTree &  tree,
const string &  variable,
double &  value 
)

Get the value of the variable (leaf or formula) of the TTree. Returns 0 if no error occured.

Parameters
treethe TTree object
variablename of the variable to check
valuethe variable value (as function output)

References RGetTreeFormula().

string RTreeSelectEq ( const string &  leaf,
const double  val,
const double  prec 
)

Create a selection string (for TTree) for an equality condition of a floating variable, built from ">" and "<" conditions, to avoid strict equality problems with floating values.

Parameters
leafname of the data (TTree leaf)
valfloating value
precprecision of the comparison

Referenced by RGraphSerieFromTree().