![]() |
AliRoot Core
3dc7879 (3dc7879)
|
Set of functions to extend functionality of the TTreePlayer. More...
#include <AliTreePlayer.h>
Public Types | |
enum | TStatType { kUndef =-1, kEntries, kSum, kMean, kRMS, kMedian, kLTM, kLTMRMS, kMedianLeft, kMedianRight, kMax, kMin } |
Public Member Functions | |
AliTreePlayer () | |
AliTreePlayer (const char *name, const char *title) | |
Static Public Member Functions | |
static TObjArray * | selectMetadata (TTree *tree, TString query, Int_t verbose, TString *idList=NULL) |
static TObjArray * | selectTreeInfo (TTree *tree, TString query, Int_t verbose) |
static Int_t | selectWhatWhereOrderBy (TTree *tree, TString what, TString where, TString orderBy, Int_t firstentry, Int_t nentries, TString outputFormat, TString outputName) |
static TString | printSelectedTreeInfo (TTree *tree, TString infoType, TString regExpFriend, TString regExpTag, Int_t verbose) |
static TObjArray * | MakeHistograms (TTree *tree, TString hisString, TString defaultCut, Int_t firstEntry, Int_t lastEntry, Int_t chunkSize=-1, Int_t verbose=1) |
static TPad * | DrawHistograms (TPad *pad, TObjArray *hisArray, TString drawExpression, TObjArray *keepArray=0, Int_t verbose=0) |
static void | MakeCacheTree (TTree *tree, TString varList, TString outFile, TString outTree, TCut selection, Int_t nEntries=-1, Int_t firstEntry=0) |
Fill tree with information specified in varList of TTreeFormulas Used to cache CPU consuming formulas In case input tree is "flat" - not array output tree can be used as a friend .... More... | |
template<typename T > | |
static Long64_t | BinarySearchSmaller (Long64_t n, const T *array, T value) |
static Int_t | GetStatType (const TString &stat) |
static void | AddStatInfo (TTree *treeLeft, TTree *treeRight, const TString refQuery, Double_t deltaT, const TString statString="median:medianLeft:medianRight:RMS:Mean:LTM0.60:LTMRMS0.60:Max:Min", Int_t maxEntries=100000000) |
static TTree * | LoadTrees (const char *inputDataList, const char *chRegExp, const char *chNotReg, TString inputFileSelection, TString axisAlias, TString axisTitle) |
LoadTrees and and append friend trees. More... | |
Set of functions to extend functionality of the TTreePlayer.
select function - export to (json, csv, html, JIRA) + metadata (not yet implemented)
See example usage in the test macro AliTreePlayerTest.C
Definition at line 94 of file AliTreePlayer.h.
Enumerator | |
---|---|
kUndef | |
kEntries | |
kSum | |
kMean | |
kRMS | |
kMedian | |
kLTM | |
kLTMRMS | |
kMedianLeft | |
kMedianRight | |
kMax | |
kMin |
Definition at line 107 of file AliTreePlayer.h.
|
inline |
Definition at line 96 of file AliTreePlayer.h.
AliTreePlayer::AliTreePlayer | ( | const char * | name, |
const char * | title | ||
) |
Dummy AliTreePlayerConstructor
name | |
title |
Definition at line 184 of file AliTreePlayer.cxx.
|
static |
treeLeft | |
treeRight | |
refQuery | |
deltaT | |
statString | |
maxEntries |
Definition at line 909 of file AliTreePlayer.cxx.
|
static |
Binary search in an array of n values to locate value. Array is supposed to be sorted prior to this call.
T | - template (float,double,int ..) |
n | - size of array |
array | - pointer to raw array |
value | - value to find |
Definition at line 142 of file AliTreePlayer.h.
Referenced by AddStatInfo().
|
static |
Definition at line 1324 of file AliTreePlayer.cxx.
Referenced by makeP4Report().
|
static |
Get the enumeration type from a string
stat | - enumuration tyle as a string |
Definition at line 871 of file AliTreePlayer.cxx.
Referenced by AddStatInfo().
|
static |
LoadTrees and and append friend trees.
inputDataList | - command returning input data list - line with #tag:value for the metadata definition |
chRegExp | - regular expression - trees to include |
chNotReg | - regular expression - trees to exclude |
inputFileSelection | - : separated input file selection |
axisAlias | - axis names |
axisTitle | - axis titles |
read metadata #tag:value information - signed by # at the beginning of the line
add metadata to all files ....
Definition at line 1587 of file AliTreePlayer.cxx.
|
static |
Fill tree with information specified in varList of TTreeFormulas Used to cache CPU consuming formulas In case input tree is "flat" - not array output tree can be used as a friend ....
tree | - TTree with input |
varList | - list of TTreeFormulas to export |
outFile | - output file name |
outTree | - output tree name |
selection | - tree selection |
firstEntry | - first entry to export |
nEntries | - number of nEntries to export |
Definition at line 1551 of file AliTreePlayer.cxx.
Referenced by cacheTree().
|
static |
Create list of histograms specified by selection Should be rough equivalent of the "ALICE train" TTree->Draw(); a.) Data are read only once b.) values expression are reused (evaluated only once) c.) Axis labelling and names of variables extracted from the tree metadata (.AxisTitle)
tree | - input tree |
hisString | - selection string |
defaultCut | - default selection applied common for all histograms (can be empty) |
firstEntry | - first entry to process |
lastEntry | - last entry to process |
chunkSize | - chunk size |
verbose | - verbosity |
Definition at line 1118 of file AliTreePlayer.cxx.
|
static |
tree | - input master tree pointer |
infoType | - array in which information is queried - "branch" "alias" "metaData" and logical or |
regExpFriend | - regular expression patter, where to seek (default empty - master tree) |
regExpTag | - regular expression tag to be queried - use non case sensitive Contain ( use as ^regExpTag$ to get full match ) |
verbose | - verbosity flag |
Definition at line 427 of file AliTreePlayer.cxx.
|
static |
Selected metadata fil filing query retun TObjArray of selected metadata
tree | |
query | |
verbose |
Example usage:
Definition at line 210 of file AliTreePlayer.cxx.
Referenced by drawLogbook(), logbookAddMetadata(), qaitsAddMetadata(), qatpcAddMetadata(), qatrdAddMetadata(), testSelectMetadata(), and TPCDataVolumeDemo().
|
static |
Find all branches containing "Data string" and having class base search follow only branches - does not not enter into classes == - for exact match : - for contain Implemented using TFormula interpreter:
tree | - input tree |
query | - query string |
verbose | - verbosity |
Definition at line 310 of file AliTreePlayer.cxx.
Referenced by testselectTreeInfo().
|
static |
tree | - input tree |
what | - variables to export (any valid TTree formula or class (in case ob JSON export)) |
where | - selection criteria as in the TTree::Draw |
firstentry | - first entry in tree to export |
nentries | - number of entries to |
outputFormat | - output format (csv,json, elastic json - for bulk export,html table) |
outputName |
Definition at line 504 of file AliTreePlayer.cxx.
Referenced by CheckProductions(), ExportMCAnchorJSON(), makeHTMLPage(), testConvertTree(), testExportBinary(), testExportClass(), and testselectWhatWhereOrderByForTRD().