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);
475 if (fChain->
Draw(drawexp, selection,
"entrylist") < 0) {
493 title.
Form(
"(%s) && (%s)", _elist.
Data(), selection);
524 SetEntryList(
nullptr);
525 G_selection_status->
SetText(
"CURRENT SELECTION:", 0);
544 if (tmp !=
"") cout <<
"CURRENT SELECTION : " << tmp << endl;
568 void KVTreeAnalyzer::FillLeafList()
589 while ((o = next())) {
609 stuff.
AddAll(&fAliasList);
619 void KVTreeAnalyzer::AnalysisSaveCheck()
624 if (!fAnalysisModifiedSinceLastSave)
return;
628 cout <<
"Analysis " <<
GetTitle() <<
" has been modified. Save before continuing? [y] : " << flush;
632 if (reply ==
'n' || reply ==
'N')
return;
633 cout <<
"Give name of file [" << fSaveAnalysisFileName <<
"] : " << flush;
635 cin.get(filename, 256);
636 if (filename[0] != 0) fSaveAnalysisFileName =
filename;
641 if (fMain_histolist) fMain_histolist->
RaiseWindow();
643 "Analysis has been modified. Save before continuing?", kMBIconStop,
644 kMBYes | kMBNo, &ret_code);
645 if (ret_code == kMBNo)
return;
646 HistoFileMenu_Save();
654 void KVTreeAnalyzer::SetAnalysisModifiedSinceLastSave(
Bool_t x)
656 fAnalysisModifiedSinceLastSave =
x;
680 void KVTreeAnalyzer::SetEntryList(
TEntryList* l)
711 ULong_t red, cyan, green, yellow, magenta, gura, gurb, gurc, gurd, gure, gurf;
712 gClient->GetColorByName(
"#ff00ff", magenta);
713 gClient->GetColorByName(
"#ff0000", red);
714 gClient->GetColorByName(
"#00ff00", green);
715 gClient->GetColorByName(
"#00ffff", cyan);
716 gClient->GetColorByName(
"#ffff00", yellow);
717 gClient->GetColorByName(
"#cf14b2", gura);
718 gClient->GetColorByName(
"#cd93e6", gurb);
719 gClient->GetColorByName(
"#c1e91a", gurc);
720 gClient->GetColorByName(
"#d1a45b", gurd);
721 gClient->GetColorByName(
"#b54cfe", gure);
722 gClient->GetColorByName(
"#a325ef", gurf);
727 fMain_histolist->
SetName(
"fMain_histolist");
737 UInt_t hWidth = 400, hHeight = 400;
741 fMenuFile->
AddEntry(
"New analysis", MH_OPEN_CHAIN);
742 fMenuFile->
AddEntry(
"Open analysis", MH_OPEN_FILE);
743 fMenuFile->
AddEntry(
"Add Friend...", MH_ADD_FRIEND);
745 fMenuFile->
AddEntry(
"Save analysis", MH_SAVE);
746 fMenuFile->
AddEntry(
"Save as...", MH_SAVE_FILE);
747 fMenuFile->
AddEntry(
"Close", MH_CLOSE);
749 fMenuFile->
AddEntry(
"Apply analysis...", MH_APPLY_ANALYSIS);
750 SetAnalysisModifiedSinceLastSave(fAnalysisModifiedSinceLastSave);
752 fMenuFile->
AddEntry(
"Quit", MH_QUIT);
753 fMenuFile->
Connect(
"Activated(Int_t)",
"KVTreeAnalyzer",
this,
"HandleHistoFileMenu(Int_t)");
756 fSelCombMenu->
AddEntry(
"AND (&&)", SEL_COMB_AND);
757 fSelCombMenu->
AddEntry(
"OR (||)", SEL_COMB_OR);
758 fMenuSelections->
AddPopup(
"Combine...", fSelCombMenu);
761 fMenuSelections->
AddEntry(
"Update", SEL_UPDATE);
762 fMenuSelections->
AddEntry(
"Delete", SEL_DELETE);
765 fSelGenerate->
AddEntry(
"Constant X-sections", SEL_GEN_CONST_XSEC);
766 fMenuSelections->
AddPopup(
"Generate...", fSelGenerate);
767 fMenuSelections->
Connect(
"Activated(Int_t)",
"KVTreeAnalyzer",
this,
"HandleSelectionsMenu(Int_t)");
769 fOptionMenu->
AddEntry(
"PROOF", OPT_PROOF);
770 fOptionMenu->
Connect(
"Activated(Int_t)",
"KVTreeAnalyzer",
this,
"HandleOptionsMenu(Int_t)");
773 fMenuBar->
AddPopup(
"&File", fMenuFile, fMenuBarItemLayout);
774 fMenuBar->
AddPopup(
"&Options", fOptionMenu, fMenuBarItemLayout);
775 fMenuBar->
AddPopup(
"&Selections", fMenuSelections, fMenuBarItemLayout);
786 UInt_t lWidth = 300, lHeight = 300;
797 G_alias_text->
Connect(
"ReturnPressed()",
"KVTreeAnalyzer",
this,
"GenerateAlias()");
807 G_leaflist->
Connect(
"SelectionChanged()",
"KVTreeAnalyzer",
this,
"LeafChanged()");
817 fMain_leaflist->
Resize(lWidth, lHeight);
823 UInt_t sWidth = 600, sHeight = lHeight;
824 fMain_selectionlist =
new TGGroupFrame(hf,
"SELECTIONS");
826 G_selection_status =
new TGStatusBar(fMain_selectionlist, sWidth, 10);
827 G_selection_status->
SetText(
"CURRENT SELECTION:", 0);
831 lab =
new TGLabel(fHorizontalFrame1614,
"Make selection : ");
837 G_selection_text->
Connect(
"ReturnPressed()",
"KVTreeAnalyzer",
this,
"GenerateSelection()");
845 G_selectionlist->
SetDataColumn(1,
"Reapply",
"GetReapplyCut");
850 G_selectionlist->
Connect(
"SelectionChanged()",
"KVTreeAnalyzer",
this,
"SelectionChanged()");
859 fMain_selectionlist->
Resize(sWidth, sHeight);
860 G_selectionlist->
Display(&fSelections);
870 G_leaf_draw->
Connect(
"Clicked()",
"KVTreeAnalyzer",
this,
"DrawLeafExpr()");
873 G_leaf_expr =
new TGLabel(fHorizontalFrame, fLeafExpr.
Data());
881 G_histo_prof->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetProfileHisto(Bool_t)");
884 G_histo_norm =
new TGCheckButton(histo_opts,
"Normalize (integral)");
885 G_histo_norm->
SetToolTipText(
"Generate normalized histogram with integral=1");
887 G_histo_norm->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetNormHisto(Bool_t)");
889 G_histo_norm_events =
new TGCheckButton(histo_opts,
"Normalize (events)");
890 G_histo_norm_events->
SetToolTipText(
"Generate histogram with integral divided by number of events");
892 G_histo_norm_events->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetNormHistoEvents(Bool_t)");
896 G_histo_weight->
SetToolTipText(
"User defined binning of the histogram");
898 G_histo_weight->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetUserWeight(Bool_t)");
902 G_histo_bin->
SetToolTipText(
"User defined binning of the histogram");
904 G_histo_bin->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetUserBinning(Bool_t)");
909 hWidth = lWidth + sWidth + 20;
1014 G_histolist->
Connect(
"SelectionChanged()",
"KVTreeAnalyzer",
this,
"HistoSelectionChanged()");
1020 G_histolist->
Display(&fHistolist);
1027 G_histo_del->
Connect(
"Clicked()",
"KVTreeAnalyzer",
this,
"DeleteSelectedHisto()");
1036 G_histo_add->
Connect(
"Clicked()",
"KVTreeAnalyzer",
this,
"AddSelectedHistos()");
1040 G_histo_draw_option =
new TGComboBox(histo_opts);
1067 while (draw_options[dop] !=
" ") {
1068 G_histo_draw_option->
AddEntry(draw_options[dop], dop);
1071 G_histo_draw_option->
Resize(100, 20);
1073 G_histo_draw_option->
Connect(
"Selected(const char*)",
"KVTreeAnalyzer",
this,
"SetDrawOption(Option_t*)");
1075 G_histo_new_can =
new TGCheckButton(histo_opts,
"New canvas");
1077 G_histo_new_can->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetNewCanvas(Bool_t)");
1082 G_histo_same->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetDrawSame(Bool_t)");
1084 G_histo_app_sel =
new TGCheckButton(histo_opts,
"Apply selection");
1085 G_histo_app_sel->
SetToolTipText(
"Apply current selection to generate new histo");
1086 G_histo_app_sel->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetApplySelection(Bool_t)");
1089 G_histo_log->
SetToolTipText(
"Use log scale in Y (1D) or Z (2D)");
1091 G_histo_log->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetDrawLog(Bool_t)");
1094 G_histo_stats->
SetToolTipText(
"Display histogram statistics box");
1096 G_histo_stats->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetStatsHisto(Bool_t)");
1098 G_histo_autosave =
new TGCheckButton(histo_opts,
"AutoSave");
1099 G_histo_autosave->
SetToolTipText(
"Automatically generate histo image files");
1101 G_histo_autosave->
Connect(
"Toggled(Bool_t)",
"KVTreeAnalyzer",
this,
"SetAutoSaveHisto(Bool_t)");
1110 hHeight = hHeight + lHeight + 50;
1112 fMain_histolist->
Resize(hWidth, hHeight);
1115 fMain_histolist->
Connect(
"CloseWindow()",
"KVTreeAnalyzer",
this,
"GUIClosed()");
1127 AnalysisSaveCheck();
1128 fDeletedByGUIClose =
kTRUE;
1138 void KVTreeAnalyzer::AddHisto(
TH1* h)
1143 SetAnalysisModifiedSinceLastSave(kTRUE);
1145 G_histolist->
Display(&fHistolist);
1154 void KVTreeAnalyzer::AddSelection(
TEntryList* e)
1159 SetAnalysisModifiedSinceLastSave(kTRUE);
1161 G_selectionlist->
Display(&fSelections);
1170 void KVTreeAnalyzer::AddCut(
TCutG* c)
1175 SetAnalysisModifiedSinceLastSave(kTRUE);
1177 G_histolist->
Display(&fHistolist);
1200 p.FindCommonTitleCharacters(((
TChain*)t)->GetListOfFiles(),
'X');
1201 fTreeFileName =
p.Data();
1206 if (!fSaveAnalysisFileName.
Contains(
".root")) fSaveAnalysisFileName.
Append(
".root");
1219 got_histos_or_tree_from_file =
true;
1233 void KVTreeAnalyzer::ReconnectTree()
1244 else if ((fRelativePathToAnalysisFile !=
"." && fRelativePathToAnalysisFile !=
"") && !
gSystem->
IsAbsoluteFileName(fTreeFileName)) {
1253 if (!f ||
f->IsZombie()) {
1254 KVError::Error(
this,
"ReconnectTree",
"Failed to reconnect Tree file %s", fTreeFileName.
Data());
1256 got_histos_or_tree_from_file =
false;
1261 fTreeFileName =
f->GetName();
1265 fChain =
new TChain(fTreeName, treeTitle);
1266 fChain->
Add(fTreeFileName);
1293 anal->fNoGui = nogui;
1325 gTreeAnalyzer =
this;
1326 G_selectionlist->
Display(&fSelections);
1327 G_histolist->
Display(&fHistolist);
1346 TIter next(&padList);
1348 while ((o = next())) {
1362 TIter next(&fHistolist);
1396 if (fDrawSame || same) {
1400 histo->
SetLineColor(my_color_array[++fSameColorIndex]);
1402 if (fSameColorIndex == MAX_COLOR_INDEX) fSameColorIndex = -1;
1411 histo->
Draw(
"same");
1412 TObject* legend =
gPad->GetListOfPrimitives()->FindObject(
"TPave");
1414 gPad->GetListOfPrimitives()->Remove(legend);
1420 gPad->SetLogz(fDrawLog || logscale);
1423 gPad->SetLogy(fDrawLog || logscale);
1428 while ((
h = nxt())) {
1443 if (fNewCanvas || !
gPad) {
1446 c->SetWindowSize(700, 700);
1455 gPad->SetLogz(fDrawLog || logscale);
1459 gPad->SetLogy(fDrawLog || logscale);
1524 cut =
dynamic_cast<TCutG*
>(obj);
1527 histo =
dynamic_cast<TH1*
>(obj);
1539 if (
gPad &&
gPad->GetListOfPrimitives()->FindObject(histo) && (gen)) {
1540 TIter next(
gPad->GetListOfPrimitives());
1542 while ((o = next())) {
1560 if (weight ==
"1") weight =
"";
1584 if (!fTree)
return kTRUE;
1589 return (test_sel == tree_sel);
1606 GenerateHistoTitle(htit, expr,
"", weight);
1609 if (kvhisto) histo = kvhisto->
GetHisto();
1610 if (histo && (histo->
IsA() ==
h->
IsA()))
return histo;
1632 Bool_t oldProfileState = fProfileHisto;
1633 fProfileHisto =
kTRUE;
1635 fProfileHisto = oldProfileState;
1656 if (selection.
IsNull())
return;
1673 name.Form(
"a%d", fAliasNumber++);
1676 G_alias_text->
Clear();
1692 if (!fSelectedSelections.
IsEmpty()) {
1697 for (
int i = 1; i < nsel; i++) {
1701 if (i > 1) newselect +=
" && ";
1702 newselect += tmp.
Data();
1705 SetEntryList(save_elist);
1722 if (!fSelectedSelections.
IsEmpty()) {
1724 SetEntryList(
nullptr);
1727 for (
int i = 0; i < nsel; i++) {
1731 if (i > 0) newselect +=
" || ";
1732 newselect += tmp.
Data();
1735 SetEntryList(save_elist);
1748 if (!fSelectedSelections.
IsEmpty()) {
1750 if (nsel < 1)
return;
1751 for (
int i = 0; i < nsel; i++) {
1758 SetAnalysisModifiedSinceLastSave(
kTRUE);
1760 G_selectionlist->
Display(&fSelections);
1781 if (fSelectedSelections.
IsEmpty()) {
1783 else if (fSelectedSelections.
GetEntries() == 1) {
1786 if (tmp->
GetSize() != 0 || !strcmp(
"", G_selection_text->
GetText())) {
1787 G_selection_text->
SetText(((
TNamed*)fSelectedSelections.
At(0))->GetTitle());
1792 else if (fSelectedSelections.
GetEntries() > 1) {
1818 fXLeaf = fYLeaf = 0;
1833 else if (strcmp(fLeafExpr.
Data(), G_leaf_expr->
GetTitle())) {
1846 else if (nleaf == 2) {
1847 fXLeaf = (
TNamed*)fSelectedLeaves->
At(1);
1852 fLeafExpr.
Form(
"%s:%s", Y.
Data(),
X.Data());
1856 else if (nleaf == 3) {
1857 fXLeaf = (
TNamed*)fSelectedLeaves->
At(2);
1858 fYLeaf = (
TNamed*)fSelectedLeaves->
At(1);
1859 fZLeaf = (
TNamed*)fSelectedLeaves->
At(0);
1885 G_leaf_expr->
SetText(fLeafExpr);
1893 bool KVTreeAnalyzer::DefineUserBinning()
1896 {
"Ybins", fNy}, {
"Ymin", fYmin}, {
"Ymax", fYmax}};
1900 if (cancel)
return false;
1901 fNx =
p.GetIntValue(
"Xbins");
1902 fXmin =
p.GetDoubleValue(
"Xmin");
1903 fXmax =
p.GetDoubleValue(
"Xmax");
1904 fNy =
p.GetIntValue(
"Ybins");
1905 fYmin =
p.GetDoubleValue(
"Ymin");
1906 fYmax =
p.GetDoubleValue(
"Ymax");
1914 bool KVTreeAnalyzer::DefineUserBinning1F()
1920 if (cancel)
return false;
1921 fNxF =
p.GetIntValue(
"bins");
1922 fXminF =
p.GetDoubleValue(
"min");
1923 fXmaxF =
p.GetDoubleValue(
"max");
1931 bool KVTreeAnalyzer::DefineUserBinningD()
1933 KVNameValueList p{{
"Xbins", fNxD}, {
"Ybins", fNyD}, {
"ordered?", fOrderedDalitz}};
1937 if (cancel)
return false;
1938 fNxD =
p.GetIntValue(
"Xbins");
1939 fNyD =
p.GetIntValue(
"Ybins");
1940 fOrderedDalitz =
p.GetBoolValue(
"ordered?");
1952 double KVTreeAnalyzer::GetTreeMaximum(
const TString& leafname)
1961 auto leaf = fTree->
GetLeaf(leafname);
1962 if (!leaf)
return 0;
1968 if (entryNumber < 0)
break;
1969 branch->GetEntry(entryNumber);
1970 for (
Int_t j = 0; j < leaf->GetLen(); ++j) {
1988 double KVTreeAnalyzer::GetTreeMinimum(
const TString& leafname)
1997 auto leaf = fTree->
GetLeaf(leafname);
1998 if (!leaf)
return 0;
2004 if (entryNumber < 0)
break;
2005 branch->GetEntry(entryNumber);
2006 for (
Int_t j = 0; j < leaf->GetLen(); ++j) {
2020 const Char_t* KVTreeAnalyzer::get_leaf_type_name(
const TNamed* l)
2037 if (fLeafExpr ==
"-")
return;
2039 if (threeDexp && !fProfileHisto) {
2049 if (!DefineWeight())
return;
2052 int nx = 500, ny = 500;
2059 if (fXLeaf->
InheritsFrom(
"TLeaf") && !strcmp(get_leaf_type_name(fXLeaf),
"Char_t")) {
2063 if (fYLeaf->
InheritsFrom(
"TLeaf") && !strcmp(get_leaf_type_name(fYLeaf),
"Char_t")) {
2068 if (threeDexp) fLeafExpr.
Form(
"%s:%s:%s", Zexpr.
Data(), Yexpr.
Data(), Xexpr.
Data());
2069 else fLeafExpr.
Form(
"%s:%s", Yexpr.
Data(), Xexpr.
Data());
2071 name.Form(
"h%d", fHistoNumber);
2072 TString drawexp(fLeafExpr), histo, histotitle;
2073 if (fUserWeight) GenerateHistoTitle(histotitle, fLeafExpr,
"", fWeight);
2074 else GenerateHistoTitle(histotitle, fLeafExpr,
"");
2078 unique_ptr<KVSeqCollection> same_histo(fHistolist.
GetSubListWithMethod(histotitle,
"GetHistoTitle"));
2079 TIter nxtSame(same_histo.get());
2082 if ((fProfileHisto && kvhisto->
IsProfile()) || (!fProfileHisto && kvhisto->
IsTH2())) {
2089 if (!DefineUserBinning())
return;
2092 xmin = GetTreeMinimum(Xexpr);
2093 xmax = GetTreeMaximum(Xexpr);
2095 (!strcmp(get_leaf_type_name(fXLeaf),
"Int_t") || !strcmp(get_leaf_type_name(fXLeaf),
"Short_t") || !strcmp(get_leaf_type_name(fXLeaf),
"Char_t"))
2101 ymin = GetTreeMinimum(Yexpr);
2102 ymax = GetTreeMaximum(Yexpr);
2104 (!strcmp(get_leaf_type_name(fYLeaf),
"Int_t") || !strcmp(get_leaf_type_name(fYLeaf),
"Short_t") || !strcmp(get_leaf_type_name(fYLeaf),
"Char_t"))
2119 if (!fProfileHisto) histo.
Form(
">>%s(%d,%f,%f,%d,%f,%f)",
name.Data(), nx,
xmin,
xmax, ny,
ymin,
ymax);
2121 if (fUserBinning) histo.
Form(
">>%s(%d,%f,%f)",
name.Data(), nx,
xmin,
xmax);
2122 else histo.
Form(
">>%s",
name.Data());
2126 if (fUserWeight) ww += fWeight;
2128 if (!fProfileHisto) drawResult = fTree->
Draw(drawexp, ww.
Data(),
"goff");
2129 else drawResult = fTree->
Draw(drawexp, ww.
Data(),
"prof,goff");
2130 if (drawResult < 0) {
2174 TString xType(get_leaf_type_name(fXLeaf));
2175 TString yType(get_leaf_type_name(fYLeaf));
2176 TString zType(get_leaf_type_name(fZLeaf));
2179 KVError::Warning(
this,
"DrawAsDalitz",
"Leaves %s must have the same type !", fLeafExpr.
Data());
2186 Int_t vari1, vari2, vari3;
2188 Char_t varc1, varc2, varc3;
2196 else if (xType.
Contains(
"Short_t")) {
2201 else if (xType.
Contains(
"Char_t")) {
2206 else if (xType.
Contains(
"Double_t")) {
2211 else if (xType.
Contains(
"Float_t")) {
2218 if (!DefineUserBinningD())
return;
2222 GenerateHistoTitle(histotitle, fLeafExpr,
"");
2225 if (fUserBinning)
h =
new KVDalitzPlot(
Form(
"h%d", fHistoNumber), histotitle.
Data(), fOrderedDalitz, fNxD, 0., 1.2, fNyD, 0., 1.2);
2234 for (
int i = 0; i <
nentries; i++) {
2236 if (el) j = el->
Next();
2243 else if (xType.
Contains(
"Short_t")) {
2248 else if (xType.
Contains(
"Char_t")) {
2253 else if (xType.
Contains(
"Double_t")) {
2258 else if (xType.
Contains(
"Float_t")) {
2263 h->FillAsDalitz(
x,
y, z);
2281 bool KVTreeAnalyzer::DefineWeight()
2288 Bool_t cancel_pressed{
false};
2292 if (cancel_pressed)
return false;
2293 fWeight = params.GetStringValue(
"Weight");
2307 if (!DefineWeight())
return;
2310 TH1* histo =
nullptr;
2317 if (fUserWeight) GenerateHistoTitle(htit, expr,
"", fWeight);
2318 else GenerateHistoTitle(htit, expr,
"");
2320 if (kvhisto) histo = kvhisto->
GetHisto();
2322 if (
type.Contains(
"Int_t") ||
type.Contains(
"Char_t") ||
type.Contains(
"Short_t") ||
type ==
"Long_t" ||
type ==
"Long64_t") {
2325 if (
type.Contains(
"Char_t")) {
2335 histo =
MakeHisto(expr,
"", 500, 0, (fUserWeight ? fWeight.
Data() :
""));
2347 GenerateHistoTitle(htit, expr,
"", (fUserWeight ? fWeight.
Data() :
""));
2349 if (kvhisto) histo = kvhisto->
GetHisto();
2350 if (!histo) histo =
MakeHisto(expr,
"", 500, 0, (fUserWeight ? fWeight.
Data() :
""));
2403 fPROOFEnabled = yes;
2423 Info(
"Save",
"Saving analysis %s in file %s",
GetTitle(), fSaveAnalysisFileName.
Data());
2424 SaveAs(fSaveAnalysisFileName);
2425 SetAnalysisModifiedSinceLastSave(
kFALSE);
2631 TIter next(&fHistolist);
2636 if (
h->IsType(
"Histo") && !strcmp(
h->GetExpression(), expr)) hlist->
Add(
h->GetHisto());
2652 TIter next(&fHistolist);
2657 if (
h->IsType(
"Histo") && !strcmp(
h->GetSelection(), expr)) hlist->
Add(
h->GetHisto());
2668 TIter next(&fHistolist);
2673 if (
h->IsType(
"Histo") && !strcmp(
h->GetExpression(), expr) && !strcmp(
h->GetSelection(), selection)) {
2674 if (strcmp(weight,
"")) {
2675 if (!strcmp(
h->GetWeight(), weight))
return h->GetHisto();
2677 else return h->GetHisto();
2698 TIter next(&fHistolist);
2703 if (
h->IsType(
"Histo") && !strcmp(
h->GetExpression(), expr) && !strcmp(
h->GetSelection(), selection) && !strcmp(
h->GetWeight(), weight)) {
2706 SetAnalysisModifiedSinceLastSave(
kTRUE);
2709 G_histolist->
Display(&fHistolist);
2722 if (nsel < 1)
return;
2723 for (
int i = 0; i < nsel; i++) {
2727 SetAnalysisModifiedSinceLastSave(
kTRUE);
2729 G_histolist->
Display(&fHistolist);
2747 if (fSelectedHistos.
GetEntries() != 2)
return;
2750 if (HistoToAdd1 && HistoToAdd2) {
2751 Info(
"AddSelectedHistos",
"Adding %s and %s", HistoToAdd1->
GetName(), HistoToAdd2->
GetName());
2756 ResetMethodCalled();
2759 Info(
"AddSelectedHistos",
"Call to context menu not OK");
2760 delete HistoAddResult;
2763 if (MethodNotCalled()) {
2764 Info(
"AddSelectedHistos",
"You pressed cancel");
2765 delete HistoAddResult;
2769 AddHisto(HistoAddResult);
2772 Info(
"AddSelectedHistos",
"Only possible for 2 histograms");
2782 fMethodCalled =
kTRUE;
2783 HistoAddResult->
Add(HistoToAdd1, HistoToAdd2,
c1,
c2);
2803 old_lists.
AddAll(&fSelections);
2804 fSelections.
Clear();
2806 TIter next(&old_lists);
2808 SetEntryList(
nullptr);
2811 cout <<
"REGENERATING SELECTION : " << old_el->
GetTitle() << endl;
2814 G_selectionlist->
Display(&fSelections);
2830 HistoFileMenu_Open();
2835 case MH_APPLY_ANALYSIS:
2839 HistoFileMenu_Save();
2845 delete fMain_histolist;
2851 TIter next(fgAnalyzerList);
2856 while (
tan ==
this);
2857 tan->AnalysisSaveCheck();
2860 AnalysisSaveCheck();
2861 gROOT->ProcessLine(
".q");
2891 case SEL_GEN_CONST_XSEC:
2924 void KVTreeAnalyzer::HistoFileMenu_Open()
2929 const char* filetypes[] = {
2930 "Analysis files",
"Analysis*.root",
2952 const char* filetypes[] = {
2953 "ROOT files",
"*.root",
2970 void KVTreeAnalyzer::OpenChain()
2975 const char* filetypes[] = {
2976 "ROOT files",
"*.root*",
2987 TString theTreeName, theTreeTitle;
2993 if (trees->GetEntries()) {
2994 theTreeName = trees->
First()->GetName();
2995 theTreeTitle = trees->
First()->GetTitle();
2997 if (theTreeName !=
"") {
3000 if (got_histos_or_tree_from_file) newAnal =
new KVTreeAnalyzer(kFALSE);
3001 newAnal->OpenChain(theTreeName, theTreeTitle, fi.
fFileNamesList);
3011 if (got_histos_or_tree_from_file) newAnal =
new KVTreeAnalyzer(kFALSE);
3014 if(newAnal->got_histos_or_tree_from_file) newAnal->SetWindowTitle(
file->GetName());
3028 const char* filetypes[] = {
3029 "ROOT files",
"*.root",
3046 void KVTreeAnalyzer::HistoFileMenu_Save()
3048 const char* filetypes[] = {
3049 "Analysis files",
"Analysis*.root",
3060 if (!filenam.Contains(
'.'))
3063 fSaveAnalysisFileName = filenam;
3066 fAnalysisSaveDir = fi.
fIniDir;
3077 while ((akey = (
TKey*)next())) {
3083 got_histos_or_tree_from_file =
true;
3087 G_histolist->
Display(&fHistolist);
3095 void KVTreeAnalyzer::OpenSingleFile(
TFile*
file)
3104 if (trees->GetEntries()) {
3106 TString aTreeName = trees->First()->GetName();
3111 OpenChain(aTreeName, trees->First()->GetTitle(), &fileList);
3114 SetWindowTitle(
file->GetName());
3129 AnalysisSaveCheck();
3132 TObject* kvta =
file->GetListOfKeys()->FindObject(
"KVTreeAnalyzer");
3137 OpenSingleFile(
file);
3155 fChain =
new TChain(treename, treetitle);
3158 while ((o = nxt())) fChain->
Add(o->
GetName());
3162 fSelections.
Clear();
3165 fSelectionNumber = 1;
3167 fSameColorIndex = 0;
3168 fSelectedLeaves = 0;
3169 SetAnalysisModifiedSinceLastSave(
kFALSE);
3170 G_selectionlist->
Display(&fSelections);
3171 G_histolist->
Display(&fHistolist);
3188 while ((o = next())) {
3190 Info(
"GenerateAllAliases",
"Adding alias %s to leaflist", o->
GetTitle());
3220 TObject* kvta =
file->GetListOfKeys()->FindObject(
"KVTreeAnalyzer");
3237 applyAnal->SetEntryList(
nullptr);
3238 applyAnal->G_selection_status->
SetText(
"CURRENT SELECTION:", 0);
3250 exp.ReplaceAll(
"d2r",
"TMath::DegToRad()");
3251 exp.ReplaceAll(
"r2d",
"TMath::RadToDeg()");
3253 SetAnalysisModifiedSinceLastSave(
kTRUE);
3260 static const char* gSaveAsTypes[] = {
"PostScript",
"*.ps",
3261 "Encapsulated PostScript",
"*.eps",
3266 "ROOT files",
"*.root",
3289 Info(
"SetUpHistoAutoSave",
"Select image filetype and directory");
3292 static Int_t typeidx = 0;
3305 fAutoSaveDir = dir.
Data();
3307 Info(
"SetUpHistoAutoSave",
"file-type:%s directory:%s", fAutoSaveType.
Data(), fAutoSaveDir.
Data());
3321 static TString lastFilename =
"";
3324 gPad->SaveAs(lastFilename);
3334 title.
Append(fAutoSaveType);
3337 Info(
"AutoSaveHisto",
"Saved as: %s", title.
Data());
3338 gPad->SaveAs(title);
3339 lastFilename = title;
3353 TIter nextSel(list);
3355 while ((
sel = nextSel())) {
3357 Info(
"GenerateAllSelections",
"Generating selection: %s",
sel->GetTitle());
3374 TIter nextHist(list);
3378 if (!obj->
IsType(
"Cut")) {
3384 if (weight ==
"1") weight =
"";
3386 Info(
"GenerateAllHistograms",
"Generating histogram: %s", hist->
GetTitle());
3424 if (fChain && fTree != fChain)
SetTree(fChain);
3427 Info(
"Streamer",
"Checking friends");
3436 Info(
"Streamer",
"Found friend to convert to TChain");
3440 Info(
"Streamer",
"Choose file containg friend tree %s", fe->
GetTreeName());
3442 const char* filetypes[] = {
3443 "ROOT files",
"*.root",
3461 Info(
"Streamer",
"Removing TTree friends");
3463 while (!toRemove.
End()) {
3467 Info(
"Streamer",
"Adding friends as TChains");
3468 while (!toRemove.
End()) {
3469 idx = toRemove.
Next();
3483 fHistolist.
Clear(
"nodelete");
3486 while ((obj = (
TNamed*)next())) {
3494 SetAnalysisModifiedSinceLastSave(kTRUE);
3498 TIter next(&fHistolist);
3501 if (
h->IsType(
"Histo"))
h->ParseExpressionAndSelection();
3528 if (trees->GetEntries()) {
3538 while ((akey = (
TKey*)next())) {
3547 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
Bool_t IsType(const Char_t *typ, bool case_insensitive=false) 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),...)