AliRoot Core  3dc7879 (3dc7879)
qatpcAddMetadata.C File Reference
#include "TTree.h"
#include "TPRegexp.h"
#include "TList.h"
#include "AliTreePlayer.h"
#include "TStatToolkit.h"
Include dependency graph for qatpcAddMetadata.C:

Go to the source code of this file.

Functions

void addTPCAliases (TTree *tree)
 
void addHtmlMetadata (TTree *tree)
 
void qatpcAddMetadata (TTree *tree, Int_t verbose)
 

Function Documentation

void addHtmlMetadata ( TTree *  tree)

Definition at line 107 of file qatpcAddMetadata.C.

Referenced by qatpcAddMetadata().

void addTPCAliases ( TTree *  tree)

Append QA TPC metadata decribing tree structure, and annotating branche variables. Partialy inspired by CSS (https://de.wikipedia.org/wiki/Cascading_Style_Sheets) but not full functionality implemented

Instead of the manual entering all metadatas, arrays of regular expressions defining classes of variables – kineVariablesClass – qaVariableClass – statClassClass – categoryClass

varName.class=<statClass>+<kineVariableClass>+<qaVariableClass>+<categoryClass>+<Class:>

Examples: dcar_negC_1_Err.class: TPC Err FitGX DCAr CSide Neg dcar_negC_1_Err.Title: #sigma x_{G} DCAr C side Q<0 meanMIPvsSector..class: TPC Mean dEdx Sector Class:TVectorT<double> meanMIPvsSector.Title: mean dEdx Sector

Work in progress: include other types of metadata – automatic html metadata – markers and colors for predefined variable (charge, side?) – automatic parser of aliases ?

Usage and debugging of metadata setting:

1.) Metadata can be setup invoking macro: AliExternalInfo info; TTree * tree = info.GetTree("QA.TPC","LHC15o","cpass1_pass1","QA.TPC;QA.TRD;QA.TOF;QA.ITS;QA.EVS;Logbook.detector"); .x $AliRoot_SRC/STAT/Macros/qatpcAddMetadata.C+(tree,4)

 2.) Macro can be executed automatically if proper configuration file leaded AliExternalInfo.cfg - see line:
     QA.TPC.metadataMacro $ALICE_ROOT/STAT/Macros/qatpcAddMetadata.C+

 3.) Printing all metadata:
     a.) 

AliTreePlayer::selectMetadata(tree, "[class==\""]",0)->Print();

3.) Example query particular info: AliTreePlayer::selectMetadata(tree, "[class==\"DCAr&&!Err&&!CHI2"]",0)->Print(); AliTreePlayer::selectMetadata(tree, "[class=="DCAr&&Err"]",0)->Print(); AliTreePlayer::selectMetadata(tree, "[class=="DCAz"]",0)->Print();

AliTreePlayer::selectMetadata(tree,"[class==DCAr&&!Pos&&!Neg",0).Print(); alternative ((TObjArray*)(tree->GetUserInfo()->FindObject("metaTable"))).Print("",TPRegexp("dca.*class"))

Definition at line 58 of file qatpcAddMetadata.C.

Referenced by qatpcAddMetadata().

void qatpcAddMetadata ( TTree *  tree,
Int_t  verbose 
)

Definition at line 120 of file qatpcAddMetadata.C.