Logo ROOT  
Reference Guide
TParallelCoordEditor.cxx
Go to the documentation of this file.
1// @(#)root/treeviewer:$Id$
2// Author: Bastien Dalla Piazza 02/08/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
13#include "TParallelCoord.h"
14#include "TParallelCoordRange.h"
15#include "TParallelCoordVar.h"
16
17#include "TGFrame.h"
18#include "TGButton.h"
19#include "TGButtonGroup.h"
20#include "TGNumberEntry.h"
21#include "TGLabel.h"
22#include "TGTextEntry.h"
23#include "TGComboBox.h"
24#include "TGColorSelect.h"
25#include "TColor.h"
26#include "TG3DLine.h"
27#include "TGSlider.h"
28#include "TGDoubleSlider.h"
29#include "TTree.h"
30#include "TGListBox.h"
31#include "TGedPatternSelect.h"
32#include "TVirtualPad.h"
33#include "TCanvas.h"
34
35#include "Riostream.h"
36
37#include "TROOT.h"
38
40
41
42/** \class TParallelCoordEditor
43
44This is the TParallelCoord editor. It brings tools to explore datas
45Using parallel coordinates. The main tools are:
46
47 - Dots spacing : Set the dots spacing with whichone the lines
48 must be drawn. This tool is useful to reduce the image
49 cluttering.
50 - The Selections section : Set the current edited selection and
51 allows to apply it to the tree through a generated entry list.
52 - The Entries section : Set how many events must be drawn.
53 A weight cut can be defioned here (see TParallelCoord for a
54 a description of the weight cut).
55 - The Variables tab : To define the global settings to display
56 the axes. It is also possible to add a variable from its
57 expression or delete a selected one (also possible using right
58 click on the pad.
59*/
60
96};
97
98////////////////////////////////////////////////////////////////////////////////
99/// Normal constructor.
100
102 Int_t/*width*/, Int_t /*height*/,
103 UInt_t /*options*/, Pixel_t /*back*/)
104{
105 fPriority = 1;
106 fDelay = kTRUE;
107
108 // Line
109 MakeTitle("Line");
110
115 fGlobalLineWidth->Resize(91, 20);
116 f1->AddFrame(fGlobalLineWidth, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 1));
118
119 if (!TCanvas::SupportAlpha()) {
120
121 AddFrame(new TGLabel(this,"Dots spacing"),
123
124 TGHorizontalFrame *f2 = new TGHorizontalFrame(this);
126 fDotsSpacing->SetRange(0,60);
134 }
135 else {
136 TGLabel *AlphaLabel = new TGLabel(this,"Opacity");
137 AddFrame(AlphaLabel,
139 TGHorizontalFrame *f2a = new TGHorizontalFrame(this);
140 fAlpha = new TGHSlider(f2a,100,kSlider2|kScaleNo,kAlpha);
141 fAlpha->SetRange(0,1000);
146 fAlphaField->Resize(40,20);
149 }
150
151 fLineTypeBgroup = new TGButtonGroup(this,2,1,0,0, "Line type");
154 fLineTypePoly->SetToolTipText("Draw the entries with a polyline");
157 fLineTypeCurves->SetToolTipText("Draw the entries with a curve");
160
161 // Selections
162 MakeTitle("Selections");
163
164 fHideAllRanges = new TGCheckButton(this,"Hide all ranges",kHideAllRanges);
166
168 fSelectionSelect->Resize(140,20);
170
171 TGHorizontalFrame *f3 = new TGHorizontalFrame(this);
175 fSelectLineWidth->Resize(94, 20);
176 f3->AddFrame(fSelectLineWidth, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 1));
177 AddFrame(f3, new TGLayoutHints(kLHintsLeft | kLHintsTop,0,0,3,0));
178
180 fActivateSelection->SetToolTipText("Activate the current selection");
182 fShowRanges = new TGCheckButton(this,"Show ranges",kShowRanges);
184
185 TGHorizontalFrame *f5 = new TGHorizontalFrame(this);
189 fAddSelection = new TGTextButton(f5,"Add");
190 fAddSelection->SetToolTipText("Add a new selection (Right click on the axes to add a range).");
193 fDeleteSelection->SetToolTipText("Delete the current selection");
196
197 TGHorizontalFrame *f7 = new TGHorizontalFrame(this);
198 fApplySelect = new TGTextButton(f7,"Apply to tree",kApplySelect);
199 fApplySelect->SetToolTipText("Generate an entry list for the current selection and apply it to the tree.");
201 fUnApply = new TGTextButton(f7,"Reset tree",kUnApply);
202 fUnApply->SetToolTipText("Reset the tree entry list");
205
206 // Entries
207 MakeTitle("Entries");
208
209 fPaintEntries = new TGCheckButton(this,"Draw entries",kPaintEntries);
211 fDelayDrawing = new TGCheckButton(this,"Delay Drawing", kDelayDrawing);
213
216
217 TGHorizontalFrame *f6 = new TGHorizontalFrame(this);
220 v1->AddFrame(new TGLabel(v1,"First entry:"));
224 fFirstEntry->Resize(68,20);
225 v1->AddFrame(fFirstEntry);
226 v2->AddFrame(new TGLabel(v2,"# of entries:"));
230 fNentries->Resize(68,20);
231 v2->AddFrame(fNentries);
232 f6->AddFrame(v1);
233 f6->AddFrame(v2, new TGLayoutHints(kLHintsLeft,4,0,0,0));
234 AddFrame(f6);
235
236 AddFrame(new TGLabel(this,"Weight cut:"));
237
238 TGHorizontalFrame *f8 = new TGHorizontalFrame(this);
243 fWeightCutField->Resize(40,20);
244 f8->AddFrame(fWeightCut);
246 AddFrame(f8);
247
249}
250
251////////////////////////////////////////////////////////////////////////////////
252/// Make the "variable" tab.
253
255{
256 fVarTab = CreateEditorTabSubFrame("Variables");
257 // Variable
258
260 fAddVariable = new TGTextEntry(f9);
261 fAddVariable->Resize(71,20);
263 fButtonAddVar = new TGTextButton(f9,"Add");
264 fButtonAddVar->SetToolTipText("Add a new variable from the tree (must be a valid expression).");
266 fVarTab->AddFrame(f9);
267
270 fVariables->Resize(105,20);
272 fVarTab->AddFrame(f10,new TGLayoutHints(kLHintsLeft,0,0,2,0));
273
275 fDeleteVar = new TGTextButton(f12,"Delete",kDeleteVar);
276 fDeleteVar->SetToolTipText("Delete the current selected variable");
278 fRenameVar = new TGTextButton(f12,"Rename",kRenameVar);
279 fRenameVar->SetToolTipText("Rename the current selected variable");
281 fVarTab->AddFrame(f12,new TGLayoutHints(kLHintsLeft,0,0,2,0));
282
283 fVarTab->AddFrame(new TGLabel(fVarTab,"Axis histograms:"));
284
288 v3->AddFrame(new TGLabel(v3,"Binning:"));
292 fHistBinning->Resize(68,20);
293 v3->AddFrame(fHistBinning);
294 v4->AddFrame(new TGLabel(v4,"Width:"));
298 fHistWidth->Resize(68,20);
299 v4->AddFrame(fHistWidth, new TGLayoutHints(kLHintsLeft,4,0,0,0));
300 f11->AddFrame(v3);
301 f11->AddFrame(v4);
302 fVarTab->AddFrame(f11);
303
304 fHistShowBoxes = new TGCheckButton(fVarTab,"Show box histograms");
306
307 fVarTab->AddFrame(new TGLabel(fVarTab,"Bar histograms style:"));
308
311 f13->AddFrame(fHistColorSelect, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
316 fVarTab->AddFrame(f13, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
317}
318
319////////////////////////////////////////////////////////////////////////////////
320/// Destructor.
321
323{
324 delete fLineTypePoly;
325 delete fLineTypeCurves;
326}
327
328////////////////////////////////////////////////////////////////////////////////
329/// Clean up the selection combo box.
330
332{
333 TList *list = fParallel->GetSelectList();
335 Bool_t enable = list->GetSize() > 0;
340 fShowRanges->SetEnabled(enable);
342 if (list->GetSize() > 0) {
343 Int_t i = 0;
344 TIter next(list);
346 while ((sel = (TParallelCoordSelect*)next())) {
349 if (entry)
351 ++i;
352 }
354 if (sel) {
356 Color_t c;
357 Pixel_t p;
358 c = sel->GetLineColor();
364 }
365 }
366}
367
368////////////////////////////////////////////////////////////////////////////////
369/// Clean up the variables combo box.
370
372{
373 TList *list = fParallel->GetVarList();
375 Bool_t enable = list->GetSize() > 0;
376 fVariables->SetEnabled(enable);
377 fDeleteVar->SetEnabled(enable);
378 fHistShowBoxes->SetEnabled(enable);
379 fHistWidth->SetEnabled(enable);
380 fHistBinning->SetEnabled(enable);
381 if (list->GetSize() > 0) {
382 Int_t i = 0;
383 TIter next(list);
385 while ((var = (TParallelCoordVar*)next())) {
386 fVariables->AddEntry(var->GetTitle(),i);
387 ++i;
388 }
389 var = (TParallelCoordVar*)list->First();
394 }
395}
396
397////////////////////////////////////////////////////////////////////////////////
398/// Connect signals to slots.
399
401{
402 fGlobalLineColor->Connect("ColorSelected(Pixel_t)","TParallelCoordEditor",
403 this, "DoGlobalLineColor(Pixel_t)");
404 fGlobalLineWidth->Connect("Selected(Int_t)","TParallelCoordEditor",
405 this, "DoGlobalLineWidth(Int_t)");
406 if (!TCanvas::SupportAlpha()) {
407 fDotsSpacing->Connect("Released()","TParallelCoordEditor",
408 this, "DoDotsSpacing()");
409 fDotsSpacing->Connect("PositionChanged(Int_t)","TParallelCoordEditor",
410 this, "DoLiveDotsSpacing(Int_t)");
411 fDotsSpacingField->Connect("ReturnPressed()","TParallelCoordEditor",
412 this, "DoDotsSpacingField()");
413 }
414 else {
415 fAlpha->Connect("Released()","TParallelCoordEditor",
416 this, "DoAlpha()");
417 fAlpha->Connect("PositionChanged(Int_t)","TParallelCoordEditor",
418 this, "DoLiveAlpha(Int_t)");
419 fAlphaField->Connect("ReturnPressed()","TParallelCoordEditor",
420 this, "DoAlphaField()");
421 }
422 fLineTypeBgroup->Connect("Clicked(Int_t)", "TParallelCoordEditor",
423 this, "DoLineType()");
424 fSelectionSelect->Connect("Selected(const char*)","TParallelCoordEditor",
425 this, "DoSelectionSelect(const char*)");
426 fSelectLineColor->Connect("ColorSelected(Pixel_t)","TParallelCoordEditor",
427 this, "DoSelectLineColor(Pixel_t)");
428 fSelectLineWidth->Connect("Selected(Int_t)","TParallelCoordEditor",
429 this, "DoSelectLineWidth(Int_t)");
430 fActivateSelection->Connect("Toggled(Bool_t)","TParallelCoordEditor",
431 this, "DoActivateSelection(Bool_t)");
432 fShowRanges->Connect("Toggled(Bool_t)","TParallelCoordEditor",
433 this, "DoShowRanges(Bool_t)");
434 fDeleteSelection->Connect("Clicked()","TParallelCoordEditor",
435 this, "DoDeleteSelection()");
436 fAddSelection->Connect("Clicked()","TParallelCoordEditor",
437 this, "DoAddSelection()");
438 fPaintEntries->Connect("Toggled(Bool_t)","TParallelCoordEditor",
439 this, "DoPaintEntries(Bool_t)");
440 fEntriesToDraw->Connect("Released()","TParallelCoordEditor",
441 this, "DoEntriesToDraw()");
442 fEntriesToDraw->Connect("PositionChanged()","TParallelCoordEditor",
443 this, "DoLiveEntriesToDraw()");
444 fFirstEntry->Connect("ReturnPressed()","TParallelCoordEditor",
445 this, "DoFirstEntry()");
446 fNentries->Connect("ReturnPressed()","TParallelCoordEditor",
447 this, "DoNentries()");
448 fApplySelect->Connect("Clicked()","TParallelCoordEditor",
449 this, "DoApplySelect()");
450 fUnApply->Connect("Clicked()","TParallelCoordEditor",
451 this, "DoUnApply()");
452 fDelayDrawing->Connect("Toggled(Bool_t)","TParallelCoordEditor",
453 this, "DoDelayDrawing(Bool_t)");
454 fAddVariable->Connect("ReturnPressed()","TParallelCoordEditor",
455 this, "DoAddVariable()");
456 fButtonAddVar->Connect("Clicked()","TParallelCoordEditor",
457 this, "DoAddVariable()");
458 fHideAllRanges->Connect("Toggled(Bool_t)","TParallelCoordEditor",
459 this, "DoHideAllRanges(Bool_t)");
460 fVariables->Connect("Selected(const char*)","TParallelCoordEditor",
461 this, "DoVariableSelect(const char*)");
462 fDeleteVar->Connect("Clicked()","TParallelCoordEditor",
463 this, "DoDeleteVar()");
464 fHistWidth->Connect("ReturnPressed()","TParallelCoordEditor",
465 this, "DoHistWidth()");
466 fHistBinning->Connect("ReturnPressed()","TParallelCoordEditor",
467 this, "DoHistBinning()");
468 fWeightCut->Connect("Released()","TParallelCoordEditor",
469 this, "DoWeightCut()");
470 fWeightCut->Connect("PositionChanged(Int_t)","TParallelCoordEditor",
471 this, "DoLiveWeightCut(Int_t)");
472 fWeightCutField->Connect("ReturnPressed()","TParallelCoordEditor",
473 this, "DoWeightCut()");
474 fHistColorSelect->Connect("ColorSelected(Pixel_t)", "TParallelCoordEditor",
475 this, "DoHistColorSelect(Pixel_t)");
476 fHistPatternSelect->Connect("PatternSelected(Style_t)", "TParallelCoordEditor",
477 this, "DoHistPatternSelect(Style_t)");
478 fHistShowBoxes->Connect("Toggled(Bool_t)","TParallelCoordEditor",
479 this, "DoHistShowBoxes(Bool_t)");
480
481 fInit = kFALSE;
482}
483
484////////////////////////////////////////////////////////////////////////////////
485/// Slot to activate or not a selection.
486
488{
489 if (fAvoidSignal) return;
490
492 if (sel) {
493 sel->SetActivated(on);
494 Update();
495 }
496}
497
498////////////////////////////////////////////////////////////////////////////////
499/// Slot to add a selection.
500
502{
504 if (title == "") title = "Selection";
505 TString titlebis = title;
506 Bool_t found = kTRUE;
507 Int_t i=1;
508 while (found){
509 if (fSelectionSelect->FindEntry(titlebis)) {
510 titlebis = title;
511 titlebis.Append(Form("(%d)",i));
512 }
513 else found = kFALSE;
514 ++i;
515 }
516
517 fParallel->AddSelection(titlebis.Data());
518
520}
521
522////////////////////////////////////////////////////////////////////////////////
523/// Slot to add a variable.
524
526{
527 if (fAvoidSignal) return;
528
531 Update();
532}
533
534////////////////////////////////////////////////////////////////////////////////
535/// Slot to apply a selection to the tree.
536
538{
539 //FIXME I forgot to update the slider over the entries
540 // (nentries and firstentry might have changed after applying the selection)
541
542 if (fAvoidSignal) return;
543
545 Update();
547}
548
549////////////////////////////////////////////////////////////////////////////////
550/// Slot to delay the drawing.
551
553{
554 if (fAvoidSignal) return;
555
556 fDelay = on;
558}
559
560////////////////////////////////////////////////////////////////////////////////
561/// Slot to delete a selection.
562
564{
565 if (fAvoidSignal) return;
566
568
570 Update();
571}
572
573////////////////////////////////////////////////////////////////////////////////
574/// Slot to delete a variable().
575
577{
578 if (fAvoidSignal) return;
579
582 if (hasDeleted) Update();
583}
584
585////////////////////////////////////////////////////////////////////////////////
586/// Slot to set the line dotspacing.
587
589{
590 if (fAvoidSignal) return;
591
594 Update();
595}
596
597////////////////////////////////////////////////////////////////////////////////
598/// Slot to set the line dotspacing from the entry field.
599
601{
602 if (fAvoidSignal) return;
603
606 Update();
607}
608
609////////////////////////////////////////////////////////////////////////////////
610/// Slot to set the alpha value from the entry field.
611
613{
614 if (fAvoidSignal) return;
615
616 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
617 color->SetAlpha((Float_t)fAlphaField->GetNumber());
619 }
620 Update();
621}
622
623////////////////////////////////////////////////////////////////////////////////
624/// Slot to set the alpha value
625
627{
628 if (fAvoidSignal) return;
629
630 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
631 color->SetAlpha((Float_t)fAlpha->GetPosition()/1000);
633 }
634 Update();
635}
636
637////////////////////////////////////////////////////////////////////////////////
638/// Slot to select the entries to be drawn.
639
641{
642 if (fAvoidSignal) return;
643
644 Long64_t nentries,firstentry;
645 firstentry = (Long64_t)fEntriesToDraw->GetMinPosition();
647
648 fParallel->SetCurrentFirst(firstentry);
650 Update();
651}
652
653////////////////////////////////////////////////////////////////////////////////
654/// Slot to set the first entry.
655
657{
658 if (fAvoidSignal) return;
659
662 Update();
663}
664
665////////////////////////////////////////////////////////////////////////////////
666/// Slot to set the global line color.
667
669{
670 if (fAvoidSignal) return;
671
672 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
673 color->SetAlpha(1);
674 color = gROOT->GetColor(TColor::GetColor(a));
675 if (color) {
676 color->SetAlpha((Float_t)fAlphaField->GetNumber());
677 fParallel->SetLineColor(color->GetNumber());
678 }
679 }
680 Update();
681}
682
683////////////////////////////////////////////////////////////////////////////////
684/// Slot to set the global line width.
685
687{
688 if (fAvoidSignal) return;
689
691 Update();
692}
693
694////////////////////////////////////////////////////////////////////////////////
695/// Slot to hide all the ranges.
696
698{
699 if (fAvoidSignal) return;
700
703 while((sel = (TParallelCoordSelect*)next())) sel->SetShowRanges(!on);
704 fShowRanges->SetOn(!on);
706 fShowRanges->SetOn(!on);
707 Update();
708}
709
710////////////////////////////////////////////////////////////////////////////////
711/// Slot to set the axes histogram binning.
712
714{
715 if (fAvoidSignal) return;
716
718 Update();
719}
720
721////////////////////////////////////////////////////////////////////////////////
722/// Slot to set the histograms color.
723
725{
726 if (fAvoidSignal) return;
727
728 Color_t col = TColor::GetColor(p);
729 TIter next(fParallel->GetVarList());
730 TParallelCoordVar *var = NULL;
731 while ((var = (TParallelCoordVar*)next())) var->SetFillColor(col);
732 Update();
733}
734
735////////////////////////////////////////////////////////////////////////////////
736/// Slot to set histogram height.
737
739{
740 if (fAvoidSignal) return;
741
742 TIter next(fParallel->GetVarList());
744 while ((var = (TParallelCoordVar*)next())) var->SetBit(TParallelCoordVar::kShowBarHisto,s);
745 Update();
746}
747
748////////////////////////////////////////////////////////////////////////////////
749/// Slot to set the histograms fill style.
750
752{
753 if (fAvoidSignal) return;
754
755 TIter next(fParallel->GetVarList());
756 TParallelCoordVar *var = NULL;
757 while ((var = (TParallelCoordVar*)next())) var->SetFillStyle(sty);
758 Update();
759}
760
761////////////////////////////////////////////////////////////////////////////////
762/// Slot to set histogram width.
763
765{
766 if (fAvoidSignal) return;
767
769 Update();
770}
771
772////////////////////////////////////////////////////////////////////////////////
773/// Slot to set the line type.
774
776{
777 if (fAvoidSignal) return;
778
781 Update();
782}
783
784////////////////////////////////////////////////////////////////////////////////
785/// Slot to set the dots spacing online.
786
788{
789 if (fAvoidSignal) return;
792 if (!fDelay) Update();
793}
794
795////////////////////////////////////////////////////////////////////////////////
796/// Slot to set alpha value online.
797
799{
800 if (fAvoidSignal) return;
802
803 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) color->SetAlpha((Float_t)a/1000);
804 if (!fDelay) Update();
805}
806
807////////////////////////////////////////////////////////////////////////////////
808/// Slot to update the entries fields from the slider position.
809
811{
812 if (fAvoidSignal) return;
813
814 Long64_t nentries,firstentry;
815 firstentry = (Long64_t)fEntriesToDraw->GetMinPosition();
817
818 fFirstEntry->SetNumber(firstentry);
820
821 if (!fDelay) {
822 fParallel->SetCurrentFirst(firstentry);
824 Update();
825 }
826}
827
828////////////////////////////////////////////////////////////////////////////////
829/// Slot to update the wieght cut entry field from the slider position.
830
832{
833 if (fAvoidSignal) return;
834
836 if (!fDelay) {
838 Update();
839 }
840}
841
842////////////////////////////////////////////////////////////////////////////////
843/// Slot to set the number of entries to display.
844
846{
847 if (fAvoidSignal) return;
848
851 Update();
852}
853
854////////////////////////////////////////////////////////////////////////////////
855/// Slot to postpone the entries drawing.
856
858{
859 if (fAvoidSignal) return;
860
862 Update();
863}
864
865////////////////////////////////////////////////////////////////////////////////
866/// Slot to set the line color of selection.
867
869{
870 if (fAvoidSignal) return;
871
873 if (sel) sel->SetLineColor(TColor::GetColor(a));
875 Update();
876}
877
878////////////////////////////////////////////////////////////////////////////////
879/// Slot to set the line width of selection.
880
882{
883 if (fAvoidSignal) return;
884
886 if (sel) {
887 sel->SetLineWidth(wid);
888 Update();
889 }
890}
891
892////////////////////////////////////////////////////////////////////////////////
893/// Slot to set the selection beeing edited.
894
896{
897 if (fAvoidSignal) return;
898
899 if (!fParallel->SetCurrentSelection(title)) return;
900
904
906
909}
910
911////////////////////////////////////////////////////////////////////////////////
912/// Slot to show or not the ranges on the pad.
913
915{
916 if (fAvoidSignal) return;
917
919 if (select) {
920 select->SetShowRanges(s);
921 Update();
922 }
923}
924
925////////////////////////////////////////////////////////////////////////////////
926/// Slot to reset the tree entry list to the original one.
927
929{
930 if (fAvoidSignal) return;
931
933 Update();
935}
936
937////////////////////////////////////////////////////////////////////////////////
938/// Slot to select a variable.
939
941{
942}
943
944////////////////////////////////////////////////////////////////////////////////
945/// Slot to update the weight cut.
946
948{
949 if (fAvoidSignal) return;
950
953 Update();
954}
955
956////////////////////////////////////////////////////////////////////////////////
957/// Pick up the used parallel coordinates plot attributes.
958
960{
961 if (!obj) return;
962 fParallel = dynamic_cast<TParallelCoord*>(obj);
963 if (!fParallel) return;
965
969
971
973
974 if (!TCanvas::SupportAlpha()) {
977 }
978 else {
979 if (TColor *color = gROOT->GetColor(fParallel->GetLineColor())) {
980 fAlpha->SetPosition((Int_t)color->GetAlpha()*1000);
981 fAlphaField->SetNumber(color->GetAlpha());
982 }
983 }
984
988
990
993
996
999
1001
1002 fWeightCut->SetRange(0,(Int_t)(fParallel->GetNentries()/10)); // Maybe search here for better boundaries.
1005
1008
1010
1012}
@ kChildFrame
Definition: GuiTypes.h:379
@ kVerticalFrame
Definition: GuiTypes.h:381
@ kHorizontalFrame
Definition: GuiTypes.h:382
ULong_t Pixel_t
Definition: GuiTypes.h:39
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:43
const Bool_t kFALSE
Definition: RtypesCore.h:90
short Color_t
Definition: RtypesCore.h:81
long long Long64_t
Definition: RtypesCore.h:71
short Style_t
Definition: RtypesCore.h:78
float Float_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassImp(name)
Definition: Rtypes.h:361
@ kButtonDown
Definition: TGButton.h:54
@ kDoubleScaleNo
@ kLHintsLeft
Definition: TGLayout.h:31
@ kLHintsCenterY
Definition: TGLayout.h:35
@ kLHintsTop
Definition: TGLayout.h:34
@ kScaleNo
Definition: TGSlider.h:60
@ kSlider2
Definition: TGSlider.h:57
int nentries
Definition: THbookFile.cxx:89
@ kLineTypeCurves
@ kAddSelectionEntry
@ kEntriesToDraw
@ kSelectLineWidth
@ kDotsSpacingField
@ kApplySelect
@ kDotsSpacing
@ kHistColorSelect
@ kHistBinning
@ kDeleteSelection
@ kAddSelection
@ kHistPatternSelect
@ kLineTypePoly
@ kSelectLineColor
@ kGlobalLineColor
@ kSelectionSelect
@ kActivateSelection
@ kHideAllRanges
@ kLineTypeBgroup
@ kDelayDrawing
@ kPaintEntries
@ kGlobalLineWidth
#define gROOT
Definition: TROOT.h:406
char * Form(const char *fmt,...)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
virtual Width_t GetLineWidth() const
Return the line width.
Definition: TAttLine.h:35
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition: TCanvas.cxx:2420
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
The color creation and management class.
Definition: TColor.h:19
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition: TColor.cxx:2016
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition: TColor.cxx:1769
virtual void SetRadioButtonExclusive(Bool_t flag=kTRUE)
If enable is kTRUE, this button group will treat radio buttons as mutually exclusive,...
virtual void SetButton(Int_t id, Bool_t down=kTRUE)
Sets the button with id to be on/down, and if this is an exclusive group, all other button in the gro...
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:397
virtual EButtonState GetState() const
Definition: TGButton.h:112
virtual void SetOn(Bool_t on=kTRUE, Bool_t emit=kFALSE)
Definition: TGButton.h:120
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition: TGButton.cxx:411
void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
virtual TGLBEntry * GetSelectedEntry() const
Definition: TGComboBox.h:135
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:106
virtual void RemoveAll()
Remove all entries from combo box.
Definition: TGComboBox.cxx:683
virtual TGListBox * GetListBox() const
Definition: TGComboBox.h:130
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
Definition: TGComboBox.cxx:451
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
Definition: TGComboBox.cxx:639
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
Definition: TGComboBox.cxx:422
TGCompositeFrame(const TGCompositeFrame &)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1101
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1027
virtual Float_t GetMaxPosition() const
virtual Float_t GetMinPosition() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetPosition(Float_t min, Float_t max)
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:589
virtual void SetBackgroundColor(Pixel_t col)
Set background color (override from TGWindow base class).
Definition: TGListBox.h:70
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
Definition: TGListBox.cxx:1381
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
virtual void SetNumber(Double_t val)
Set the numeric value (floating point representation).
virtual Int_t GetPosition() const
Definition: TGSlider.h:109
virtual void SetPosition(Int_t pos)
Definition: TGSlider.h:105
virtual void SetRange(Int_t min, Int_t max)
Definition: TGSlider.h:101
const char * GetText() const
Definition: TGTextEntry.h:134
void SetEnabled(Bool_t flag=kTRUE)
Definition: TGTextEntry.h:164
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
Definition: TGedFrame.cxx:123
Bool_t fInit
Definition: TGedFrame.h:53
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition: TGedFrame.cxx:96
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition: TGedFrame.cxx:73
Int_t fPriority
Definition: TGedFrame.h:59
Bool_t fAvoidSignal
Definition: TGedFrame.h:56
void SetPattern(Style_t pattern, Bool_t emit=kTRUE)
Set pattern.
A doubly linked list.
Definition: TList.h:44
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Definition: TList.cxx:692
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:658
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:187
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:694
This is the TParallelCoord editor.
virtual void DoSelectLineColor(Pixel_t)
Slot to set the line color of selection.
virtual void DoHideAllRanges(Bool_t)
Slot to hide all the ranges.
TGDoubleHSlider * fEntriesToDraw
virtual void DoLiveEntriesToDraw()
Slot to update the entries fields from the slider position.
TGCheckButton * fHideAllRanges
virtual void DoDotsSpacing()
Slot to set the line dotspacing.
virtual void DoAlpha()
Slot to set the alpha value.
virtual void DoApplySelect()
Slot to apply a selection to the tree.
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoActivateSelection(Bool_t)
Slot to activate or not a selection.
virtual void DoFirstEntry()
Slot to set the first entry.
virtual void DoLiveDotsSpacing(Int_t a)
Slot to set the dots spacing online.
TGCheckButton * fShowRanges
TGTextButton * fDeleteSelection
TGLineWidthComboBox * fSelectLineWidth
virtual void DoLiveWeightCut(Int_t n)
Slot to update the wieght cut entry field from the slider position.
TGCheckButton * fActivateSelection
virtual void DoShowRanges(Bool_t s)
Slot to show or not the ranges on the pad.
TGedPatternSelect * fHistPatternSelect
virtual void DoDotsSpacingField()
Slot to set the line dotspacing from the entry field.
TGLineWidthComboBox * fGlobalLineWidth
void CleanUpSelections()
Clean up the selection combo box.
virtual void DoGlobalLineColor(Pixel_t)
Slot to set the global line color.
TGNumberEntryField * fFirstEntry
virtual void DoLiveAlpha(Int_t a)
Slot to set alpha value online.
virtual void DoDeleteVar()
Slot to delete a variable().
TGNumberEntryField * fDotsSpacingField
virtual void DoSelectionSelect(const char *title)
Slot to set the selection beeing edited.
TGCompositeFrame * fVarTab
TGTextEntry * fAddSelectionField
virtual void DoHistColorSelect(Pixel_t)
Slot to set the histograms color.
TGTextButton * fAddSelection
virtual void DoGlobalLineWidth(Int_t)
Slot to set the global line width.
virtual void DoHistWidth()
Slot to set histogram width.
TGCheckButton * fHistShowBoxes
virtual void DoUnApply()
Slot to reset the tree entry list to the original one.
virtual void DoAddVariable()
Slot to add a variable.
TGCheckButton * fPaintEntries
virtual void DoPaintEntries(Bool_t)
Slot to postpone the entries drawing.
TParallelCoord * fParallel
virtual void DoHistPatternSelect(Style_t)
Slot to set the histograms fill style.
TGColorSelect * fSelectLineColor
void MakeVariablesTab()
Make the "variable" tab.
virtual void DoAddSelection()
Slot to add a selection.
TGCheckButton * fDelayDrawing
TParallelCoordEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Normal constructor.
virtual void DoAlphaField()
Slot to set the alpha value from the entry field.
virtual void DoDelayDrawing(Bool_t)
Slot to delay the drawing.
TGNumberEntryField * fHistWidth
virtual void DoSelectLineWidth(Int_t)
Slot to set the line width of selection.
virtual void DoEntriesToDraw()
Slot to select the entries to be drawn.
TGColorSelect * fHistColorSelect
TGRadioButton * fLineTypePoly
virtual ~TParallelCoordEditor()
Destructor.
virtual void DoLineType()
Slot to set the line type.
TGColorSelect * fGlobalLineColor
virtual void DoHistShowBoxes(Bool_t)
Slot to set histogram height.
TGNumberEntryField * fAlphaField
void CleanUpVariables()
Clean up the variables combo box.
TGNumberEntryField * fWeightCutField
TGRadioButton * fLineTypeCurves
virtual void DoWeightCut()
Slot to update the weight cut.
virtual void DoNentries()
Slot to set the number of entries to display.
TGNumberEntryField * fNentries
TGButtonGroup * fLineTypeBgroup
virtual void SetModel(TObject *obj)
Pick up the used parallel coordinates plot attributes.
TGTextButton * fButtonAddVar
virtual void DoHistBinning()
Slot to set the axes histogram binning.
virtual void DoDeleteSelection()
Slot to delete a selection.
TGNumberEntryField * fHistBinning
virtual void DoVariableSelect(const char *var)
Slot to select a variable.
A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
void SetActivated(Bool_t on)
Activate the selection.
const char * GetTitle() const
Returns title of object.
void SetShowRanges(Bool_t s)
Show the ranges needles.
TParallelCoord axes.
Int_t GetHistBinning() const
Parallel Coordinates class.
void AddSelection(const char *title)
Add a selection.
Int_t GetWeightCut() const
TList * GetSelectList()
void SetAxisHistogramLineWidth(Int_t lw=2)
Set the same histogram axis line width for all axis.
void SetLineColor(Color_t col)
void SetLineWidth(Width_t wid)
TParallelCoordSelect * GetCurrentSelection()
Return the selection currently being edited.
Int_t GetDotsSpacing() const
void DeleteSelection(TParallelCoordSelect *sel)
Delete a selection.
Long64_t GetNentries()
void ResetTree()
Reset the tree entry list to the initial one..
Long64_t GetCurrentFirst()
void SetLiveRangesUpdate(Bool_t)
If true, the pad is updated while the motion of a dragged range.
Long64_t GetCurrentN()
void AddVariable(Double_t *val, const char *title="")
Add a variable.
TList * GetVarList()
Color_t GetLineColor()
void SetCurrentN(Long64_t)
Set the number of entry to be displayed.
TParallelCoordSelect * SetCurrentSelection(const char *title)
Set the selection being edited.
void RemoveVariable(TParallelCoordVar *var)
Delete a variable from the graph.
void ApplySelectionToTree()
Apply the current selection to the tree.
virtual void SetCurveDisplay(Bool_t curve=1)
void SetAxisHistogramBinning(Int_t n=100)
Set the same histogram axis binning for all axis.
void SetDotsSpacing(Int_t s=0)
Set dots spacing.
void SetCurrentFirst(Long64_t)
Set the first entry to be displayed.
void SetWeightCut(Int_t w=0)
Bool_t GetCurveDisplay() const
Width_t GetLineWidth()
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition: TQObject.cxx:866
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
TString & Append(const char *cs)
Definition: TString.h:559
const Int_t n
Definition: legend1.C:16
TF1 * f1
Definition: legend1.C:11
static constexpr double s
auto * a
Definition: textangle.C:12