127 gROOT->GetListOfCleanups()->Add(
this);
142 if (firstentry < 0 || firstentry > tree->
GetEstimate()) firstentry = 0;
216 if(!varexp[0])
return;
218 if(fvar->
GetNdim() <= 0)
return;
232 while(entriesToDisplay!=0){
233 entryNumber =
fTree->GetEntryNumber(entry);
234 if(entryNumber < 0)
break;
236 if(localEntry < 0)
break;
237 if(tnumber !=
fTree->GetTreeNumber()) {
238 tnumber =
fTree->GetTreeNumber();
262 for(
Int_t inst=0;inst<ndata;++inst){
264 if(
fSelect->EvalInstance(inst) == 0){
274 }
else if (inst == 0) {
279 fTree->LoadTree(entryNumber);
333 for(ui = 0;ui<
fNcols;++ui){
358 for(ui=0; ui<
fNcols;++ui){
366 for(ui=var+1;ui<
fNcols;++ui){
419 for(ui = 0;ui<
fNcols;++ui){
440 if(!
gPad)
return 9999;
442 xx=
gPad->AbsPixeltoX(px);
443 yy=
gPad->AbsPixeltoY(py);
457 gEnv->SetValue(
"Canvas.ShowEditor",1);
472 for(ui=0;ui<
fNx*
fNy;++ui){
495 Int_t fillcolor=linecolor;
570 TArc* slice =
new TArc(0,0,
r,(ui-0.25)*angle*conv,(ui+0.25)*angle*conv);
577 slice->
Draw(options);
589 Int_t fillstyle=3002;
591 Int_t fillcolor=linecolor;
679 while(angle < 0 || angle > 2*pi){
680 if(angle < 0) angle+=2*pi;
681 if(angle > 2*pi) angle-=2*pi;
684 if(angle > 0 && angle < pi/2)
return 11;
685 else if(angle > pi/2 && angle < pi)
return 31;
686 else if(angle > pi && angle < 3*pi/2)
return 33;
687 else if(angle > 3*pi/2 && angle < 2*pi)
return 13;
688 else if(angle == 0 || angle == 2*pi)
return 12;
689 else if(angle == pi/2)
return 21;
690 else if(angle == pi)
return 32;
691 else if(angle == 3*pi/2)
return 23;
695 if(angle >= 0 && angle < pi)
return 21;
696 else if(angle >=pi && angle <= 2*pi)
return 23;
709 while(angle < 0 || angle > 2*pi){
710 if(angle < 0) angle+=2*pi;
711 if(angle > 2*pi) angle-=2*pi;
714 if(angle >= 0 && angle <= pi/2)
return angle*convraddeg - 90;
715 else if(angle > pi/2 && angle <= pi)
return (angle + pi)*convraddeg + 90;
716 else if(angle > pi && angle <= 3*pi/2)
return (angle - pi)*convraddeg - 90;
717 else if(angle > 3*pi/2 && angle <= 2*pi)
return angle*convraddeg + 90;
729 if (lastentry >
fTree->GetEntriesFriend()-1) {
730 lastentry =
fTree->GetEntriesFriend() - 1;
731 nentries = lastentry - firstentry + 1;
812 memmax[i] = -DBL_MAX;
851 while(entriesToDisplay!=0){
852 entryNumber =
fTree->GetEntryNumber(entry);
853 if(entryNumber < 0)
break;
855 if(localEntry < 0)
break;
856 if(tnumber !=
fTree->GetTreeNumber()) {
857 tnumber =
fTree->GetTreeNumber();
880 for(
Int_t inst=0;inst<ndata;++inst){
882 if(
fSelect->EvalInstance(inst) == 0){
890 for (ui=0;ui<
fNcols;ui++) {
894 }
else if (inst == 0) {
899 fTree->LoadTree(entryNumber);
902 if(inst >
fMax[ui])
fMax[ui] = inst;
903 if(inst <
fMin[ui])
fMin[ui] = inst;
911 if (notSkipped) {
for(ui=0;ui<
fNcols;++ui)
fAve[ui]/=notSkipped;}
932 for(ui=0;ui<
fNx*
fNy;++ui){
1039 for(ui=0;ui<
fNx*
fNy;++ui){
1044 for(ui = 0; ui <
fNx*
fNy; ++ui){
1073 Int_t entriesToDisplay =
fTree->GetScanField();
1077 while(entriesToDisplay!=0){
1078 entryNumber =
fTree->GetEntryNumber(entry);
1079 if(entryNumber < 0)
break;
1081 if(localEntry < 0)
break;
1082 if(tnumber !=
fTree->GetTreeNumber()) {
1083 tnumber =
fTree->GetTreeNumber();
1095 for(ui=0;ui<
fNcols;++ui){
1103 bool loaded =
false;
1106 for(
Int_t inst=0;inst<ndata;++inst){
1108 if(
fSelect->EvalInstance(inst) == 0){
1116 for (ui=0;ui<
fNcols;ui++) {
1120 }
else if (inst == 0) {
1141 for(ui=0; ui<
fNx*
fNy;++ui){
1157 for(ui=0; ui<
fNx*
fNy;++ui){
1173 for(ui=0; ui<
fNx*
fNy;++ui){
1189 for(ui=0; ui<
fNx*
fNy;++ui){
1205 for(ui=0; ui<
fNx*
fNy;++ui){
1218 if(
fPolargram->GetNdivRadial() == ndiv)
return;
1227 if(
fNx == nx || nx <= 0)
return;
1268 for(ui=0; ui <
fNx*
fNy;++ui){
1283 for(ui = 0;ui<
fNcols;++ui){
1304 if(
fNy == ny || ny <= 0)
return;
1345 for(ui=0; ui <
fNx*
fNy;++ui){
1360 for(ui = 0;ui<
fNcols;++ui){
1386 for(ui=0;ui<
fNx*
fNy;++ui){
1423 for(ui=0;ui<
fNx*
fNy;++ui){
1430 for(ui=0; ui <
fNx*
fNy;++ui){
1445 for(ui=0;ui<
fNcols;++ui){
1472 if (selection && strlen(selection)) {
1488 if (!varexp)
return;
1492 nch = strlen(varexp);
1496 std::vector<TString> cnames;
1497 if (!strcmp(varexp,
"*")) {
fNcols = nleaves; allvar = 1; }
1498 if (nch == 0 || allvar) {
1501 for (
UInt_t ui=0;ui<ncs;++ui) {
1504 cnames.push_back(lf->
GetName());
1526 if (
fSelect->GetManager()->GetMultiplicity() > 0 ) {
1528 for(i=0;i<=
fFormulas->LastIndex();i++) {
1534 for(i=0;i<=
fFormulas->LastIndex();i++) {
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Width_t
Line width (short).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
long long Long64_t
Portable signed long integer 8 bytes.
short Style_t
Style number (short).
const char Option_t
Option string (const char).
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Float_t GetTextSize() const
Return the text size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
TObjArray * GetListOfBranches()
void Draw(Option_t *option="") override
Default Draw method for all objects.
virtual Long64_t GetN() const
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TBranch * GetBranch() const
void Add(TObject *obj) override
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
Int_t GetEntriesFast() const
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void Draw(Option_t *option="") override
Default Draw method for all objects.
A specialized TSelector for TTree::Draw.
void SetAverageLineStyle(Style_t sty)
Set the LineStyle of the average.
TPolyLine * fAveragePoly
Polygon representing the average variables value.
void SetLineColor(Color_t col) override
Set lin color.
void SetAverageFillColor(Color_t col)
Set the Fill Color of the average.
~TSpider() override
Destructor.
UInt_t fNy
Number of vertical spider plots.
void Draw(Option_t *options="") override
Draw the spider.
TList * fInput
Used for fSelector.
void SetNx(UInt_t nx)
Set the X number of sub pads.
Double_t * fAve
[fNcols] Average value of each variable.
Style_t GetAverageLineStyle() const
Get the LineStyle of the average.
void GotoPrevious()
Go to the previous entries.
void SetFillStyle(Style_t sty) override
Set fill style.
TList * fSuperposed
Superposed spider plots.
void DrawSlices(Option_t *options)
Draw the slices of the segment plot.
Long64_t fFirstEntry
First entry.
void SetDisplayAverage(bool disp)
Display or not the average.
void UpdateView()
Update the polylines or the arcs for the current entries.
TTree * fTree
Pointer to the TTree to represent.
bool fSegmentDisplay
True if displaying a segment plot.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute the distance to the spider.
void SetSegmentDisplay(bool seg)
Set the segment display or not.
void SetNdivRadial(Int_t div)
Set number of radial divisions.
void SetCurrentEntries()
Set the current selected entries.
void AddVariable(const char *varexp)
Add a variable to the plot from its expression.
UInt_t fNcols
Number of variables.
bool fShowRange
Show range of variables or not.
void DrawPoly(Option_t *options)
Paint the polygon representing the current entry.
bool fAngularLabels
True if the labels are oriented according to their axis.
void DrawSlicesAverage(Option_t *options)
Draw the slices representing the average for the segment plot.
void GotoEntry(Long64_t e)
Go to a specified entry.
TCanvas * fCanvas
! Pointer to the mother pad.
Int_t fArraySize
Actual size of the arrays.
void SetAverageLineColor(Color_t col)
Set the LineColor of the average.
TArc ** fAverageSlices
! Average slices.
void SetSelectionExpression(const char *selexp)
Compile selection expression if there is one.
Long64_t fEntry
Present entry number in fTree.
void DeleteVariable(const char *varexp)
Delete a variable from its expression.
void SetAverageLineWidth(Width_t wid)
Set the LineWidth of the average.
TTreeFormulaManager * fManager
Coordinator for the formulas.
Width_t GetAverageLineWidth() const
Get the LineWidth of the average.
void SetLineWidth(Width_t wid) override
Set line width.
TList * fFormulas
List of all formulas to represent.
void SetLineStyle(Style_t sty) override
Set line style.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute the corresponding event.
Color_t GetAverageLineColor() const
Get the LineColor of the average.
TTreeFormula * fSelect
Selection condition.
void InitVariables(Long64_t firstentry, Long64_t nentries)
Browse the tree to set the min, max and average value of each variable of fVar.
Int_t FindTextAlign(Double_t theta)
Find the alignement rule to apply for TText::SetTextAlign(Short_t).
void SetVariablesExpression(const char *varexp)
Compile the variables expression from the given string varexp.
void SetAverageFillStyle(Style_t sty)
Set the FillStyle of the average.
TSelectorDraw * fSelector
! Selector.
TSpider()
Default constructor.
Double_t FindTextAngle(Double_t theta)
Determine the orientation of the polar labels according to their angle.
Color_t GetAverageFillColor() const
Get the Fill Color of the average.
void SyncFormulas()
Create a TreeFormulaManager to coordinate the formulas.
void AddSuperposed(TSpider *sp)
Allow to superpose several spider views.
void SetFillColor(Color_t col) override
Set fill color.
Double_t * fMax
[fNcols] Maximum value of the variables.
Double_t * fMin
[fNcols] Minimum value of the variables.
UInt_t fNx
Number of horizontal spider plots.
void SetNy(UInt_t ny)
Set the Y number of sub pads.
bool fForceDim
Force dimension.
void Paint(Option_t *options) override
Paint the spider.
void InitArrays(Int_t newsize)
Check if the arrays size is enough and reallocate them if not.
Long64_t fNentries
Number of entries.
Style_t GetAverageFillStyle() const
Get the FillStyle of the average.
TGraphPolargram * fPolargram
Polar graph.
void GotoNext()
Go to the next entries.
void DrawPolyAverage(Option_t *options)
Paint the Polygon representing the average value of the variables.
Long64_t * fCurrentEntries
![fNx*fNy] current selected entries;
TList * fPolyList
Polygons representing the variables.
void GotoPreceding()
Go to the last entry.
bool fDisplayAverage
Display or not the average.
Long64_t GetEntriesToProcess(Long64_t firstentry, Long64_t nentries) const
return the number of entries to be processed this function checks that nentries is not bigger than th...
void GotoFollowing()
Go to the next entry.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.
virtual Long64_t GetEstimate() const
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.