Logo ROOT   6.08/07
Reference Guide
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TCandle Class Reference

The candle plot painter class.

Instances of this class are generated by the histograms painting classes (THistPainter and THStack) when an candle plot (box plot) is drawn. TCandle is the "painter class" of the box plots. Therefore it is never used directly to draw a candle.

Definition at line 31 of file TCandle.h.

Public Types

enum  CandleOption : int {
  kNoOption = 0, kBox = 1, kBoxFilled = 2, kMedianLine = 10,
  kMedianNotched = 20, kMedianCircle = 30, kMeanLine = 100, kMeanCircle = 300,
  kWhiskerAll = 1000, kWhisker15 = 2000, kAnchor = 10000, kPointsOutliers = 100000,
  kPointsAll = 200000, kPointsAllScat = 300000, kHorizontal = 1000000
}
 

Public Member Functions

 TCandle ()
 TCandle default constructor. More...
 
 TCandle (const Double_t candlePos, const Double_t candleWidth, const Int_t n, const Double_t *points)
 
 TCandle (const Double_t candlePos, const Double_t candleWidth, TH1D *proj)
 TCandle TH1 data constructor. More...
 
 TCandle (const TCandle &candle)
 
virtual ~TCandle ()
 TCandle default destructor. More...
 
Double_t GetMean () const
 
Double_t GetMedian () const
 
Double_t GetQ1 () const
 
Double_t GetQ2 () const
 
Double_t GetQ3 () const
 
Bool_t IsHorizontal ()
 
Bool_t IsVertical ()
 
virtual void Paint (Option_t *option="")
 Paint one candle with its current attributes. More...
 
int ParseOption (char *optin)
 Parsing of the option-string. More...
 
void SetAxisPosition (const Double_t candlePos)
 
void SetHistogram (TH1D *proj)
 
void SetLog (int x, int y)
 
virtual void SetMean (Double_t mean)
 
virtual void SetMedian (Double_t median)
 
void SetOption (CandleOption opt)
 
virtual void SetQ1 (Double_t q1)
 
virtual void SetQ2 (Double_t q2)
 
virtual void SetQ3 (Double_t q3)
 
void SetWidth (const Double_t width)
 
- Public Member Functions inherited from TAttLine
 TAttLine ()
 AttLine default constructor. More...
 
 TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth)
 AttLine normal constructor. More...
 
virtual ~TAttLine ()
 AttLine destructor. More...
 
void Copy (TAttLine &attline) const
 Copy this line attributes to a new TAttLine. More...
 
Int_t DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
 Compute distance from point px,py to a line. More...
 
virtual Color_t GetLineColor () const
 Return the line color. More...
 
virtual Style_t GetLineStyle () const
 Return the line style. More...
 
virtual Width_t GetLineWidth () const
 Return the line width. More...
 
virtual void Modify ()
 Change current line attributes if necessary. More...
 
virtual void ResetAttLine (Option_t *option="")
 Reset this line attributes to default values. More...
 
virtual void SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
 Save line attributes as C++ statement(s) on output stream out. More...
 
virtual void SetLineAttributes ()
 Invoke the DialogCanvas Line attributes. More...
 
virtual void SetLineColor (Color_t lcolor)
 Set the line color. More...
 
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
 Set a transparent line color. More...
 
virtual void SetLineStyle (Style_t lstyle)
 Set the line style. More...
 
virtual void SetLineWidth (Width_t lwidth)
 Set the line width. More...
 
- Public Member Functions inherited from TAttFill
 TAttFill ()
 AttFill default constructor. More...
 
 TAttFill (Color_t fcolor, Style_t fstyle)
 AttFill normal constructor. More...
 
virtual ~TAttFill ()
 AttFill destructor. More...
 
void Copy (TAttFill &attfill) const
 Copy this fill attributes to a new TAttFill. More...
 
virtual Color_t GetFillColor () const
 Return the fill area color. More...
 
virtual Style_t GetFillStyle () const
 Return the fill area style. More...
 
virtual Bool_t IsTransparent () const
 
virtual void Modify ()
 Change current fill area attributes if necessary. More...
 
virtual void ResetAttFill (Option_t *option="")
 Reset this fill attributes to default values. More...
 
virtual void SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
 Save fill attributes as C++ statement(s) on output stream out. More...
 
virtual void SetFillAttributes ()
 Invoke the DialogCanvas Fill attributes. More...
 
virtual void SetFillColor (Color_t fcolor)
 Set the fill area color. More...
 
virtual void SetFillColorAlpha (Color_t fcolor, Float_t falpha)
 Set a transparent fill color. More...
 
virtual void SetFillStyle (Style_t fstyle)
 Set the fill area style. More...
 
- Public Member Functions inherited from TAttMarker
 TAttMarker ()
 TAttMarker default constructor. More...
 
 TAttMarker (Color_t color, Style_t style, Size_t msize)
 TAttMarker normal constructor. More...
 
virtual ~TAttMarker ()
 TAttMarker destructor. More...
 
void Copy (TAttMarker &attmarker) const
 Copy this marker attributes to a new TAttMarker. More...
 
virtual Color_t GetMarkerColor () const
 Return the marker color. More...
 
virtual Size_t GetMarkerSize () const
 Return the marker size. More...
 
virtual Style_t GetMarkerStyle () const
 Return the marker style. More...
 
virtual void Modify ()
 Change current marker attributes if necessary. More...
 
virtual void ResetAttMarker (Option_t *toption="")
 Reset this marker attributes to the default values. More...
 
virtual void SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
 Save line attributes as C++ statement(s) on output stream out. More...
 
virtual void SetMarkerAttributes ()
 Invoke the DialogCanvas Marker attributes. More...
 
virtual void SetMarkerColor (Color_t mcolor=1)
 Set the marker color. More...
 
virtual void SetMarkerColorAlpha (Color_t mcolor, Float_t malpha)
 Set a transparent marker color. More...
 
virtual void SetMarkerSize (Size_t msize=1)
 Set the marker size. More...
 
virtual void SetMarkerStyle (Style_t mstyle=1)
 Set the marker style. More...
 

Protected Member Functions

void Calculate ()
 Calculates all values needed by the candle definition depending on the candle options. More...
 
int GetCandleOption (const int pos)
 
bool IsOption (CandleOption opt)
 Return true is this option is activated in fOption. More...
 
void PaintBox (Int_t nPoints, Double_t *x, Double_t *y, Bool_t swapXY, Bool_t fill)
 Paint a box for candle. More...
 
void PaintLine (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Bool_t swapXY)
 Paint a line for candle. More...
 

Protected Attributes

Double_t fBoxDown
 Position of the lower box end. More...
 
Double_t fBoxUp
 Position of the upper box end. More...
 
Double_t fCandleWidth
 The candle width. More...
 
Double_tfDatapoints
 position of all Datapoints within this candle More...
 
bool fDismiss
 True if the candle cannot be painted. More...
 
bool fIsCalculated
 
bool fIsRaw
 0: for TH1 projection, 1: using raw data More...
 
int fLogX
 
int fLogY
 
Double_t fMean
 Position of the mean. More...
 
Double_t fMedian
 Position of the median. More...
 
Double_t fNDatapoints
 Number of Datapoints within this candle. More...
 
CandleOption fOption
 Setting the style of the candle. More...
 
Double_t fPosCandleAxis
 x-pos for a vertical candle More...
 
TH1DfProj
 
Double_t fWhiskerDown
 Position of the lower whisker end. More...
 
Double_t fWhiskerUp
 Position of the upper whisker end. More...
 
- Protected Attributes inherited from TAttLine
Color_t fLineColor
 Line color. More...
 
Style_t fLineStyle
 Line style. More...
 
Width_t fLineWidth
 Line width. More...
 
- Protected Attributes inherited from TAttFill
Color_t fFillColor
 Fill area color. More...
 
Style_t fFillStyle
 Fill area style. More...
 
- Protected Attributes inherited from TAttMarker
Color_t fMarkerColor
 Marker color. More...
 
Size_t fMarkerSize
 Marker size. More...
 
Style_t fMarkerStyle
 Marker style. More...
 

#include <TCandle.h>

Inheritance diagram for TCandle:
[legend]

Member Enumeration Documentation

◆ CandleOption

Enumerator
kNoOption 
kBox 
kBoxFilled 
kMedianLine 
kMedianNotched 
kMedianCircle 
kMeanLine 
kMeanCircle 
kWhiskerAll 
kWhisker15 
kAnchor 
kPointsOutliers 
kPointsAll 
kPointsAllScat 
kHorizontal 

Definition at line 34 of file TCandle.h.

Constructor & Destructor Documentation

◆ TCandle() [1/4]

TCandle::TCandle ( )

TCandle default constructor.

Definition at line 38 of file TCandle.cxx.

◆ TCandle() [2/4]

TCandle::TCandle ( const Double_t  candlePos,
const Double_t  candleWidth,
const Int_t  n,
const Double_t points 
)

◆ TCandle() [3/4]

TCandle::TCandle ( const Double_t  candlePos,
const Double_t  candleWidth,
TH1D proj 
)

TCandle TH1 data constructor.

Definition at line 62 of file TCandle.cxx.

◆ TCandle() [4/4]

TCandle::TCandle ( const TCandle candle)

◆ ~TCandle()

TCandle::~TCandle ( )
virtual

TCandle default destructor.

Definition at line 88 of file TCandle.cxx.

Member Function Documentation

◆ Calculate()

void TCandle::Calculate ( )
protected

Calculates all values needed by the candle definition depending on the candle options.

Definition at line 161 of file TCandle.cxx.

◆ GetCandleOption()

int TCandle::GetCandleOption ( const int  pos)
inlineprotected

Definition at line 78 of file TCandle.h.

◆ GetMean()

Double_t TCandle::GetMean ( ) const
inline

Definition at line 91 of file TCandle.h.

◆ GetMedian()

Double_t TCandle::GetMedian ( ) const
inline

Definition at line 92 of file TCandle.h.

◆ GetQ1()

Double_t TCandle::GetQ1 ( ) const
inline

Definition at line 93 of file TCandle.h.

◆ GetQ2()

Double_t TCandle::GetQ2 ( ) const
inline

Definition at line 94 of file TCandle.h.

◆ GetQ3()

Double_t TCandle::GetQ3 ( ) const
inline

Definition at line 95 of file TCandle.h.

◆ IsHorizontal()

Bool_t TCandle::IsHorizontal ( )
inline

Definition at line 96 of file TCandle.h.

◆ IsOption()

bool TCandle::IsOption ( CandleOption  opt)
protected

Return true is this option is activated in fOption.

Definition at line 412 of file TCandle.cxx.

◆ IsVertical()

Bool_t TCandle::IsVertical ( )
inline

Definition at line 97 of file TCandle.h.

◆ Paint()

void TCandle::Paint ( Option_t option = "")
virtual

Paint one candle with its current attributes.

Definition at line 207 of file TCandle.cxx.

◆ PaintBox()

void TCandle::PaintBox ( Int_t  nPoints,
Double_t x,
Double_t y,
Bool_t  swapXY,
Bool_t  fill 
)
protected

Paint a box for candle.

Definition at line 428 of file TCandle.cxx.

◆ PaintLine()

void TCandle::PaintLine ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2,
Bool_t  swapXY 
)
protected

Paint a line for candle.

Definition at line 457 of file TCandle.cxx.

◆ ParseOption()

int TCandle::ParseOption ( char *  opt)

Parsing of the option-string.

The option-string will be empty at the end (by-reference).

Definition at line 95 of file TCandle.cxx.

◆ SetAxisPosition()

void TCandle::SetAxisPosition ( const Double_t  candlePos)
inline

Definition at line 101 of file TCandle.h.

◆ SetHistogram()

void TCandle::SetHistogram ( TH1D proj)
inline

Definition at line 104 of file TCandle.h.

◆ SetLog()

void TCandle::SetLog ( int  x,
int  y 
)
inline

Definition at line 100 of file TCandle.h.

◆ SetMean()

virtual void TCandle::SetMean ( Double_t  mean)
inlinevirtual

Definition at line 108 of file TCandle.h.

◆ SetMedian()

virtual void TCandle::SetMedian ( Double_t  median)
inlinevirtual

Definition at line 109 of file TCandle.h.

◆ SetOption()

void TCandle::SetOption ( CandleOption  opt)
inline

Definition at line 99 of file TCandle.h.

◆ SetQ1()

virtual void TCandle::SetQ1 ( Double_t  q1)
inlinevirtual

Definition at line 110 of file TCandle.h.

◆ SetQ2()

virtual void TCandle::SetQ2 ( Double_t  q2)
inlinevirtual

Definition at line 111 of file TCandle.h.

◆ SetQ3()

virtual void TCandle::SetQ3 ( Double_t  q3)
inlinevirtual

Definition at line 112 of file TCandle.h.

◆ SetWidth()

void TCandle::SetWidth ( const Double_t  width)
inline

Definition at line 103 of file TCandle.h.

Member Data Documentation

◆ fBoxDown

Double_t TCandle::fBoxDown
protected

Position of the lower box end.

Definition at line 65 of file TCandle.h.

◆ fBoxUp

Double_t TCandle::fBoxUp
protected

Position of the upper box end.

Definition at line 64 of file TCandle.h.

◆ fCandleWidth

Double_t TCandle::fCandleWidth
protected

The candle width.

Definition at line 60 of file TCandle.h.

◆ fDatapoints

Double_t* TCandle::fDatapoints
protected

position of all Datapoints within this candle

Definition at line 69 of file TCandle.h.

◆ fDismiss

bool TCandle::fDismiss
protected

True if the candle cannot be painted.

Definition at line 57 of file TCandle.h.

◆ fIsCalculated

bool TCandle::fIsCalculated
protected

Definition at line 55 of file TCandle.h.

◆ fIsRaw

bool TCandle::fIsRaw
protected

0: for TH1 projection, 1: using raw data

Definition at line 54 of file TCandle.h.

◆ fLogX

int TCandle::fLogX
protected

Definition at line 73 of file TCandle.h.

◆ fLogY

int TCandle::fLogY
protected

Definition at line 74 of file TCandle.h.

◆ fMean

Double_t TCandle::fMean
protected

Position of the mean.

Definition at line 62 of file TCandle.h.

◆ fMedian

Double_t TCandle::fMedian
protected

Position of the median.

Definition at line 63 of file TCandle.h.

◆ fNDatapoints

Double_t TCandle::fNDatapoints
protected

Number of Datapoints within this candle.

Definition at line 70 of file TCandle.h.

◆ fOption

CandleOption TCandle::fOption
protected

Setting the style of the candle.

Definition at line 72 of file TCandle.h.

◆ fPosCandleAxis

Double_t TCandle::fPosCandleAxis
protected

x-pos for a vertical candle

Definition at line 59 of file TCandle.h.

◆ fProj

TH1D* TCandle::fProj
protected

Definition at line 56 of file TCandle.h.

◆ fWhiskerDown

Double_t TCandle::fWhiskerDown
protected

Position of the lower whisker end.

Definition at line 67 of file TCandle.h.

◆ fWhiskerUp

Double_t TCandle::fWhiskerUp
protected

Position of the upper whisker end.

Definition at line 66 of file TCandle.h.


The documentation for this class was generated from the following files: