1 #include "KVIDGridManagerGUI.h"
3 #include "KVIDGridManager.h"
13 #include <KVTestIDGridDialog.h>
15 #include <KVIDGUITelescopeChooserDialog.h>
16 #include <KVDropDownDialog.h>
17 #include <KVIdentificationResult.h>
18 #include <KVReconstructedNucleus.h>
20 #include "KVInputDialog.h"
21 #include "KVIDCutLine.h"
22 #include "KVIDCutContour.h"
23 #include "KVVirtualIDFitter.h"
38 fLastSelectedGrid = 0;
44 gEnv->
SetValue(
"Browser.StartUrl",
"https://kaliveda.in2p3.fr/class");
47 gIDGridManager->Connect(
"Modified()",
"KVIDGridManagerGUI",
this,
48 "UpdateListOfGrids()");
56 sgm->
AddEntry(
"Selected", M_GRIDS_SAVE_SEL);
57 sgm->
AddEntry(
"Tab", M_GRIDS_SAVE_TAB);
58 sgm->
AddEntry(
"All", M_GRIDS_SAVE_ALL);
59 fMenuFile->AddPopup(
"Save...", sgm);
61 fMenuFile->AddSeparator();
64 sgm->
AddEntry(
"Selected", M_GRIDS_DEL_SEL);
65 sgm->
AddEntry(
"Tab", M_GRIDS_DEL_TAB);
66 sgm->
AddEntry(
"All", M_GRIDS_DEL_ALL);
67 fMenuFile->AddPopup(
"Delete...", sgm);
68 fMenuFile->AddSeparator();
69 fMenuFile->AddEntry(
"&Quit", M_QUIT);
71 fMenuFile->Connect(
"Activated(Int_t)",
"KVIDGridManagerGUI",
this,
72 "HandleGridsMenu(Int_t)");
80 sgm->
AddEntry(
"Runlist", M_GRIDS_SET_RUNLIST);
81 sgm->
AddEntry(
"X Variable", M_GRIDS_SET_VARX);
82 sgm->
AddEntry(
"Y Variable", M_GRIDS_SET_VARY);
84 sgm->
AddEntry(
"Z ID Only", M_GRIDS_SET_ZID);
85 fMenuEdit->AddPopup(
"Set...", sgm);
86 fMenuEdit->AddEntry(
"Clear", M_GRIDS_CLEAR);
87 fMenuEdit->Connect(
"Activated(Int_t)",
"KVIDGridManagerGUI",
this,
88 "HandleGridsMenu(Int_t)");
94 fMenuBar->AddPopup(
"&File", fMenuFile, fMenuBarItemLayout);
95 fMenuBar->AddPopup(
"&Edit", fMenuEdit, fMenuBarItemLayout);
108 const char* xpms[] = {
121 const char* tips[] = {
122 "Open file containing grids",
123 "Save all grids in current file",
126 "Delete selected grid(s)",
127 "Set ID telescopes for grid",
157 const char* method[] = {
162 "DeleteSelectedGrids()",
166 "UpdateListOfGrids()",
181 *buttons[i] = fToolBar->AddButton(
this, &t[i], spacing[i]);
182 (*buttons[i])->Connect(
"Clicked()",
"KVIDGridManagerGUI",
this, method[i]);
183 fTBbuttons[i] = *buttons[i];
208 fGridListTabs =
new TGTab(fHframe, 550, 400);
209 fGridListTabs->Connect(
"Selected(Int_t)",
"KVIDGridManagerGUI",
this,
"TabSelect(Int_t)");
214 fHframe->AddFrame(fGridListTabs,
219 TGLabel* lab1 =
new TGLabel(line_frame,
"CURRENT GRID IDENTIFIERS");
224 fIDLineList->SetDataColumns(5);
225 fIDLineList->SetDataColumn(0,
"Name",
"",
kTextLeft);
228 fIDLineList->SetDataColumn(3,
"OnlyZId",
"OnlyZId",
kTextCenterX);
229 fIDLineList->SetDataColumn(4,
"MassFormula",
"",
kTextCenterX);
230 fIDLineList->GetDataColumn(3)->SetIsBoolean();
231 fIDLineList->ActivateSortButtons();
232 fIDLineList->AllowBrowse(
kFALSE);
237 lab1 =
new TGLabel(line_frame,
"Cuts");
241 fCUTList->SetDataColumns(3);
242 fCUTList->SetDataColumn(0,
"Name",
"",
kTextLeft);
244 fCUTList->SetDataColumn(2,
"Selection",
"GetSelectionType",
kTextCenterX);
245 fCUTList->ActivateSortButtons();
246 fCUTList->AllowBrowse(
kFALSE);
251 lab1 =
new TGLabel(line_frame,
"Infos");
255 fCUTInfoList->SetDataColumns(3);
256 fCUTInfoList->SetDataColumn(0,
"Name",
"",
kTextLeft);
257 fCUTInfoList->SetDataColumn(1,
"# Points",
"GetN",
kTextCenterX);
258 fCUTInfoList->SetDataColumn(2,
"Class",
"ClassName",
kTextCenterX);
259 fCUTInfoList->ActivateSortButtons();
260 fCUTInfoList->AllowBrowse(
kFALSE);
269 SetWindowName(
"ID Grid Manager");
273 Resize(GetDefaultSize());
275 SetWMSize(1200, 600);
287 KVIDGridManagerGUI::~KVIDGridManagerGUI()
291 gIDGridManager->Disconnect(
"Modified()",
this,
"UpdateListOfGrids()");
312 if (fIDGridEditor->IsClosed()) fIDGridEditor->
StartViewer();
316 fSelectedGrid->UpdateLastSavedVersion();
317 fIDGridEditor->SetGrid(fSelectedGrid);
338 static TString dir(
"$(HISTOROOT)");
347 const char* filetypes[] = {
"Root files",
"*.root",
"All files",
"*", 0, 0};
378 cout <<
"Add new grid" << endl;
385 case M_GRIDS_SAVE_SEL:
387 SaveGridsAs(&fSelectedEntries);
390 case M_GRIDS_SAVE_TAB:
392 SaveGridsAs(GetAllGridsInTab());
395 case M_GRIDS_SAVE_ALL:
401 case M_GRIDS_DEL_SEL:
402 DeleteSelectedGrids();
405 case M_GRIDS_DEL_TAB:
409 new TGMsgBox(fClient->GetDefaultRoot(),
this,
"ID Grid Manager",
410 "This will delete all grids in the current tab. Are you sure ?",
412 if (ret_val &
kMBOk) {
413 DeleteAllGridsInTab();
417 case M_GRIDS_DEL_ALL:
422 new TGMsgBox(fClient->GetDefaultRoot(),
this,
"ID Grid Manager",
423 "This will delete all grids. Are you sure ?",
425 if (ret_val &
kMBOk) {
426 gIDGridManager->
Clear();
435 case M_GRIDS_SET_RUNLIST:
438 if (!fSelectedGrid)
break;
439 TString runs = fSelectedGrid->GetRunList();
441 new KVInputDialog(
this,
"Enter list of runs for grid(s):", &runs, &ok_pressed,
442 "Example: 1-10, 13, 22-657");
443 if (!ok_pressed)
break;
444 TIter next(&fSelectedEntries);
451 case M_GRIDS_SET_VARX:
454 if (!fSelectedGrid)
break;
455 TString runs = fSelectedGrid->GetVarX();
457 new KVInputDialog(
this,
"Enter X variable for grid(s):", &runs, &ok_pressed,
459 if (!ok_pressed)
break;
460 TIter next(&fSelectedEntries);
467 case M_GRIDS_SET_VARY:
470 if (!fSelectedGrid)
break;
471 TString runs = fSelectedGrid->GetVarY();
473 new KVInputDialog(
this,
"Enter Y variable for grid(s):", &runs, &ok_pressed,
475 if (!ok_pressed)
break;
476 TIter next(&fSelectedEntries);
483 case M_GRIDS_SET_ZID:
486 if (!fSelectedGrid)
break;
487 Bool_t runs = !fSelectedGrid->HasMassIDCapability();
488 TIter next(&fSelectedEntries);
498 if (!fSelectedGrid)
break;
499 TIter next(&fSelectedEntries);
522 new TGMsgBox(fClient->GetDefaultRoot(),
this,
"ID Grid Manager",
523 "This will delete the selected grids. Are you sure ?",
525 if (ret_val &
kMBOk) {
537 const char* filetypes[] = {
538 "ID Grid files",
"*.dat",
555 SetStatus(
Form(
"Read %d grids from file %s", ngriread, fi.
fFilename));
560 new TGMsgBox(fClient->GetDefaultRoot(),
this,
"ID Grid Manager",
612 fSelectedEntries = fIDGridList->GetSelectedObjects();
613 fSelectedGrid = (
KVIDGraph*)fIDGridList->GetLastSelectedObject();
614 if (!GetNSelected())fSelectedGrid = 0x0;
617 ActivateToolbarButtons();
618 if (!GetNSelected()) SetStatus();
619 else if (GetNSelected() == 1) SetStatus(
Form(
"Selected grid %s (%s)", fSelectedGrid->GetName(), fSelectedGrid->ClassName()));
620 else SetStatus(
Form(
"Selected %d grids, last selected grid %s (%s)", GetNSelected(), fSelectedGrid->GetName(), fSelectedGrid->ClassName()));
640 if (!GetNSelected())
return;
642 fIDGridList->RemoveAll();
648 if (fLastSelectedGrid == entry) fLastSelectedGrid = 0;
651 fSelectedEntries.Clear();
670 fSelectedEntries.Clear();
684 new TGMsgBox(fClient->GetDefaultRoot(),
this,
"ID Grid Manager",
685 "Set IDTelescope for selected grid(s) using grid name ?",
689 for(
auto tidg : fSelectedEntries)
691 auto idg =
dynamic_cast<KVIDGraph*
>(tidg);
693 Info(
"SetIDTelescopes",
"Setting IDTelescope for %s...", idg->GetName());
695 idg->AddIDTelescope(gMultiDetArray->
GetIDTelescope(idg->GetName()));
697 idg->AddIDTelescope(idg->GetName());
702 TString idtels;
bool ok_pressed=
false;
703 new KVInputDialog(
this,
"Enter names of IDTelescopes to use for grid(s):",
704 &idtels, &ok_pressed,
"Separate the names with commas!");
707 for(
auto tidg : fSelectedEntries)
709 auto idg =
dynamic_cast<KVIDGraph*
>(tidg);
734 if (GetNSelected() == 1)
735 fSelectedGrid->Clear();
736 else if (GetNSelected() > 1) {
738 TIter next(&fSelectedEntries);
747 Clist->R__FOR_EACH(
TCanvas, Modified)();
748 Clist->R__FOR_EACH(
TCanvas, Update)();
758 if (!fSelectedGrid)
return;
759 gIDGridManager->Disconnect(
"Modified()",
this,
"UpdateListOfGrids()");
761 fSelectedGrid->Copy(*new_gr);
766 gIDGridManager->Connect(
"Modified()",
"KVIDGridManagerGUI",
this,
"UpdateListOfGrids()");
767 fIDGridList->Sort(0);
768 fIDGridList->Sort(0);
789 Info(
"NewGrid",
"There are %d grids in the manager", gIDGridManager->
GetGrids()->
GetSize());
790 TString default_class =
"KVIDZAGrid";
792 if (gMultiDetArray) {
795 fClient->GetDefaultRoot(),
this);
796 if (cancel || !telescopes->
At(0)) {
797 Info(
"NewGrid",
"No ID telescopes chosen. Grid creation cancelled.");
801 default_class = ((
KVIDTelescope*)telescopes->
At(0))->GetDefaultIDGridClass();
810 choice.
Data(), default_class.
Data(), &id_grid_class, &ok_pressed);
812 Info(
"NewGrid",
"No ID grid class chosen. Grid creation cancelled.");
815 gIDGridManager->Disconnect(
"Modified()",
this,
"UpdateListOfGrids()");
819 gIDGridManager->Connect(
"Modified()",
"KVIDGridManagerGUI",
this,
"UpdateListOfGrids()");
853 const char* filetypes[] = {
854 "ID Grid files",
"*.dat",
871 SetStatus(
Form(
"Saved %d grids in file %s", n_saved, filenam.
Data()));
877 new TGMsgBox(fClient->GetDefaultRoot(),
this,
"ID Grid Manager",
878 Form(
"Could not write file %s", filenam.
Data()), 0,
901 auto grids = gIDGridManager->
GetGrids();
902 create_and_fill_id_grid_list(
"Grids", grids);
907 while (! labels.
End()) {
910 create_and_fill_id_grid_list(lab, grids.get());
928 fIDGridList->SelectionChanged();
940 fIDGridList->SetDataColumns(11);
941 fIDGridList->SetDataColumn(0,
"Name",
"",
kTextLeft);
942 fIDGridList->SetDataColumn(2,
"VarX",
"",
kTextLeft);
943 fIDGridList->SetDataColumn(1,
"VarY",
"",
kTextLeft);
944 fIDGridList->SetDataColumn(3,
"ID Telescopes",
"GetNamesOfIDTelescopes",
kTextLeft);
945 fIDGridList->SetDataColumn(4,
"RunList",
"",
kTextLeft);
946 fIDGridList->SetDataColumn(5,
"Identify Z and A?",
"HasMassIDCapability",
kTextCenterX);
947 fIDGridList->GetDataColumn(5)->SetIsBoolean();
948 fIDGridList->SetDataColumn(6,
"# Ident.",
"GetNumberOfIdentifiers",
kTextRight);
949 fIDGridList->SetDataColumn(7,
"# Cuts",
"GetNumberOfCuts",
kTextRight);
950 fIDGridList->SetDataColumn(8,
"# Infos",
"GetNumberOfInfos",
kTextRight);
951 fIDGridList->SetDataColumn(9,
"Last modified",
"GetTimestamp",
kTextCenterX);
952 fIDGridList->SetDataColumn(10,
"Saved",
"GetFileWrite",
kTextCenterX);
953 fIDGridList->ActivateSortButtons();
954 fIDGridList->Connect(
"SelectionChanged()",
"KVIDGridManagerGUI",
this,
955 "SelectionChanged()");
956 fIDGridList->SetDoubleClickAction(
"KVIDGridManagerGUI",
this,
"StartEditor(TObject*)");
961 fIDGridList->Display(grid_list);
982 create_and_fill_id_grid_list(
"Grids");
983 fGridListTabs->MapSubwindows();
984 fGridListTabs->Layout();
985 Int_t ntabs = fGridListTabs->GetCurrent();
994 cout <<
"cf = 0x0 : label=Grids tab name=" <<
995 fGridListTabs->GetTabTab(
"Grids")->GetText()->GetString() << endl;
1000 auto grids = gIDGridManager->
GetGrids();
1001 fIDGridList->Display(grids);
1004 Int_t ntabs = fGridListTabs->GetCurrent();
1010 while (! labels.
End()) {
1012 if (!fGridListTabs->GetTabContainer(lab)) {
1014 create_and_fill_id_grid_list(lab,grids.get());
1015 fGridListTabs->MapSubwindows();
1016 fGridListTabs->Layout();
1017 fGridListTabs->SetTab(fGridListTabs->GetNumberOfTabs() - 1,
kTRUE);
1023 cout <<
"cf = 0x0 : label=" << lab.
Data() <<
" tab name=" <<
1024 fGridListTabs->GetTabTab(lab.
Data())->GetText()->GetString() << endl;
1035 fIDGridList->Display(grids);
1038 if (grids)
delete grids;
1047 Int_t ntabs = fGridListTabs->GetCurrent();
1061 Int_t ntabs = fGridListTabs->GetNumberOfTabs();
1063 for (
Int_t itab = 0; itab < ntabs; itab++) {
1066 KVString lab = fGridListTabs->GetTabTab(itab)->GetString();
1079 fGridListTabs->RemoveTab(itab,
kFALSE);
1084 if (recursive) RemoveEmptyTabs();
1085 fGridListTabs->MapSubwindows();
1086 fGridListTabs->Layout();
1100 if (!fLastSelectedGrid)
return;
1102 KVList* ids = fLastSelectedGrid->GetIdentifiers();
1105 fIDLineList->Display(ids);
1107 fCUTList->Display(fSelectedGrid->GetCuts());
1111 fCUTInfoList->Display(fSelectedGrid->GetInfos());
1133 if (GetNSelected() == 1 && fSelectedGrid) {
1134 KVList* ids = fSelectedGrid->GetIdentifiers();
1137 fIDLineList->Display(ids);
1138 fCUTList->Display(fSelectedGrid->GetCuts());
1139 fCUTInfoList->Display(fSelectedGrid->GetInfos());
1140 if (fLastSelectedGrid) {
1141 fLastSelectedGrid->Disconnect(
"Modified()",
this,
"UpdateListOfLines()");
1143 fSelectedGrid->Connect(
"Modified()",
"KVIDGridManagerGUI",
this,
"UpdateListOfLines()");
1144 fLastSelectedGrid = fSelectedGrid;
1147 fIDLineList->RemoveAll();
1148 fCUTList->RemoveAll();
1149 fCUTInfoList->RemoveAll();
1150 if (fLastSelectedGrid) {
1151 fLastSelectedGrid->Disconnect(
"Modified()",
this,
"UpdateListOfLines()");
1152 fLastSelectedGrid = 0;
1165 for (
int i = 0; i < fNbButtons; i++) fTBbuttons[i]->SetEnabled(
kFALSE);
1167 fTBOpen->SetEnabled();
1168 fTBRefresh->SetEnabled();
1170 fTBNewG->SetEnabled();
1171 fTBOpenRoot->SetEnabled();
1175 if (!GetNSelected())
return;
1178 fTBDelG->SetEnabled();
1180 fTBSetIDG->SetEnabled();
1182 if (GetNSelected() == 1) {
1184 fTBStartEditor->SetEnabled();
1185 fTBCopyG->SetEnabled();
1216 if (!fSelectedGrid || GetNSelected() != 1)
return;
1218 resname.
Form(
"%s.IDClass", fSelectedGrid->ClassName());
1220 resname.
Form(
"%s.DefaultIDClass", fSelectedGrid->ClassName());
1226 "Choose class of new identifier :",
1231 if (!okpressed)
return;
1234 cut_class = cut_choices;
1235 SetStatus(
Form(
"Draw ID line (%s) in current pad", cut_class.
Data()));
1236 fSelectedGrid->DrawAndAdd(
"ID", cut_class.
Data());
1268 if (!fSelectedGrid || GetNSelected() != 1)
return;
1270 resname.
Form(
"%s.CutClass", fSelectedGrid->ClassName());
1272 resname.
Form(
"%s.DefaultCutClass", fSelectedGrid->ClassName());
1275 TString cut_types = cut_choices;
1280 "Choose class of new cut :",
1285 if (!okpressed)
return;
1288 cut_class = cut_types;
1289 SetStatus(
Form(
"Draw cut %s in current pad", cut_class.
Data()));
1291 fSelectedGrid->DrawAndAdd(
"CUT", cut_class.
Data());
1309 if (GetNSelected() != 1)
return;
1310 if (!fSelectedGrid)
return;
1314 TIter next(
gPad->GetListOfPrimitives());
1316 while ((o = next())) {
1324 SetStatus(
"No TH2 found in current pad. Select pad containing 2D histo with data to identify.");
1328 SetStatus(
Form(
"Test identification of data in current pad %s.", histo->
GetName()));
1330 new KVTestIDGridDialog(fClient->GetDefaultRoot(),
this, 10, 10, fSelectedGrid, histo);
1345 if (GetNSelected() != 1)
return;
1346 if (!fSelectedGrid)
return;
1350 TIter next(
gPad->GetListOfPrimitives());
1352 while ((o = next())) {
1360 SetStatus(
"No TH2 found in current pad. Select pad containing 2D histo with data to identify.");
1364 SetStatus(
Form(
"Test identification of data in current pad %s.", histo->
GetName()));
1366 TFile* tmpfiles = TestIdentificationWithTree(fSelectedGrid, histo->
GetName());
1368 SetStatus(
"There was a problem with the test ???");
1372 TH2*
id = (
TH2*)tmpfiles->
Get(
"idcode_map");
1396 TFile* KVIDGridManagerGUI::TestIdentificationWithTree(
KVIDGraph* gr,
const Char_t* name_of_data_histo)
1414 printf(
" KVIDGraph::TestIdentificationWithTree l histo %s n existe pas\n", name_of_data_histo);
1426 if ((tid = (
TTree*)
gROOT->FindObject(
"tree_idresults"))) {
1427 printf(
" KVIDGraph::TestIdentificationWithTree effacemenent de l arbre existant\n");
1431 TString fn(
"IDtestTree.root");
1433 TFile* tmpfile =
new TFile(fn.Data(),
"recreate");
1436 tid =
new TTree(
"tree_idresults",
"pid");
1437 Float_t br_xxx, br_yyy, br_stat, br_pid;
1438 Int_t br_idcode, br_isid;
1440 tid->
Branch(
"X", &br_xxx,
"br_xxx/F");
1441 tid->
Branch(
"Y", &br_yyy,
"br_yyy/F");
1442 tid->
Branch(
"Stat", &br_stat,
"br_stat/F");
1444 tid->
Branch(
"PID", &br_pid,
"br_pid/F");
1445 tid->
Branch(
"IDcode", &br_idcode,
"br_idcode/I");
1446 tid->
Branch(
"IsIdentified", &br_isid,
"br_isid/I");
1449 Int_t events_read = 0;
1453 for (
int i = 1; i <=
data->GetNbinsX(); i++) {
1454 for (
int j = 1; j <=
data->GetNbinsY(); j++) {
1461 Axis_t x0 =
data->GetXaxis()->GetBinCenter(i);
1462 Axis_t y0 =
data->GetYaxis()->GetBinCenter(j);
1463 Axis_t wx =
data->GetXaxis()->GetBinWidth(i);
1464 Axis_t wy =
data->GetYaxis()->GetBinWidth(j);
1476 for (
int k = 0; k < kmax; k++) {
1480 if (
gr->IsIdentifiable(x, y)) {
1482 gr->Identify(x, y, idr);
1485 br_idcode =
gr->GetQualityCode();
1496 events_read += (
Int_t) poids;
1497 percent = (1. * events_read / tot_events) * 100.;
1499 if (percent >= cumul) {
1500 cout << (
Int_t) percent <<
"\% processed" << endl;
1519 if (GetNSelected() != 1)
return;
1520 if (!fSelectedGrid)
return;
1521 SetStatus(
Form(
"Fitting grid %s", fSelectedGrid->GetName()));
1523 fitter->
SetGrid(fSelectedGrid);
1524 fitter->
SetPad(fSelectedGrid->GetPad());
1527 cm->Action(fitter,
m);
const Bool_t kIterBackward
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize UnmapWindow
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
Option_t Option_t TPoint TPoint percent
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
char * StrDup(const char *str)
R__EXTERN TSystem * gSystem
static const Char_t * GetListOfPlugins(const Char_t *base)
static void GetTempFileName(TString &base)
Ask user to choose between several options in a drop-down list.
ID Grid Manager dialog for choice of ID telescope(s)
Base class for particle identification in a 2D map.
void SetRunList(const char *runlist)
void Clear(Option_t *opt="") override
void SetVarY(const char *v) override
void ClearListOfIDTelescopes()
void SetVarX(const char *v) override
void AddIDTelescopes(const TList *)
Associate this graph with all ID telescopes in list.
static KVIDGraph * MakeIDGraph(const Char_t *)
void SetIDTelescopes(const TString &)
Set value of "IDTelescopes" parameter with comma-separated list of ID telescope names.
virtual void SetOnlyZId(Bool_t yes=kTRUE)
Identification grid editor GUI ,.
void StartViewer()
Close();.
Graphical interface tool for managing, creating, testing and fitting identification grids.
void TabSelect(Int_t)
called when a new tab is selected
void SaveGridsAs(const TCollection *=0)
void DeleteSelectedGrids()
warning message and confirmation
void HandleGridsMenu(Int_t id)
Receive signals emitted by items selected in Grids menu.
void DeleteAllGridsInTab()
delete the all grids in currently selected tab
void create_and_fill_id_grid_list(const KVString &tab_label, KVSeqCollection *grid_list=nullptr)
void SetIDTelescopes()
propose to set IDTelescopes parameter using grid names
void ActivateToolbarButtons()
disable all buttons
void ClearGrid()
deletes all lines in currently selected grid(s)
void CloseWindow() override
close viewer
void RemoveEmptyTabs()
Recursively remove any empty tabs.
void Clear(Option_t *opt="") override
Delete all grids and empty list, ready to start anew.
void GetListOfIDTelescopeLabels(KVString &)
void DeleteGrid(KVIDGraph *, Bool_t update=kTRUE)
Int_t WriteAsciiFile(const Char_t *filename, const TCollection *selection=0)
KVSeqCollection * GetGridsForIDTelescope(const Char_t *label)
KVSeqCollection * GetGrids()
Bool_t ReadAsciiFile(const Char_t *filename)
Base class for all detectors or associations of detectors in array which can identify charged particl...
Full result of one attempted particle identification.
Enhanced version of ROOT TGListView widget.
Extended TList class which owns its objects by default.
void Sort(Bool_t order=kSortAscending)
Bool_t ReadGridsFromAsciiFile(const Char_t *) const
KVIDTelescope * GetIDTelescope(const Char_t *name) const
Return pointer to DeltaE-E ID Telescope with "name".
Nuclei reconstructed from data measured by a detector array .
void SetIdentification(KVIdentificationResult *, KVIDTelescope *)
virtual Float_t GetPID() const
KaliVeda extensions to ROOT collection classes.
Int_t GetSize() const override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
GUI for testing identification grids.
ABC for fitting ID grids with functionals.
static KVVirtualIDFitter * GetDefaultFitter()
void SetPad(TVirtualPad *p)
void SetGrid(KVIDGraph *g)
TMethod * GetMethodAny(const char *method)
virtual Int_t GetEntries() const
virtual Int_t GetSize() const
T * Get(const char *namecycle)
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
virtual TList * GetList() const
void ChangeOptions(UInt_t options) override
void Reset(Option_t *option="") override
void SetBinContent(Int_t bin, Double_t content) override
TObject * At(Int_t idx) const override
const char * GetName() const override
TClass * IsA() const override
virtual Bool_t InheritsFrom(const char *classname) const
virtual Double_t Uniform(Double_t x1, Double_t x2)
const char * Data() const
TString & Prepend(char c, Ssiz_t rep=1)
void Form(const char *fmt,...)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
Bool_t cd(const char *path)
virtual const char * Getenv(const char *env)
virtual const char * BaseName(const char *pathname)
virtual char * ExpandPathName(const char *path)
virtual Int_t Branch(const char *folder, Int_t bufsize=32000, Int_t splitlevel=99)
virtual void StartViewer()
TFile * OpenFile(const TString &fin)
Double_t Min(Double_t a, Double_t b)