4 #include "KVTreeAnalyzer.h"
19 #include "KVFileDialog.h"
20 #include "KVDalitzPlot.h"
23 #include <KVHistogram.h>
27 #include "KVNameValueListGUI.h"
41 #define MAX_COLOR_INDEX 5
42 Int_t my_color_array[] = {
60 void KVTreeAnalyzer::init()
65 fgAnalyzerList->Add(
this);
66 fDeletedByGUIClose =
kFALSE;
71 fMain_selectionlist = 0;
73 SetAnalysisModifiedSinceLastSave(kFALSE);
74 fAnalysisSaveDir =
".";
75 fPROOFEnabled =
false;
77 fDrawSame = fApplySelection = fProfileHisto =
kFALSE;
78 fDrawLog =
gEnv->
GetValue(
"KVTreeAnalyzer.LogScale", kFALSE);
79 fUserBinning =
gEnv->
GetValue(
"KVTreeAnalyzer.UserBinning", kFALSE);
80 fUserWeight =
gEnv->
GetValue(
"KVTreeAnalyzer.UserWeight", kFALSE);
81 fNewCanvas =
gEnv->
GetValue(
"KVTreeAnalyzer.NewCanvas", kFALSE);
82 fNormHisto =
gEnv->
GetValue(
"KVTreeAnalyzer.NormalizeIntegral", kFALSE);
83 fNormHistoEvents =
gEnv->
GetValue(
"KVTreeAnalyzer.NormalizeEvents", kFALSE);
84 fStatsHisto =
gEnv->
GetValue(
"KVTreeAnalyzer.Stats", kFALSE);
90 fXmin = fXmax = fYmin = fYmax = -1.;
91 fWeight =
"1./(abs(vper))";
94 fXminF = fXmaxF = -1.;
97 fOrderedDalitz =
false;
108 :
TNamed(
"KVTreeAnalyzer",
"KVTreeAnalyzer"), fTree(0), fChain(0), fSelections(
kTRUE), fHistoNumber(1), fSelectionNumber(1), fAliasNumber(1), fNoGui(nogui)
127 :
TNamed(
"KVTreeAnalyzer", t->GetTitle()), fTree(0), fChain(0), fSelections(
kTRUE), fHistoNumber(1), fSelectionNumber(1), fAliasNumber(1), fNoGui(nogui)
148 if (!fDeletedByGUIClose)
SafeDelete(fMain_histolist);
149 if (gTreeAnalyzer ==
this) gTreeAnalyzer = 0x0;
150 fgAnalyzerList->
Remove(
this);
175 fSelections.
Copy(CastedObj.fSelections);
176 fHistolist.
Copy(CastedObj.fHistolist);
177 CastedObj.fTreeName = fTreeName;
178 CastedObj.fTreeFileName = fTreeFileName;
179 CastedObj.fHistoNumber = fHistoNumber;
180 CastedObj.fSelectionNumber = fSelectionNumber;
181 CastedObj.fAliasNumber = fAliasNumber;
182 fAliasList.
Copy(CastedObj.fAliasList);
183 CastedObj.SetAnalysisModifiedSinceLastSave(fAnalysisModifiedSinceLastSave);
184 CastedObj.fChain = fChain;
208 void KVTreeAnalyzer::GenerateHistoTitle(
TString& title,
const Char_t* expr,
const Char_t* selection,
const Char_t* weight)
231 if (strcmp(weight,
"")) {
232 if (_selection !=
"" && _elist !=
"")
233 title.
Form(
"%s [%s] {(%s) && (%s)}", expr, weight, _elist.
Data(), selection);
234 else if (_selection !=
"")
235 title.
Form(
"%s [%s] {%s}", expr, weight, selection);
236 else if (_elist !=
"")
237 title.
Form(
"%s [%s] {%s}", expr, weight, _elist.
Data());
239 title.
Form(
"%s [%s]", expr, weight);
242 if (_selection !=
"" && _elist !=
"")
243 title.
Form(
"%s {(%s) && (%s)}", expr, _elist.
Data(), selection);
244 else if (_selection !=
"")
245 title.
Form(
"%s {%s}", expr, selection);
246 else if (_elist !=
"")
247 title.
Form(
"%s {%s}", expr, _elist.
Data());
249 title.
Form(
"%s", expr);
291 name.Form(
"h%d", fHistoNumber);
292 TString drawexp(expr), histo, histotitle;
293 if (strcmp(weight,
"")) GenerateHistoTitle(histotitle, expr, selection, weight);
294 else GenerateHistoTitle(histotitle, expr, selection);
295 if ((!nY) && (fUserBinning)) {
296 if (!DefineUserBinning1F())
return nullptr;
300 if (strcmp(weight,
"")) {
301 if (strcmp(selection,
"")) Selection.
Form(
"(%s)&&(%s)", selection, weight);
302 else Selection = weight;
305 Selection = selection;
306 if (nY) histo.
Form(
">>%s(%d,%f,%f,%d,%f,%f)",
name.Data(), nX,
xmin,
xmax, nY,
ymin,
ymax);
307 else histo.
Form(
">>%s(%d,%lf,%lf)",
name.Data(), (fUserBinning ? fNxF : nX), (fUserBinning ? fXminF :
xmin), (fUserBinning ? fXmaxF :
xmax));
311 if (fProfileHisto) drawResult = fTree->
Draw(drawexp, Selection,
"prof,goff");
312 else drawResult = fTree->
Draw(drawexp, Selection,
"goff");
313 if (drawResult < 0) {
330 if (!fProfileHisto) {
331 if (fNormHisto || fNormHistoEvents) {
362 name.Form(
"Ih%d", fHistoNumber);
363 TString drawexp(expr), histo, histotitle;
364 if (strcmp(weight,
"")) GenerateHistoTitle(histotitle, expr, selection, weight);
365 else GenerateHistoTitle(histotitle, expr, selection);
368 if (!DefineUserBinning1F())
return nullptr;
371 histo.
Form(
">>%s(%d,%f,%f)",
name.Data(), (fUserBinning ? fNxF : (Xmax - Xmin) + 1),
372 (fUserBinning ? fXminF : Xmin - 0.5), (fUserBinning ? fXmaxF : Xmax + 0.5));
375 if (strcmp(weight,
"")) {
376 if (strcmp(selection,
"")) Selection.
Form(
"(%s)&&(%s)", selection, weight);
377 else Selection = weight;
380 Selection = selection;
381 Long64_t drawResult = fTree->
Draw(drawexp, Selection,
"goff");
382 if (drawResult < 0) {
399 if (fNormHisto || fNormHistoEvents) {
421 if (
h->IsType(
"Histo"))
return h->GetHisto();
468 name.Form(
"el%d", fSelectionNumber);
473 if (fChain->
Draw(drawexp, selection,
"entrylist") < 0) {
489 title.
Form(
"(%s) && (%s)", _elist.
Data(), selection);
520 SetEntryList(
nullptr);
521 G_selection_status->
SetText(
"CURRENT SELECTION:", 0);
540 if (tmp !=
"") cout <<
"CURRENT SELECTION : " << tmp << endl;
564 void KVTreeAnalyzer::FillLeafList()
585 while ((o = next())) {
605 stuff.
AddAll(&fAliasList);
615 void KVTreeAnalyzer::AnalysisSaveCheck()
620 if (!fAnalysisModifiedSinceLastSave)
return;
624 cout <<
"Analysis " <<
GetTitle() <<
" has been modified. Save before continuing? [y] : " << flush;
628 if (reply ==
'n' || reply ==
'N')
return;
629 cout <<
"Give name of file [" << fSaveAnalysisFileName <<
"] : " << flush;
631 cin.get(filename, 256);
632 if (filename[0] != 0) fSaveAnalysisFileName =
filename;
637 if (fMain_histolist) fMain_histolist->
RaiseWindow();
639 "Analysis has been modified. Save before continuing?", kMBIconStop,
640 kMBYes | kMBNo, &ret_code);
641 if (ret_code == kMBNo)
return;
642 HistoFileMenu_Save();
650 void KVTreeAnalyzer::SetAnalysisModifiedSinceLastSave(
Bool_t x)
652 fAnalysisModifiedSinceLastSave =
x;
676 void KVTreeAnalyzer::SetEntryList(
TEntryList* l)
705 ULong_t red, cyan, green, yellow, magenta, gura, gurb, gurc, gurd, gure, gurf;
706 gClient->GetColorByName(
"#ff00ff", magenta);
707 gClient->GetColorByName(
"#ff0000", red);
708 gClient->GetColorByName(
"#00ff00", green);
709 gClient->GetColorByName(
"#00ffff", cyan);
710 gClient->GetColorByName(
"#ffff00", yellow);
711 gClient->GetColorByName(
"#cf14b2", gura);
712 gClient->GetColorByName(
"#cd93e6", gurb);
713 gClient->GetColorByName(
"#c1e91a", gurc);
714 gClient->GetColorByName(
"#d1a45b", gurd);
715 gClient->GetColorByName(
"#b54cfe", gure);
716 gClient->GetColorByName(
"#a325ef", gurf);
721 fMain_histolist->
SetName(
"fMain_histolist");
731 UInt_t hWidth = 400, hHeight = 400;
735 fMenuFile->
AddEntry(
"New analysis", MH_OPEN_CHAIN);
736 fMenuFile->
AddEntry(
"Open analysis", MH_OPEN_FILE);
737 fMenuFile->
AddEntry(
"Add Friend...", MH_ADD_FRIEND);
739 fMenuFile->
AddEntry(
"Save analysis", MH_SAVE);
740 fMenuFile->
AddEntry(
"Save as...", MH_SAVE_FILE);
741 fMenuFile->
AddEntry(
"Close", MH_CLOSE);
743 fMenuFile->
AddEntry(
"Apply analysis...", MH_APPLY_ANALYSIS);
744 SetAnalysisModifiedSinceLastSave(fAnalysisModifiedSinceLastSave);
746 fMenuFile->
AddEntry(
"Quit", MH_QUIT);
747 fMenuFile->
Connect(
"Activated(Int_t)",
"KVTreeAnalyzer",
this,
"HandleHistoFileMenu(Int_t)");
750 fSelCombMenu->
AddEntry(
"AND (&&)", SEL_COMB_AND);
751 fSelCombMenu->
AddEntry(
"OR (||)", SEL_COMB_OR);
752 fMenuSelections->
AddPopup(
"Combine...", fSelCombMenu);
755 fMenuSelections->
AddEntry(
"Update", SEL_UPDATE);
756 fMenuSelections->
AddEntry(
"Delete", SEL_DELETE);
759 fSelGenerate->
AddEntry(
"Constant X-sections", SEL_GEN_CONST_XSEC);
760 fMenuSelections->
AddPopup(
"Generate...", fSelGenerate);
761 fMenuSelections->
Connect(
"Activated(Int_t)",
"KVTreeAnalyzer",
this,
"HandleSelectionsMenu(Int_t)");
763 fOptionMenu->
AddEntry(
"PROOF", OPT_PROOF);
764 fOptionMenu->
Connect(
"Activated(Int_t)",
"KVTreeAnalyzer",
this,
"HandleOptionsMenu(Int_t)");
767 fMenuBar->
AddPopup(
"&File", fMenuFile, fMenuBarItemLayout);
768 fMenuBar->
AddPopup(
"&Options", fOptionMenu, fMenuBarItemLayout);
769 fMenuBar->
AddPopup(
"&Selections", fMenuSelections, fMenuBarItemLayout);
780 UInt_t lWidth = 300, lHeight = 300;
791 G_alias_text->
Connect(
"ReturnPressed()",
"KVTreeAnalyzer",
this,
"GenerateAlias()");
801 G_leaflist->
Connect(
"SelectionChanged()",
"KVTreeAnalyzer",
this,
"LeafChanged()");
811 fMain_leaflist->
Resize(lWidth, lHeight);
817 UInt_t sWidth = 600, sHeight = lHeight;
818 fMain_selectionlist =
new TGGroupFrame(hf,
"SELECTIONS");
820 G_selection_status =
new TGStatusBar(fMain_selectionlist, sWidth, 10);
821 G_selection_status->
SetText(
"CURRENT SELECTION:", 0);
825 lab =
new TGLabel(fHorizontalFrame1614,
"Make selection : ");
831 G_selection_text->
Connect(
"ReturnPressed()",
"KVTreeAnalyzer",
this,
"GenerateSelection()");
839 G_selectionlist->
SetDataColumn(1,
"Reapply",
"GetReapplyCut");
844 G_selectionlist->
Connect(
"SelectionChanged()",
"KVTreeAnalyzer",
this,
"SelectionChanged()");
853 fMain_selectionlist->
Resize(sWidth, sHeight);
854 G_selectionlist->
Display(&fSelections);
864 G_leaf_draw->
Connect(
"Clicked()",
"KVTreeAnalyzer",
this,
"DrawLeafExpr()");
867 G_leaf_expr =
new TGLabel(fHorizontalFrame, fLeafExpr.
Data());
875 G_histo_prof->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetProfileHisto(Bool_t)");
878 G_histo_norm =
new TGCheckButton(histo_opts,
"Normalize (integral)");
879 G_histo_norm->
SetToolTipText(
"Generate normalized histogram with integral=1");
881 G_histo_norm->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetNormHisto(Bool_t)");
883 G_histo_norm_events =
new TGCheckButton(histo_opts,
"Normalize (events)");
884 G_histo_norm_events->
SetToolTipText(
"Generate histogram with integral divided by number of events");
886 G_histo_norm_events->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetNormHistoEvents(Bool_t)");
890 G_histo_weight->
SetToolTipText(
"User defined binning of the histogram");
892 G_histo_weight->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetUserWeight(Bool_t)");
896 G_histo_bin->
SetToolTipText(
"User defined binning of the histogram");
898 G_histo_bin->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetUserBinning(Bool_t)");
903 hWidth = lWidth + sWidth + 20;
1008 G_histolist->
Connect(
"SelectionChanged()",
"KVTreeAnalyzer",
this,
"HistoSelectionChanged()");
1014 G_histolist->
Display(&fHistolist);
1021 G_histo_del->
Connect(
"Clicked()",
"KVTreeAnalyzer",
this,
"DeleteSelectedHisto()");
1030 G_histo_add->
Connect(
"Clicked()",
"KVTreeAnalyzer",
this,
"AddSelectedHistos()");
1034 G_histo_draw_option =
new TGComboBox(histo_opts);
1061 while (draw_options[dop] !=
" ") {
1062 G_histo_draw_option->
AddEntry(draw_options[dop], dop);
1065 G_histo_draw_option->
Resize(100, 20);
1067 G_histo_draw_option->
Connect(
"Selected(const char*)",
"KVTreeAnalyzer",
this,
"SetDrawOption(Option_t*)");
1069 G_histo_new_can =
new TGCheckButton(histo_opts,
"New canvas");
1071 G_histo_new_can->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetNewCanvas(Bool_t)");
1076 G_histo_same->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetDrawSame(Bool_t)");
1078 G_histo_app_sel =
new TGCheckButton(histo_opts,
"Apply selection");
1079 G_histo_app_sel->
SetToolTipText(
"Apply current selection to generate new histo");
1080 G_histo_app_sel->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetApplySelection(Bool_t)");
1083 G_histo_log->
SetToolTipText(
"Use log scale in Y (1D) or Z (2D)");
1085 G_histo_log->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetDrawLog(Bool_t)");
1088 G_histo_stats->
SetToolTipText(
"Display histogram statistics box");
1090 G_histo_stats->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetStatsHisto(Bool_t)");
1092 G_histo_autosave =
new TGCheckButton(histo_opts,
"AutoSave");
1093 G_histo_autosave->
SetToolTipText(
"Automatically generate histo image files");
1095 G_histo_autosave->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetAutoSaveHisto(Bool_t)");
1104 hHeight = hHeight + lHeight + 50;
1106 fMain_histolist->
Resize(hWidth, hHeight);
1109 fMain_histolist->
Connect(
"CloseWindow()",
"KVTreeAnalyzer",
this,
"GUIClosed()");
1121 AnalysisSaveCheck();
1122 fDeletedByGUIClose =
kTRUE;
1132 void KVTreeAnalyzer::AddHisto(
TH1* h)
1137 SetAnalysisModifiedSinceLastSave(kTRUE);
1139 G_histolist->
Display(&fHistolist);
1148 void KVTreeAnalyzer::AddSelection(
TEntryList* e)
1153 SetAnalysisModifiedSinceLastSave(kTRUE);
1155 G_selectionlist->
Display(&fSelections);
1164 void KVTreeAnalyzer::AddCut(
TCutG* c)
1169 SetAnalysisModifiedSinceLastSave(kTRUE);
1171 G_histolist->
Display(&fHistolist);
1194 p.FindCommonTitleCharacters(((
TChain*)t)->GetListOfFiles(),
'X');
1195 fTreeFileName =
p.Data();
1200 if (!fSaveAnalysisFileName.
Contains(
".root")) fSaveAnalysisFileName.
Append(
".root");
1213 got_histos_or_tree_from_file =
true;
1225 void KVTreeAnalyzer::ReconnectTree()
1236 else if ((fRelativePathToAnalysisFile !=
"." && fRelativePathToAnalysisFile !=
"") && !
gSystem->
IsAbsoluteFileName(fTreeFileName)) {
1245 if (!f ||
f->IsZombie()) {
1246 KVError::Error(
this,
"ReconnectTree",
"Failed to reconnect Tree file %s", fTreeFileName.
Data());
1248 got_histos_or_tree_from_file =
false;
1253 fTreeFileName =
f->GetName();
1257 fChain =
new TChain(fTreeName, treeTitle);
1258 fChain->
Add(fTreeFileName);
1285 anal->fNoGui = nogui;
1317 gTreeAnalyzer =
this;
1318 G_selectionlist->
Display(&fSelections);
1319 G_histolist->
Display(&fHistolist);
1338 TIter next(&padList);
1340 while ((o = next())) {
1354 TIter next(&fHistolist);
1388 if (fDrawSame || same) {
1392 histo->
SetLineColor(my_color_array[++fSameColorIndex]);
1394 if (fSameColorIndex == MAX_COLOR_INDEX) fSameColorIndex = -1;
1403 histo->
Draw(
"same");
1404 TObject* legend =
gPad->GetListOfPrimitives()->FindObject(
"TPave");
1406 gPad->GetListOfPrimitives()->Remove(legend);
1412 gPad->SetLogz(fDrawLog || logscale);
1415 gPad->SetLogy(fDrawLog || logscale);
1420 while ((
h = nxt())) {
1435 if (fNewCanvas || !
gPad) {
1438 c->SetWindowSize(700, 700);
1447 gPad->SetLogz(fDrawLog || logscale);
1451 gPad->SetLogy(fDrawLog || logscale);
1516 cut =
dynamic_cast<TCutG*
>(obj);
1519 histo =
dynamic_cast<TH1*
>(obj);
1531 if (
gPad &&
gPad->GetListOfPrimitives()->FindObject(histo) && (gen)) {
1532 TIter next(
gPad->GetListOfPrimitives());
1534 while ((o = next())) {
1552 if (weight ==
"1") weight =
"";
1576 if (!fTree)
return kTRUE;
1581 return (test_sel == tree_sel);
1598 GenerateHistoTitle(htit, expr,
"", weight);
1601 if (kvhisto) histo = kvhisto->
GetHisto();
1602 if (histo && (histo->
IsA() ==
h->
IsA()))
return histo;
1624 Bool_t oldProfileState = fProfileHisto;
1625 fProfileHisto =
kTRUE;
1627 fProfileHisto = oldProfileState;
1648 if (selection.
IsNull())
return;
1665 name.Form(
"a%d", fAliasNumber++);
1668 G_alias_text->
Clear();
1684 if (!fSelectedSelections.
IsEmpty()) {
1689 for (
int i = 1; i < nsel; i++) {
1693 if (i > 1) newselect +=
" && ";
1694 newselect += tmp.
Data();
1697 SetEntryList(save_elist);
1714 if (!fSelectedSelections.
IsEmpty()) {
1716 SetEntryList(
nullptr);
1719 for (
int i = 0; i < nsel; i++) {
1723 if (i > 0) newselect +=
" || ";
1724 newselect += tmp.
Data();
1727 SetEntryList(save_elist);
1740 if (!fSelectedSelections.
IsEmpty()) {
1742 if (nsel < 1)
return;
1743 for (
int i = 0; i < nsel; i++) {
1750 SetAnalysisModifiedSinceLastSave(
kTRUE);
1752 G_selectionlist->
Display(&fSelections);
1773 if (fSelectedSelections.
IsEmpty()) {
1775 else if (fSelectedSelections.
GetEntries() == 1) {
1778 if (tmp->
GetSize() != 0 || !strcmp(
"", G_selection_text->
GetText())) {
1779 G_selection_text->
SetText(((
TNamed*)fSelectedSelections.
At(0))->GetTitle());
1784 else if (fSelectedSelections.
GetEntries() > 1) {
1810 fXLeaf = fYLeaf = 0;
1825 else if (strcmp(fLeafExpr.
Data(), G_leaf_expr->
GetTitle())) {
1838 else if (nleaf == 2) {
1839 fXLeaf = (
TNamed*)fSelectedLeaves->
At(1);
1844 fLeafExpr.
Form(
"%s:%s", Y.
Data(),
X.Data());
1848 else if (nleaf == 3) {
1849 fXLeaf = (
TNamed*)fSelectedLeaves->
At(2);
1850 fYLeaf = (
TNamed*)fSelectedLeaves->
At(1);
1851 fZLeaf = (
TNamed*)fSelectedLeaves->
At(0);
1877 G_leaf_expr->
SetText(fLeafExpr);
1885 bool KVTreeAnalyzer::DefineUserBinning()
1888 {
"Ybins", fNy}, {
"Ymin", fYmin}, {
"Ymax", fYmax}};
1892 if (cancel)
return false;
1893 fNx =
p.GetIntValue(
"Xbins");
1894 fXmin =
p.GetDoubleValue(
"Xmin");
1895 fXmax =
p.GetDoubleValue(
"Xmax");
1896 fNy =
p.GetIntValue(
"Ybins");
1897 fYmin =
p.GetDoubleValue(
"Ymin");
1898 fYmax =
p.GetDoubleValue(
"Ymax");
1906 bool KVTreeAnalyzer::DefineUserBinning1F()
1912 if (cancel)
return false;
1913 fNxF =
p.GetIntValue(
"bins");
1914 fXminF =
p.GetDoubleValue(
"min");
1915 fXmaxF =
p.GetDoubleValue(
"max");
1923 bool KVTreeAnalyzer::DefineUserBinningD()
1925 KVNameValueList p{{
"Xbins", fNxD}, {
"Ybins", fNyD}, {
"ordered?", fOrderedDalitz}};
1929 if (cancel)
return false;
1930 fNxD =
p.GetIntValue(
"Xbins");
1931 fNyD =
p.GetIntValue(
"Ybins");
1932 fOrderedDalitz =
p.GetBoolValue(
"ordered?");
1944 double KVTreeAnalyzer::GetTreeMaximum(
const TString& leafname)
1953 auto leaf = fTree->
GetLeaf(leafname);
1954 if (!leaf)
return 0;
1960 if (entryNumber < 0)
break;
1961 branch->GetEntry(entryNumber);
1962 for (
Int_t j = 0; j < leaf->GetLen(); ++j) {
1980 double KVTreeAnalyzer::GetTreeMinimum(
const TString& leafname)
1989 auto leaf = fTree->
GetLeaf(leafname);
1990 if (!leaf)
return 0;
1996 if (entryNumber < 0)
break;
1997 branch->GetEntry(entryNumber);
1998 for (
Int_t j = 0; j < leaf->GetLen(); ++j) {
2012 const Char_t* KVTreeAnalyzer::get_leaf_type_name(
const TNamed* l)
2029 if (fLeafExpr ==
"-")
return;
2031 if (threeDexp && !fProfileHisto) {
2041 if (!DefineWeight())
return;
2044 int nx = 500, ny = 500;
2051 if (fXLeaf->
InheritsFrom(
"TLeaf") && !strcmp(get_leaf_type_name(fXLeaf),
"Char_t")) {
2055 if (fYLeaf->
InheritsFrom(
"TLeaf") && !strcmp(get_leaf_type_name(fYLeaf),
"Char_t")) {
2060 if (threeDexp) fLeafExpr.
Form(
"%s:%s:%s", Zexpr.
Data(), Yexpr.
Data(), Xexpr.
Data());
2061 else fLeafExpr.
Form(
"%s:%s", Yexpr.
Data(), Xexpr.
Data());
2063 name.Form(
"h%d", fHistoNumber);
2064 TString drawexp(fLeafExpr), histo, histotitle;
2065 if (fUserWeight) GenerateHistoTitle(histotitle, fLeafExpr,
"", fWeight);
2066 else GenerateHistoTitle(histotitle, fLeafExpr,
"");
2070 unique_ptr<KVSeqCollection> same_histo(fHistolist.
GetSubListWithMethod(histotitle,
"GetHistoTitle"));
2071 TIter nxtSame(same_histo.get());
2074 if ((fProfileHisto && kvhisto->
IsProfile()) || (!fProfileHisto && kvhisto->
IsTH2())) {
2081 if (!DefineUserBinning())
return;
2084 xmin = GetTreeMinimum(Xexpr);
2085 xmax = GetTreeMaximum(Xexpr);
2087 (!strcmp(get_leaf_type_name(fXLeaf),
"Int_t") || !strcmp(get_leaf_type_name(fXLeaf),
"Short_t") || !strcmp(get_leaf_type_name(fXLeaf),
"Char_t"))
2093 ymin = GetTreeMinimum(Yexpr);
2094 ymax = GetTreeMaximum(Yexpr);
2096 (!strcmp(get_leaf_type_name(fYLeaf),
"Int_t") || !strcmp(get_leaf_type_name(fYLeaf),
"Short_t") || !strcmp(get_leaf_type_name(fYLeaf),
"Char_t"))
2111 if (!fProfileHisto) histo.
Form(
">>%s(%d,%f,%f,%d,%f,%f)",
name.Data(), nx,
xmin,
xmax, ny,
ymin,
ymax);
2113 if (fUserBinning) histo.
Form(
">>%s(%d,%f,%f)",
name.Data(), nx,
xmin,
xmax);
2114 else histo.
Form(
">>%s",
name.Data());
2118 if (fUserWeight) ww += fWeight;
2120 if (!fProfileHisto) drawResult = fTree->
Draw(drawexp, ww.
Data(),
"goff");
2121 else drawResult = fTree->
Draw(drawexp, ww.
Data(),
"prof,goff");
2122 if (drawResult < 0) {
2166 TString xType(get_leaf_type_name(fXLeaf));
2167 TString yType(get_leaf_type_name(fYLeaf));
2168 TString zType(get_leaf_type_name(fZLeaf));
2171 KVError::Warning(
this,
"DrawAsDalitz",
"Leaves %s must have the same type !", fLeafExpr.
Data());
2178 Int_t vari1, vari2, vari3;
2180 Char_t varc1, varc2, varc3;
2188 else if (xType.
Contains(
"Short_t")) {
2193 else if (xType.
Contains(
"Char_t")) {
2198 else if (xType.
Contains(
"Double_t")) {
2203 else if (xType.
Contains(
"Float_t")) {
2210 if (!DefineUserBinningD())
return;
2214 GenerateHistoTitle(histotitle, fLeafExpr,
"");
2217 if (fUserBinning)
h =
new KVDalitzPlot(
Form(
"h%d", fHistoNumber), histotitle.
Data(), fOrderedDalitz, fNxD, 0., 1.2, fNyD, 0., 1.2);
2226 for (
int i = 0; i <
nentries; i++) {
2228 if (el) j = el->
Next();
2235 else if (xType.
Contains(
"Short_t")) {
2240 else if (xType.
Contains(
"Char_t")) {
2245 else if (xType.
Contains(
"Double_t")) {
2250 else if (xType.
Contains(
"Float_t")) {
2255 h->FillAsDalitz(
x,
y, z);
2273 bool KVTreeAnalyzer::DefineWeight()
2280 Bool_t cancel_pressed{
false};
2284 if (cancel_pressed)
return false;
2285 fWeight = params.GetStringValue(
"Weight");
2299 if (!DefineWeight())
return;
2302 TH1* histo =
nullptr;
2309 if (fUserWeight) GenerateHistoTitle(htit, expr,
"", fWeight);
2310 else GenerateHistoTitle(htit, expr,
"");
2312 if (kvhisto) histo = kvhisto->
GetHisto();
2314 if (
type.Contains(
"Int_t") ||
type.Contains(
"Char_t") ||
type.Contains(
"Short_t") ||
type ==
"Long_t" ||
type ==
"Long64_t") {
2317 if (
type.Contains(
"Char_t")) {
2327 histo =
MakeHisto(expr,
"", 500, 0, (fUserWeight ? fWeight.
Data() :
""));
2339 GenerateHistoTitle(htit, expr,
"", (fUserWeight ? fWeight.
Data() :
""));
2341 if (kvhisto) histo = kvhisto->
GetHisto();
2342 if (!histo) histo =
MakeHisto(expr,
"", 500, 0, (fUserWeight ? fWeight.
Data() :
""));
2394 fPROOFEnabled = yes;
2413 Info(
"Save",
"Saving analysis %s in file %s",
GetTitle(), fSaveAnalysisFileName.
Data());
2414 SaveAs(fSaveAnalysisFileName);
2415 SetAnalysisModifiedSinceLastSave(
kFALSE);
2621 TIter next(&fHistolist);
2626 if (
h->IsType(
"Histo") && !strcmp(
h->GetExpression(), expr)) hlist->
Add(
h->GetHisto());
2642 TIter next(&fHistolist);
2647 if (
h->IsType(
"Histo") && !strcmp(
h->GetSelection(), expr)) hlist->
Add(
h->GetHisto());
2658 TIter next(&fHistolist);
2663 if (
h->IsType(
"Histo") && !strcmp(
h->GetExpression(), expr) && !strcmp(
h->GetSelection(), selection)) {
2664 if (strcmp(weight,
"")) {
2665 if (!strcmp(
h->GetWeight(), weight))
return h->GetHisto();
2667 else return h->GetHisto();
2688 TIter next(&fHistolist);
2693 if (
h->IsType(
"Histo") && !strcmp(
h->GetExpression(), expr) && !strcmp(
h->GetSelection(), selection) && !strcmp(
h->GetWeight(), weight)) {
2696 SetAnalysisModifiedSinceLastSave(
kTRUE);
2699 G_histolist->
Display(&fHistolist);
2712 if (nsel < 1)
return;
2713 for (
int i = 0; i < nsel; i++) {
2717 SetAnalysisModifiedSinceLastSave(
kTRUE);
2719 G_histolist->
Display(&fHistolist);
2737 if (fSelectedHistos.
GetEntries() != 2)
return;
2740 if (HistoToAdd1 && HistoToAdd2) {
2741 Info(
"AddSelectedHistos",
"Adding %s and %s", HistoToAdd1->
GetName(), HistoToAdd2->
GetName());
2746 ResetMethodCalled();
2749 Info(
"AddSelectedHistos",
"Call to context menu not OK");
2750 delete HistoAddResult;
2753 if (MethodNotCalled()) {
2754 Info(
"AddSelectedHistos",
"You pressed cancel");
2755 delete HistoAddResult;
2759 AddHisto(HistoAddResult);
2762 Info(
"AddSelectedHistos",
"Only possible for 2 histograms");
2772 fMethodCalled =
kTRUE;
2773 HistoAddResult->
Add(HistoToAdd1, HistoToAdd2,
c1,
c2);
2793 old_lists.
AddAll(&fSelections);
2794 fSelections.
Clear();
2796 TIter next(&old_lists);
2798 SetEntryList(
nullptr);
2801 cout <<
"REGENERATING SELECTION : " << old_el->
GetTitle() << endl;
2804 G_selectionlist->
Display(&fSelections);
2820 HistoFileMenu_Open();
2825 case MH_APPLY_ANALYSIS:
2829 HistoFileMenu_Save();
2835 delete fMain_histolist;
2841 TIter next(fgAnalyzerList);
2846 while (
tan ==
this);
2847 tan->AnalysisSaveCheck();
2850 AnalysisSaveCheck();
2851 gROOT->ProcessLine(
".q");
2881 case SEL_GEN_CONST_XSEC:
2914 void KVTreeAnalyzer::HistoFileMenu_Open()
2919 const char* filetypes[] = {
2920 "Analysis files",
"Analysis*.root",
2942 const char* filetypes[] = {
2943 "ROOT files",
"*.root",
2960 void KVTreeAnalyzer::OpenChain()
2965 const char* filetypes[] = {
2966 "ROOT files",
"*.root*",
2977 TString theTreeName, theTreeTitle;
2983 if (trees->GetEntries()) {
2984 theTreeName = trees->
First()->GetName();
2985 theTreeTitle = trees->
First()->GetTitle();
2987 if (theTreeName !=
"") {
2990 if (got_histos_or_tree_from_file) newAnal =
new KVTreeAnalyzer(kFALSE);
2991 newAnal->OpenChain(theTreeName, theTreeTitle, fi.
fFileNamesList);
3001 if (got_histos_or_tree_from_file) newAnal =
new KVTreeAnalyzer(kFALSE);
3004 if(newAnal->got_histos_or_tree_from_file) newAnal->SetWindowTitle(
file->GetName());
3018 const char* filetypes[] = {
3019 "ROOT files",
"*.root",
3036 void KVTreeAnalyzer::HistoFileMenu_Save()
3038 const char* filetypes[] = {
3039 "Analysis files",
"Analysis*.root",
3050 if (!filenam.Contains(
'.'))
3053 fSaveAnalysisFileName = filenam;
3056 fAnalysisSaveDir = fi.
fIniDir;
3067 while ((akey = (
TKey*)next())) {
3073 got_histos_or_tree_from_file =
true;
3077 G_histolist->
Display(&fHistolist);
3085 void KVTreeAnalyzer::OpenSingleFile(
TFile*
file)
3094 if (trees->GetEntries()) {
3096 TString aTreeName = trees->First()->GetName();
3101 OpenChain(aTreeName, trees->First()->GetTitle(), &fileList);
3104 SetWindowTitle(
file->GetName());
3119 AnalysisSaveCheck();
3122 TObject* kvta =
file->GetListOfKeys()->FindObject(
"KVTreeAnalyzer");
3127 OpenSingleFile(
file);
3145 fChain =
new TChain(treename, treetitle);
3148 while ((o = nxt())) fChain->
Add(o->
GetName());
3152 fSelections.
Clear();
3155 fSelectionNumber = 1;
3157 fSameColorIndex = 0;
3158 fSelectedLeaves = 0;
3159 SetAnalysisModifiedSinceLastSave(
kFALSE);
3160 G_selectionlist->
Display(&fSelections);
3161 G_histolist->
Display(&fHistolist);
3178 while ((o = next())) {
3180 Info(
"GenerateAllAliases",
"Adding alias %s to leaflist", o->
GetTitle());
3210 TObject* kvta =
file->GetListOfKeys()->FindObject(
"KVTreeAnalyzer");
3227 applyAnal->SetEntryList(
nullptr);
3228 applyAnal->G_selection_status->
SetText(
"CURRENT SELECTION:", 0);
3240 exp.ReplaceAll(
"d2r",
"TMath::DegToRad()");
3241 exp.ReplaceAll(
"r2d",
"TMath::RadToDeg()");
3243 SetAnalysisModifiedSinceLastSave(
kTRUE);
3250 static const char* gSaveAsTypes[] = {
"PostScript",
"*.ps",
3251 "Encapsulated PostScript",
"*.eps",
3256 "ROOT files",
"*.root",
3279 Info(
"SetUpHistoAutoSave",
"Select image filetype and directory");
3282 static Int_t typeidx = 0;
3295 fAutoSaveDir = dir.
Data();
3297 Info(
"SetUpHistoAutoSave",
"file-type:%s directory:%s", fAutoSaveType.
Data(), fAutoSaveDir.
Data());
3311 static TString lastFilename =
"";
3314 gPad->SaveAs(lastFilename);
3324 title.
Append(fAutoSaveType);
3327 Info(
"AutoSaveHisto",
"Saved as: %s", title.
Data());
3328 gPad->SaveAs(title);
3329 lastFilename = title;
3343 TIter nextSel(list);
3345 while ((
sel = nextSel())) {
3347 Info(
"GenerateAllSelections",
"Generating selection: %s",
sel->GetTitle());
3364 TIter nextHist(list);
3368 if (!obj->
IsType(
"Cut")) {
3374 if (weight ==
"1") weight =
"";
3376 Info(
"GenerateAllHistograms",
"Generating histogram: %s", hist->
GetTitle());
3414 if (fChain && fTree != fChain)
SetTree(fChain);
3417 Info(
"Streamer",
"Checking friends");
3426 Info(
"Streamer",
"Found friend to convert to TChain");
3430 Info(
"Streamer",
"Choose file containg friend tree %s", fe->
GetTreeName());
3432 const char* filetypes[] = {
3433 "ROOT files",
"*.root",
3451 Info(
"Streamer",
"Removing TTree friends");
3453 while (!toRemove.
End()) {
3457 Info(
"Streamer",
"Adding friends as TChains");
3458 while (!toRemove.
End()) {
3459 idx = toRemove.
Next();
3473 fHistolist.
Clear(
"nodelete");
3476 while ((obj = (
TNamed*)next())) {
3484 SetAnalysisModifiedSinceLastSave(kTRUE);
3488 TIter next(&fHistolist);
3491 if (
h->IsType(
"Histo"))
h->ParseExpressionAndSelection();
3518 if (trees->GetEntries()) {
3528 while ((akey = (
TKey*)next())) {
3537 G_histolist->
Display(&fHistolist);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TProof * gProof
char * Form(const char *fmt,...)
char * StrDup(const char *str)
void AssignAndDelete(TString &target, char *tobedeleted)
R__EXTERN TSystem * gSystem
virtual Bool_t IsType(const Char_t *typ) const
static void InitEnvironment()
static Bool_t OpenContextMenu(const char *method, TObject *obj, const char *alt_method_name="")
TCanvas with mouse-controlled dynamic zoom and pan & scan.
Fill 3D observables in a dalitz plot ,.
Modified version of TGFileDialog file selection dialog.
Wrapper for histograms and graphical cuts used by KVTreeAnalyzer.
static void ParseHistoTitle(const Char_t *title, KVString &exp, KVString &sel, KVString &weight)
const Char_t * GetExpression() const
const Char_t * GetSelection() const
const Char_t * GetWeight() const
Return weighting used for filling histogram.
virtual void SetIsBoolean(Bool_t isit=kTRUE)
Extension of TGLVContainer for KVListView widget.
Enhanced version of ROOT TGListView widget.
virtual void ActivateSortButtons()
KVSeqCollection * GetPickOrderedSelectedObjects() const
virtual void SetDataColumns(Int_t ncolumns)
void SetDoubleClickAction(const char *receiver_class, void *receiver, const char *slot)
virtual KVLVColumnData * GetDataColumn(Int_t index) const
virtual void Display(const TCollection *l)
KVUnownedList GetSelectedObjects() const
virtual void SetMaxColumnSize(UInt_t width)
void AllowContextMenu(Bool_t on=kTRUE)
virtual void SetDataColumn(Int_t index, const Char_t *name, const Char_t *method="", Int_t mode=kTextCenterX)
void SetUseObjLabelAsRealClass(Bool_t yes=kTRUE)
Extended TList class which owns its objects by default.
GUI for setting KVNameValueList parameters.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
const Char_t * GetStringValue(const Char_t *name) const
Strings used to represent a set of ranges of values.
void Add(Int_t)
Add value 'n' to the list.
KaliVeda extensions to ROOT collection classes.
void Copy(TObject &obj) const override
TObject * First() const override
KVSeqCollection * GetSubListWithMethod(const Char_t *retvalue, const Char_t *method) const
TObject * Remove(TObject *obj) override
Remove object from list.
void Add(TObject *obj) override
TObject * FindObject(const char *name) const override
TObject * Last() const override
Int_t GetSize() const override
void Clear(Option_t *option="") override
virtual TObject * FindObjectWithMethod(const Char_t *retvalue, const Char_t *method) const
TObject * At(Int_t idx) const override
virtual TObject * FindObjectByTitle(const Char_t *) const
Will return object with given title (value of TObject::GetTitle() method).
virtual TObject * FindObjectWithNameAndType(const Char_t *name, const Char_t *type) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
GUI for simple intuitive analysis of data in TTree ,.
void DeleteHisto(const Char_t *expr, const Char_t *selection, const Char_t *weight)
Bool_t IsPROOFEnabledForSelections() const
static KVTreeAnalyzer * OpenFile(const Char_t *filename, Bool_t nogui=kFALSE)
TList * GetHistosByData(const Char_t *expr)
KVHistogram * GetHistoByTitle(const Char_t *title)
Bool_t IsPROOFEnabled() const
void SetTreeFileName(TTree *t)
void SetTree(TTree *t)
Connects a TChain for analysis.
void DeleteSelections()
Delete the currently selected selection(s)
void OpenAnyFile(const Char_t *filepath)
Bool_t MakeSelection(const Char_t *selection)
void ReapplyAnyFile(const Char_t *filepath)
void SetUpHistoAutoSave()
void GenerateAllAliases(TCollection *list)
Generate all user aliases in list which are not already defined.
void SaveAs(const char *filename="", Option_t *option="") const override
void Copy(TObject &obj) const override
TH1 * RemakeHisto(TH1 *h, const Char_t *expr, const Char_t *weight="")
TH1 * MakeHisto(const Char_t *expr, const Char_t *selection, Int_t nX, Int_t nY=0, const Char_t *weight="", Double_t xmin=-1, Double_t xmax=-1, Double_t ymin=-1, Double_t ymax=-1)
void SetAlias(const Char_t *name, const Char_t *expr)
void HistoFileMenu_Apply()
void DeleteSelectedHisto()
Delete all currently selected histograms.
void GUIClosed()
Called when graphical window is closed.
TEntryList * GetSelection(const Char_t *)
Look for selection in list of selections.
Bool_t IsCurrentSelection(const Char_t *sel)
void AutoSaveHisto(TH1 *h)
void GenerateAllHistograms(TCollection *)
void SetSelection(TObject *)
void CurrentSelection()
Print the currently active selection (TEntryList set on TTree).
void UpdateEntryLists()
regenerate entry lists for all selections
void HistoAddition(Double_t c1=1, Double_t c2=1)
void OpenGUI()
Launch the GUI (unless fNoGui=kTRUE in which case this does nothing)
void HistoFileMenu_OpenFriend()
void CombineSelectionsAnd()
KVTreeAnalyzer(Bool_t nogui=kTRUE)
void HandleHistoFileMenu(Int_t)
void HandleOptionsMenu(Int_t opt)
void GetHistosFromFile(TFile *file, const KVUnownedList &keys)
void CombineSelectionsOr()
void HandleSelectionsMenu(Int_t)
void DrawHistogram(TH1 *histo, Bool_t same=false, Bool_t logscale=false)
void EnablePROOF(Bool_t yes=kTRUE)
TList * GetHistosBySelection(const Char_t *expr)
void OpenAnyFriendFile(const Char_t *filepath)
void GenerateAllSelections(TCollection *)
For applying existing analysis to new data.
TH1 * GetHistogram(const Char_t *name) const
Return histogram with given name.
Long64_t GetEntriesInCurrentSelection() const
TH1 * MakeIntHisto(const Char_t *expr, const Char_t *selection, Int_t Xmin, Int_t Xmax, const Char_t *weight="")
virtual ~KVTreeAnalyzer()
Destructor.
void SelectionChanged()
Method called whenever the selected selection in the GUI list changes.
TH1 * GetHisto(const Char_t *expr, const Char_t *selection, const Char_t *weight="")
TNamed * GetAlias(const Char_t *expr)
void HistoSelectionChanged()
Method called when user histo selection changes in GUI histogram list.
void ReadFromFile(const Char_t *filename)
open a previously saved analysis session.
void DrawLeaf(TObject *)
Method called when user double-clicks a leaf/alias in list.
void DrawHisto(TObject *o, Bool_t gen=kTRUE)
void Add(TObject *obj) override
Extended TList class which does not own its objects by default.
virtual void SetLineWidth(Width_t lwidth)
virtual void SetLineColor(Color_t lcolor)
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void SetEntryList(TEntryList *elist, Option_t *opt="") override
TFriendElement * AddFriend(const char *chainname, const char *dummy="") override
TObjArray * GetListOfLeaves() override
virtual Int_t Add(const char *name, Long64_t nentries=TTree::kMaxEntries)
void RemoveFriend(TTree *) override
void SetDirectory(TDirectory *dir) override
Long64_t Draw(const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override
virtual void SetProof(Bool_t on=kTRUE, Bool_t refresh=kFALSE, Bool_t gettreeheader=kFALSE)
Long64_t GetEntries() const override
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
Bool_t InheritsFrom(const char *cl) const override
void ls(Option_t *option="") const override
virtual void AddAll(const TCollection *col)
virtual Int_t GetEntries() const
virtual Bool_t IsEmpty() const
TObject * Clone(const char *newname="") const override
const char * GetVarX() const
const char * GetVarY() const
virtual Bool_t GetReapplyCut() const
virtual Long64_t GetEntry(Long64_t index)
virtual Long64_t GetN() const
virtual const char * GetValue(const char *name, const char *dflt) const
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
virtual const char * GetTreeName() const
virtual TTree * GetTree()
virtual TFile * GetFile()
TGFrame * GetContainer() const
virtual void AddEntry(const char *s, Int_t id)
TGDimension GetDefaultSize() const override
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
void MapSubwindows() override
void SetCleanup(Int_t mode=kLocalCleanup) override
void SetMultipleSelection(Bool_t option)
virtual UInt_t GetDefaultHeight() const
virtual void Resize(TGDimension size)
TGDimension GetSize() const
void MapWindow() override
TGDimension GetDefaultSize() const override
void SetText(const char *newText)
const char * GetTitle() const override
void SetIconPixmap(char **xpm_array)
void SetIconName(const char *name)
void SetWindowName(const char *name=nullptr) override
virtual void SetText(const char *text, Int_t partidx=0)
virtual void SetMaxLength(Int_t maxlen)
void Clear(Option_t *option="") override
const char * GetText() const
virtual void SetCursorPosition(Int_t pos)
virtual void SetAlignment(ETextJustification mode=kTextLeft)
virtual void SetText(const char *text, Bool_t emit=kTRUE)
virtual void SetName(const char *name)
virtual void RaiseWindow()
void Draw(Option_t *chopt="") override
void SetTitle(const char *title="") override
virtual void SetDirectory(TDirectory *dir)
virtual Bool_t Add(const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1)
void SetTitle(const char *title) override
virtual Int_t GetNbinsY() const
Option_t * GetOption() const override
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
virtual Int_t GetNbinsX() const
virtual void SetMaximum(Double_t maximum=-1111)
void Draw(Option_t *option="") override
virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const
TClass * IsA() const override
virtual void SetOption(Option_t *option=" ")
virtual void Scale(Double_t c1=1, Option_t *option="")
TObject * Clone(const char *newname="") const override
virtual void Sumw2(Bool_t flag=kTRUE)
virtual void SetStats(Bool_t stats=kTRUE)
virtual const char * GetClassName() const
virtual const char * GetTypeName() const
TBranch * GetBranch() const
TObject * FindObject(const char *name) const override
void Add(TObject *obj) override
TObject * First() const override
void Delete(Option_t *option="") override
void Copy(TObject &named) const override
virtual void SetTitle(const char *title="")
const char * GetName() const override
void Streamer(TBuffer &) override
const char * GetTitle() const override
TObject * FindObject(const char *name) const override
virtual const char * GetName() const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
virtual Bool_t InheritsFrom(const char *classname) const
virtual const char * GetTitle() const
virtual TClass * IsA() const
virtual void Info(const char *method, const char *msgfmt,...) const
static TProof * Open(const char *url=0, const char *conffile=0, const char *confdir=0, Int_t loglevel=0)
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
TString & Insert(Ssiz_t pos, const char *s)
Ssiz_t First(char c) const
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Append(char c, Ssiz_t rep=1)
TString & Prepend(char c, Ssiz_t rep=1)
virtual Int_t Sizeof() const
void Form(const char *fmt,...)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
virtual const char * DirName(const char *pathname)
virtual char * ConcatFileName(const char *dir, const char *name)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
virtual Bool_t ChangeDirectory(const char *path)
virtual const char * BaseName(const char *pathname)
virtual Bool_t IsAbsoluteFileName(const char *dir)
virtual const char * WorkingDirectory()
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
virtual TObjArray * GetListOfLeaves()
TFile * GetCurrentFile() const
virtual TList * GetListOfAliases() const
virtual TTree * GetFriend(const char *) const
virtual Double_t GetMaximum(const char *columname)
TDirectory * GetDirectory() const
virtual TEntryList * GetEntryList()
virtual Long64_t GetEntries() const
virtual Long64_t Draw(const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
virtual Long64_t GetEntryNumber(Long64_t entry) const
virtual TLeaf * GetLeaf(const char *branchname, const char *leafname)
virtual Double_t GetMinimum(const char *columname)
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=nullptr)
virtual TList * GetListOfFriends() const
virtual void ResetBranchAddresses()
RVec< PromoteType< T > > tan(const RVec< T > &v)
RVec< PromoteType< T > > exp(const RVec< T > &v)
void Error(UserClass p, const char *location, const char *va_(fmt),...)
void Warning(UserClass p, const char *location, const char *va_(fmt),...)