![]() |
ROOT
6.06/09
Reference Guide
|
Definition at line 32 of file TSpectrum2Painter.h.
Public Member Functions | |
TSpectrum2Painter (TH2 *h2, Int_t bs) | |
virtual | ~TSpectrum2Painter () |
TSpectrum2Painter destructor. More... | |
void | GetAngles (Int_t &alpha, Int_t &beta, Int_t &view) |
Gets angles of the view: -alpha - angle between base line of Canvas and right lower edge of picture base plane -beta - angle between base line of Canvas and left lower edge of picture base plane -view - rotation angle of the view, it can be 0, 90, 180, 270 degrees. More... | |
void | GetBezier (Int_t &bezier) |
Gets Bezier smoothing switch: -bezier - determines Bezier interpolation (applies only for simple display modes group for grid, x_lines, y_lines display modes) More... | |
void | GetChanGrid (Int_t &enable, Int_t &color) |
This function gets attributes for drawing channel: -enable - decides whether the channel grid is shown or not -color - color of channel grid. More... | |
void | GetChanMarks (Int_t &enable, Int_t &color, Int_t &width, Int_t &height, Int_t &style) |
Gets drawing attributes for channel marks: -enable - decides whether the channel marks are shown or not -color - color of channel marks -width - width of channel marks in pixels -height - height of channel marks in pixels -style - style of channel marks (dot, cross, star, rectangle, X, diamond, triangle) More... | |
void | GetColorAlgorithm (Int_t &colorAlgorithm) |
Gets shading color algorithm: -colorAlgorithm - rgb smooth alorithm, rgb modulo color component, cmy smooth alorithm, cmy modulo color component, cie smooth alorithm, cie modulo color component, yiq smooth alorithm, yiq modulo color component, hsv smooth alorithm, hsv modulo algorithm. More... | |
void | GetColorIncrements (Double_t &r, Double_t &g, Double_t &b) |
Gets color increments between two color levels for r, g, b components: -r, g, b - color increments between two color levels. More... | |
void | GetContourWidth (Int_t &width) |
Gets width between horizontal slices: -width - width between contours, applies only for contours display mode. More... | |
void | GetDisplayMode (Int_t &modeGroup, Int_t &displayMode) |
Gets display group mode and display mode: -modeGroup - the following group modes might have been set: simple modes-kPicture2ModeGroupSimple, modes with shading according to light-kPicture2ModeGroupLight, modes with shading according to channels counts-kPicture2ModeGroupHeight, modes of combination of shading according to light and to channels counts-kPicture2ModeGroupLightHeight -displayMode - display modes that might have been set: points, grid, contours, bars, x_lines, y_lines, bars_x, bars_y, needles, surface, triangles. More... | |
void | GetLightHeightWeight (Double_t &weight) |
Gets weight between shading according to fictive light source and according to channels counts: -weight - weight between shading according to fictive light source and according to channels counts, applies only for kPicture2ModeGroupLightHeight modes group. More... | |
void | GetLightPosition (Int_t &x, Int_t &y, Int_t &z) |
Gets position of fictive light source in 3D space: -x, y, z. More... | |
void | GetNodes (Int_t &nodesx, Int_t &nodesy) |
Gets nodes in both directions: -nodesx, nodesy, only the bins at the nodes points are displayed. More... | |
void | GetPenAttr (Int_t &color, Int_t &style, Int_t &width) |
Gets pen attributes: -color - color of spectrum -style - style of pen (solid, dash, dot, dash-dot) -width - width of pen in pixels. More... | |
void | GetShading (Int_t &shading, Int_t &shadow) |
Gets shading and shadow switches: -shading - determines whether the picture will shaded, smoothed (no shading, shading), for rainbowed display modes only -shadow - determines whether shadow will be drawn, for rainbowed display modes with shading according to light. More... | |
void | GetZScale (Int_t &scale) |
Gets z-axis scale: -scale - it can be linear, sqrt or log. More... | |
void | Paint (Option_t *option) |
Paints histogram according to preset parameters. More... | |
void | SetAngles (Int_t alpha, Int_t beta, Int_t view) |
Sets angles of the view: -alpha - angles of display,alpha+beta must be less or equal to 90, alpha- angle between base line of Canvas and right lower edge of picture base plane -beta - angle between base line of Canvas and left lower edge of picture base plane -view - rotation angle of the view, it can be 0, 90, 180, 270 degrees. More... | |
void | SetBezier (Int_t bezier) |
Sets on/off Bezier smoothing: -bezier - determines Bezier interpolation (applies only for simple display modes group for grid, x_lines, y_lines display modes) More... | |
void | SetChanGrid (Int_t enable, Int_t color) |
This function sets enables/disables drawing of channel grid and sets its color: -enable - decides whether the channel grid is shown or not -color - color of channel grid. More... | |
void | SetChanMarks (Int_t enable, Int_t color, Int_t width, Int_t height, Int_t style) |
Sets enables/disables drawing of channel marks and sets their attributes: -enable - decides whether the channel marks are shown or not -color - color of channel marks -width - width of channel marks in pixels -height - height of channel marks in pixels -style - style of channel marks (dot, cross, star, rectangle, X, diamond, triangle) More... | |
void | SetColorAlgorithm (Int_t colorAlgorithm) |
Sets shading color algorithm: -colorAlgorithm - applies only for rainbowed display modes (rgb smooth alorithm, rgb modulo color component, cmy smooth alorithm, cmy modulo color component, cie smooth alorithm, cie modulo color component, yiq smooth alorithm, yiq modulo color component, hsv smooth alorithm, hsv modulo color component, it does not apply for simple display modes algorithm group. More... | |
void | SetColorIncrements (Double_t r, Double_t g, Double_t b) |
Sets color increments between two color levels for r, g, b components: -r, g, b - color increments between two color levels. More... | |
void | SetContourWidth (Int_t width) |
Sets width between horizontal slices: -width - width between contours, applies only for contours display mode. More... | |
void | SetDisplayMode (Int_t modeGroup, Int_t displayMode) |
Sets display group mode and display mode: -modeGroup - the following group modes can be set: simple modes-kPicture2ModeGroupSimple, modes with shading according to light-kPicture2ModeGroupLight, modes with shading according to channels counts-kPicture2ModeGroupHeight, modes of combination of shading according to light and to channels counts-kPicture2ModeGroupLightHeight -displayMode - posible display modes are: points, grid, contours, bars, x_lines, y_lines, bars_x, bars_y, needles, surface, triangles. More... | |
void | SetLightHeightWeight (Double_t weight) |
Sets weight between shading according to fictive light source and according to channels counts: -weight - weight between shading according to fictive light source and according to channels counts, applies only for kPicture2ModeGroupLightHeight modes group. More... | |
void | SetLightPosition (Int_t x, Int_t y, Int_t z) |
Sets position of fictive light source in 3D space: -x, y, z. More... | |
void | SetNodes (Int_t nodesx, Int_t nodesy) |
Sets nodes in both directions: -nodesx, nodesy, only the bins at the nodes points are displayed. More... | |
void | SetPenAttr (Int_t color, Int_t style, Int_t width) |
Sets pen attributes: -color - color of spectrum -style - style of pen (solid, dash, dot, dash-dot) -width - width of pen in pixels. More... | |
void | SetShading (Int_t shading, Int_t shadow) |
Sets on/off shading and shadow switches: -shading - determines whether the picture will shaded, smoothed (no shading, shading), for rainbowed display modes only -shadow - determines whether shadow will be drawn, for rainbowed display modes with shading according to light. More... | |
void | SetZScale (Int_t scale) |
Sets z-axis scale: -scale - linear, sqrt or log. More... | |
ClassDef(TSpectrum2Painter, 0) private TSpectrum2Painter & | operator= (const TSpectrum2Painter &) |
![]() | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TString &name, const TString &title) | |
TNamed (const TNamed &named) | |
TNamed & | operator= (const TNamed &rhs) |
TNamed assignment operator. More... | |
virtual | ~TNamed () |
virtual void | Clear (Option_t *option="") |
Set name and title to empty strings (""). More... | |
virtual TObject * | Clone (const char *newname="") const |
Make a clone of an object using the Streamer facility. More... | |
virtual Int_t | Compare (const TObject *obj) const |
Compare two TNamed objects. More... | |
virtual void | Copy (TObject &named) const |
Copy this to obj. More... | |
virtual void | FillBuffer (char *&buffer) |
Encode TNamed into output buffer. More... | |
virtual const char * | GetName () const |
Returns name of object. More... | |
virtual const char * | GetTitle () const |
Returns title of object. More... | |
virtual ULong_t | Hash () const |
Return hash value for this object. More... | |
virtual Bool_t | IsSortable () const |
virtual void | SetName (const char *name) |
Change (i.e. More... | |
virtual void | SetNameTitle (const char *name, const char *title) |
Change (i.e. set) all the TNamed parameters (name and title). More... | |
virtual void | SetTitle (const char *title="") |
Change (i.e. set) the title of the TNamed. More... | |
virtual void | ls (Option_t *option="") const |
List TNamed name and title. More... | |
virtual void | Print (Option_t *option="") const |
Print TNamed name and title. More... | |
virtual Int_t | Sizeof () const |
Return size of the TNamed part of the TObject. More... | |
![]() | |
TObject () | |
TObject (const TObject &object) | |
TObject copy ctor. More... | |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. More... | |
virtual | ~TObject () |
TObject destructor. More... | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. More... | |
virtual void | Browse (TBrowser *b) |
Browse object. May be overridden for another default action. More... | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. More... | |
virtual void | Delete (Option_t *option="") |
Delete this object. More... | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Computes distance from point (px,py) to the object. More... | |
virtual void | Draw (Option_t *option="") |
Default Draw method for all objects. More... | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. More... | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current pad. More... | |
virtual void | Dump () const |
Dump contents of object on stdout. More... | |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
Execute method on this object with the given parameter string, e.g. More... | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
Execute method on this object with parameters stored in the TObjArray. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Execute action corresponding to an event at (px,py). More... | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. More... | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. More... | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. More... | |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. More... | |
virtual const char * | GetIconName () const |
Returns mime type name of object. More... | |
virtual Option_t * | GetOption () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). More... | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. More... | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". More... | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. More... | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. More... | |
virtual Bool_t | IsFolder () const |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More... | |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). More... | |
Bool_t | IsOnHeap () const |
Bool_t | IsZombie () const |
virtual Bool_t | Notify () |
This method must be overridden to handle object notification. More... | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. More... | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. More... | |
virtual void | RecursiveRemove (TObject *obj) |
Recursively remove this object from a list. More... | |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object in the file specified by filename. More... | |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
Save a primitive as a C++ statement(s) on output stream "out". More... | |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. More... | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. More... | |
virtual void | UseCurrentStyle () |
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
Write this object to the current directory. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Write this object to the current directory. More... | |
void * | operator new (size_t sz) |
void * | operator new[] (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz, void *vp) |
void | operator delete (void *ptr) |
Operator delete. More... | |
void | operator delete[] (void *ptr) |
Operator delete []. More... | |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. More... | |
void | SetBit (UInt_t f) |
void | ResetBit (UInt_t f) |
Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
void | InvertBit (UInt_t f) |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. More... | |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. More... | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. More... | |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. More... | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. More... | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. More... | |
void | MayNotUse (const char *method) const |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More... | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. More... | |
Static Public Member Functions | |
static void | PaintSpectrum (TH2 *h2, Option_t *option="", Int_t bs=1600) |
This function allows to set all the possible options available in TSpectrum2Painter and paint "h2". More... | |
![]() | |
static Long_t | GetDtorOnly () |
Return destructor only flag. More... | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. More... | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. More... | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. More... | |
Protected Member Functions | |
Int_t | BezC (Int_t i) |
This function is called from BezierBlend function. More... | |
Double_t | BezierBlend (Int_t i, Double_t bezf) |
This function calculates Bezier approximation. More... | |
void | BezierSmoothing (Double_t bezf) |
Calculates screen coordinates of the smoothed point. More... | |
Double_t | ColorCalculation (Double_t dx1, Double_t dy1, Double_t z1, Double_t dx2, Double_t dy2, Double_t z2, Double_t dx3, Double_t dy3, Double_t z3) |
Calculates and returns color value for the surface triangle given by function parameters: -dx1,dy1,z1 coordinates of the first point in 3d space -dx2,dy2,z2 coordinates of the second point in 3d space -dx3,dy3,z3 coordinates of the third point in 3d space. More... | |
void | ColorModel (unsigned ui, unsigned ui1, unsigned ui2, unsigned ui3) |
This function calculates color for one palette entry given by function parameter ui. More... | |
void | CopyEnvelope (Double_t xr, Double_t xs, Double_t yr, Double_t ys) |
Copies envelope vector, which ensures hidden surface removal for the contours display mode. More... | |
void | DrawMarker (Int_t x, Int_t y, Int_t w, Int_t h, Int_t type) |
Draws channel mark at the screen coordinates x, y. More... | |
void | Envelope (Int_t x1, Int_t y1, Int_t x2, Int_t y2) |
Ensures hidden surface removal. More... | |
void | EnvelopeBars (Int_t x1, Int_t y1, Int_t x2, Int_t y2) |
Ensures hidden surfuce removal for Bars, BarsX and BarsY display modes. More... | |
Double_t | ShadowColorCalculation (Double_t xtaz, Double_t ytaz, Double_t ztaz, Double_t shad_noise) |
Determines whether the center of the triangle in 3-d space given by function parameters: -xtaz,ytaz,ztaz is in shadow or not. More... | |
void | Slice (Double_t xr, Double_t yr, Double_t xs, Double_t ys, TLine *line) |
Calculates screen coordinates of the line given by two nodes for contours display mode. More... | |
void | Transform (Int_t it, Int_t jt, Int_t zmt) |
Reads out the value from histogram and calculates screen coordinates. More... | |
![]() | |
void | MakeZombie () |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
Interface to ErrorHandler (protected). More... | |
#include <TSpectrum2Painter.h>
anonymous enum |
Definition at line 70 of file TSpectrum2Painter.h.
|
virtual |
TSpectrum2Painter destructor.
Definition at line 174 of file TSpectrum2Painter.cxx.
This function is called from BezierBlend function.
Definition at line 749 of file TSpectrum2Painter.cxx.
Referenced by BezierBlend().
This function calculates Bezier approximation.
Definition at line 762 of file TSpectrum2Painter.cxx.
Referenced by BezierSmoothing().
Calculates screen coordinates of the smoothed point.
Parameter bezf changes within the interval 0 to 1 in 0.1 steps.
Definition at line 777 of file TSpectrum2Painter.cxx.
Referenced by Paint().
|
protected |
Calculates and returns color value for the surface triangle given by function parameters: -dx1,dy1,z1 coordinates of the first point in 3d space -dx2,dy2,z2 coordinates of the second point in 3d space -dx3,dy3,z3 coordinates of the third point in 3d space.
Definition at line 240 of file TSpectrum2Painter.cxx.
Referenced by Paint().
|
protected |
This function calculates color for one palette entry given by function parameter ui.
Other parameters -ui1,ui2,ui3 represent r, g, b color components of the basic pen color.
Definition at line 472 of file TSpectrum2Painter.cxx.
Referenced by Paint().
|
protected |
Copies envelope vector, which ensures hidden surface removal for the contours display mode.
Definition at line 1140 of file TSpectrum2Painter.cxx.
Referenced by Paint().
Draws channel mark at the screen coordinates x, y.
Width of the mark is w, height is h and the type of the mark is determined by the parameter type.
Definition at line 997 of file TSpectrum2Painter.cxx.
Referenced by Paint().
Ensures hidden surface removal.
Definition at line 795 of file TSpectrum2Painter.cxx.
Referenced by Paint().
Ensures hidden surfuce removal for Bars, BarsX and BarsY display modes.
Definition at line 908 of file TSpectrum2Painter.cxx.
Referenced by Paint().
Gets angles of the view: -alpha - angle between base line of Canvas and right lower edge of picture base plane -beta - angle between base line of Canvas and left lower edge of picture base plane -view - rotation angle of the view, it can be 0, 90, 180, 270 degrees.
Definition at line 7267 of file TSpectrum2Painter.cxx.
Gets Bezier smoothing switch: -bezier - determines Bezier interpolation (applies only for simple display modes group for grid, x_lines, y_lines display modes)
Definition at line 7335 of file TSpectrum2Painter.cxx.
This function gets attributes for drawing channel: -enable - decides whether the channel grid is shown or not -color - color of channel grid.
Definition at line 7381 of file TSpectrum2Painter.cxx.
void TSpectrum2Painter::GetChanMarks | ( | Int_t & | enable, |
Int_t & | color, | ||
Int_t & | width, | ||
Int_t & | height, | ||
Int_t & | style | ||
) |
Gets drawing attributes for channel marks: -enable - decides whether the channel marks are shown or not -color - color of channel marks -width - width of channel marks in pixels -height - height of channel marks in pixels -style - style of channel marks (dot, cross, star, rectangle, X, diamond, triangle)
Definition at line 7369 of file TSpectrum2Painter.cxx.
Gets shading color algorithm: -colorAlgorithm - rgb smooth alorithm, rgb modulo color component, cmy smooth alorithm, cmy modulo color component, cie smooth alorithm, cie modulo color component, yiq smooth alorithm, yiq modulo color component, hsv smooth alorithm, hsv modulo algorithm.
Definition at line 7289 of file TSpectrum2Painter.cxx.
Gets color increments between two color levels for r, g, b components: -r, g, b - color increments between two color levels.
Definition at line 7299 of file TSpectrum2Painter.cxx.
Gets width between horizontal slices: -width - width between contours, applies only for contours display mode.
Definition at line 7345 of file TSpectrum2Painter.cxx.
Gets display group mode and display mode: -modeGroup - the following group modes might have been set: simple modes-kPicture2ModeGroupSimple, modes with shading according to light-kPicture2ModeGroupLight, modes with shading according to channels counts-kPicture2ModeGroupHeight, modes of combination of shading according to light and to channels counts-kPicture2ModeGroupLightHeight -displayMode - display modes that might have been set: points, grid, contours, bars, x_lines, y_lines, bars_x, bars_y, needles, surface, triangles.
Definition at line 7229 of file TSpectrum2Painter.cxx.
Gets weight between shading according to fictive light source and according to channels counts: -weight - weight between shading according to fictive light source and according to channels counts, applies only for kPicture2ModeGroupLightHeight modes group.
Definition at line 7355 of file TSpectrum2Painter.cxx.
Gets position of fictive light source in 3D space: -x, y, z.
Definition at line 7311 of file TSpectrum2Painter.cxx.
Gets nodes in both directions: -nodesx, nodesy, only the bins at the nodes points are displayed.
Definition at line 7254 of file TSpectrum2Painter.cxx.
Gets pen attributes: -color - color of spectrum -style - style of pen (solid, dash, dot, dash-dot) -width - width of pen in pixels.
Definition at line 7242 of file TSpectrum2Painter.cxx.
Gets shading and shadow switches: -shading - determines whether the picture will shaded, smoothed (no shading, shading), for rainbowed display modes only -shadow - determines whether shadow will be drawn, for rainbowed display modes with shading according to light.
Definition at line 7324 of file TSpectrum2Painter.cxx.
Gets z-axis scale: -scale - it can be linear, sqrt or log.
Definition at line 7279 of file TSpectrum2Painter.cxx.
ClassDef (TSpectrum2Painter,0) private TSpectrum2Painter& TSpectrum2Painter::operator= | ( | const TSpectrum2Painter & | ) |
Paints histogram according to preset parameters.
Begin_Html
Reimplemented from TObject.
Definition at line 1167 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
This function allows to set all the possible options available in TSpectrum2Painter and paint "h2".
TSpectrum2Painter offers a large set of options/attributes. In the "option" parameter each of them can be set to specific values via "operators" in the option itself. for instance on can do:
h2->Draw("SPEC a(30,30,0)");
to draw h2 with TSpectrum2Painter using all the default attributes except the viewing angles. The operators' names are case unsensitive (one can use "a" or "A"). Operators parameters are seperated by ",". The operators can be put is any order in the option. Operators must be serparated by " ". No " " characters should be put in an operator. This help page describes all the available operators.
* * *
The way "h2" will be painted is controled with 2 parameters the "Display modes groups" and the "Display Modes".
"Display modes groups" can take the following values:
0 = Simple - it covers simple display modes using one color only 1 = Light - in this group the shading is carried out according to the position of the fictive light source 2 = Height - in this group the shading is carried out according to the channel contents 3 = LightHeight - combination of two previous shading algorithms. One can control the weight between both algorithms.
"Display modes" can take the following values:
1 = Points. 2 = Grid. 3 = Contours. 4 = Bars. 5 = LinesX. 6 = LinesY. 7 = BarsX. 8 = BarsY. 9 = Needles. 10 = Surface. 11 = Triangles.
Using this function these parameters can be set using the "dm" operator in the option. Example:
h2->Draw("SPEC dm(1,2)");
will paint the 2D histogram h2 using the "Light Display mode group" and the "Grid Display mode". The following table summarizes all the possible combinations of the "Display modes groups" and the "Display modes".
+--------+-------+--------+--------------+ | Simple | Light | Height | Light-Height | +-----------+--------+-------+--------+--------------+ | Points | X | X | X | X | +-----------+--------+-------+--------+--------------+ | Grid | X | X | X | X | +-----------+--------+-------+--------+--------------+ | Contours | X | - | X | - | +-----------+--------+-------+--------+--------------+ | Bars | X | - | X | - | +-----------+--------+-------+--------+--------------+ | LinesX | X | X | X | X | +-----------+--------+-------+--------+--------------+ | LinesY | X | X | X | X | +-----------+--------+-------+--------+--------------+ | BarsX | X | - | X | - | +-----------+--------+-------+--------+--------------+ | BarsY | X | - | X | - | +-----------+--------+-------+--------+--------------+ | Needles | X | - | - | - | +-----------+--------+-------+--------+--------------+ | Surface | - | X | X | X | +-----------+--------+-------+--------+--------------+ | Triangles | X | X | X | X | +-----------+--------+-------+--------+--------------+ * * *
The Pen Attributes can be changed using pa(color, style, width). Example:
h2->Draw("SPEC dm(1,2) pa(2,1,2)");
sets the line color to 2, line type to 1 and line width to2. Note that if pa() is not specified, the histogram "h2" line attributes are used. Note also that operators for SPEC option can be cummulated and specified in any order.
* * *
The buffer size can be change with bf(size). Example:
h2->Draw("SPEC bf(8000)");
The spectrum painter needs a buffer to paint the spectrum. By default the buffer size is set to 1600. In most cases this buffer size is enough. But if the canvas size is very big, for instance 8000x5000 this buffer size is too small. An error message is issued telling to use the option bf().
* * *
The number of nodes can be change with n(nodesx, nodesy). Example:
h2->Draw("SPEC n(40,40)");
Sometimes the displayed region is rather large. When displaying all channels pictures become very dense and complicated. It is very difficult to understand the overall shape of data. "n(nx,ny)" allows to change the density of displayed channels. Only the channels coinciding with given nodes are displayed.
* * *
The visualization angles can be changed with a(alpha, beta, view). Example:
h2->Draw("SPEC n(40,40) dm(0,1) a(30,30,0)");
Alpha defines the angle between bottom horizontal screen line and the displayed space on the right side of the picture and beta on the left side, respectively. One can rotate the 3-d space around vertical axis going through the center of it employing the view parameter. Allowed values are 0, 90, 180 and 270 degrees.
* * *
zs(scale) changes the scale of the Z-axis Possible values are:
0 = Linear (default) 1 = Log 2 = Sqrt
If gPad->SetLogz() has been set, log scale on Z-axis is set automatically. No need to use the zs() operator. Note that the X and Y axis are always linear.
* * *
ci(r,g,b), were r,g and b are floats defines the colors increments. For sophisticated shading (Light, Height and LightHeight Display Modes Groups) the color palette starts from the basic pen color (see pa() function). There is a predefined number of color levels (256). Color in every level is calculated by adding the increments of the r, g, b components to the previous level. Using this function one can change the color increments between two neighboring color levels. The function does not apply dor the Simple Display Modes Group. The default values are: (1,1,1).
* * *
ca(color_algorithm) allows to choose the Color Algorithm. To define the colors one can employ one of the following color algorithms (RGB, CMY, CIE, YIQ, HVS models). When the level of a component reaches the limit value one can choose either smooth transition (by decreasing the limit value) or a sharp modulo transition (continuing with 0 value). This makes possible to realize various visual effects. One can choose from the following set of the algorithms:
0 = RGB Smooth 1 = RGB Modulo 2 = CMY Smooth 3 = CMY Modulo 4 = CIE Smooth 5 = CIE Modulo 6 = YIQ Smooth 7 = YIQ Modulo 8 = HVS Smooth 9 = HVS Modulo
This function does not apply on Simple display modes group. Default value is 0. Example:
h2->Draw("SPEC c1(4) dm(0,1) a(30,30,0)");
choose CMY Modulo to paint the "h2" histogram.
* * *
lp(x,y,z) set the light position. In Light and LightHeight display modes groups the color palette is calculated according to the fictive light source position in 3-d space. Using this function one can change the position of the source and thus to achieve various graphical effects. This function does not apply for Simple and Height display modes groups. Default is: lp(1000,1000,100).
* * *
s(shading,shadow) allows to set the shading. The picture's surface is composed of triangles. If desired the edges of the neighboring triangles can be smoothed (shaded). If desired the display of the shadow can be painted as well. The function does not apply for Simple display modes group. The possible values for shading are:
0 = Not Shaded 1 = Shaded
The possible values for shadow are:
0 = Shadows are not painted 1 = Shadows are painted
Default values: s(1,0)
* * *
b(bezier) set the Bezier smoothing. For Simple display modes group and for Grid, LinesX and LinesY display modes one can smooth data using Bezier smoothing algorithm. The function does not apply for other display modes groups and display modes. Possible values are:
0 = No bezier smoothing 1 = Bezier smoothing
Default value is: b(0)
* * *
cw(width) set the contour width. This function applies only for the Contours display mode. One can change the width between horizontal slices and thus their density. Default value: cw(50)
* * *
lhw(weight) set the light height weight. For LightHeight display modes group one can change the weight between both shading algorithms. The function does not apply for other display modes groups. Default value is lhw(0.5).
* * *
cm(enable,color,width,height,style) allows to draw a marker on each node. In addition to the surface drawn using any above given algorithm one can display channel marks. One can control the color as well as the width, height (in pixels) and the style of the marks. The parameter enable can be set to
0 = Channel marks are not drawn 1 = Channel marks drawn
The possible styles can be chosen from the set:
1 = Dot 2 = Cross 3 = Star 4 = Rectangle 5 = X 6 = Diamond 7 = Triangle.
* * *
cg(enable,color) channel grid. In addition to the surface drawn using any above given algorithm one can display grid using the color parameter. The parameter enable can be set to:
0 = Grid not drawn 1 = Grid drawn
* * *
See example in $ROOTSYS/tutorials/spectrum/spectrumpainter.C Begin_Html
Definition at line 7659 of file TSpectrum2Painter.cxx.
Sets angles of the view: -alpha - angles of display,alpha+beta must be less or equal to 90, alpha- angle between base line of Canvas and right lower edge of picture base plane -beta - angle between base line of Canvas and left lower edge of picture base plane -view - rotation angle of the view, it can be 0, 90, 180, 270 degrees.
Definition at line 7059 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets on/off Bezier smoothing: -bezier - determines Bezier interpolation (applies only for simple display modes group for grid, x_lines, y_lines display modes)
Definition at line 7147 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
This function sets enables/disables drawing of channel grid and sets its color: -enable - decides whether the channel grid is shown or not -color - color of channel grid.
Definition at line 7213 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
void TSpectrum2Painter::SetChanMarks | ( | Int_t | enable, |
Int_t | color, | ||
Int_t | width, | ||
Int_t | height, | ||
Int_t | style | ||
) |
Sets enables/disables drawing of channel marks and sets their attributes: -enable - decides whether the channel marks are shown or not -color - color of channel marks -width - width of channel marks in pixels -height - height of channel marks in pixels -style - style of channel marks (dot, cross, star, rectangle, X, diamond, triangle)
Definition at line 7186 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets shading color algorithm: -colorAlgorithm - applies only for rainbowed display modes (rgb smooth alorithm, rgb modulo color component, cmy smooth alorithm, cmy modulo color component, cie smooth alorithm, cie modulo color component, yiq smooth alorithm, yiq modulo color component, hsv smooth alorithm, hsv modulo color component, it does not apply for simple display modes algorithm group.
Definition at line 7092 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets color increments between two color levels for r, g, b components: -r, g, b - color increments between two color levels.
Definition at line 7104 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets width between horizontal slices: -width - width between contours, applies only for contours display mode.
Definition at line 7160 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets display group mode and display mode: -modeGroup - the following group modes can be set: simple modes-kPicture2ModeGroupSimple, modes with shading according to light-kPicture2ModeGroupLight, modes with shading according to channels counts-kPicture2ModeGroupHeight, modes of combination of shading according to light and to channels counts-kPicture2ModeGroupLightHeight -displayMode - posible display modes are: points, grid, contours, bars, x_lines, y_lines, bars_x, bars_y, needles, surface, triangles.
Definition at line 7013 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets weight between shading according to fictive light source and according to channels counts: -weight - weight between shading according to fictive light source and according to channels counts, applies only for kPicture2ModeGroupLightHeight modes group.
Definition at line 7170 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets position of fictive light source in 3D space: -x, y, z.
Definition at line 7118 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets nodes in both directions: -nodesx, nodesy, only the bins at the nodes points are displayed.
Definition at line 7044 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets pen attributes: -color - color of spectrum -style - style of pen (solid, dash, dot, dash-dot) -width - width of pen in pixels.
Definition at line 7030 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets on/off shading and shadow switches: -shading - determines whether the picture will shaded, smoothed (no shading, shading), for rainbowed display modes only -shadow - determines whether shadow will be drawn, for rainbowed display modes with shading according to light.
Definition at line 7133 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
Sets z-axis scale: -scale - linear, sqrt or log.
Definition at line 7074 of file TSpectrum2Painter.cxx.
Referenced by PaintSpectrum().
|
protected |
Determines whether the center of the triangle in 3-d space given by function parameters: -xtaz,ytaz,ztaz is in shadow or not.
If yes it return 1 otherwise it returns 0.
Definition at line 383 of file TSpectrum2Painter.cxx.
Referenced by Paint().
|
protected |
Calculates screen coordinates of the line given by two nodes for contours display mode.
The line is given by two points xr, yr, xs, ys. Finally it draws the line.
Definition at line 1080 of file TSpectrum2Painter.cxx.
Referenced by Paint().
Reads out the value from histogram and calculates screen coordinates.
Parameters: -it - node in x- direction -jt - node in y- direction -zmt - control variable
Definition at line 194 of file TSpectrum2Painter.cxx.
Referenced by Paint().
|
protected |
Definition at line 143 of file TSpectrum2Painter.h.
Referenced by GetAngles(), Paint(), and SetAngles().
|
protected |
Definition at line 144 of file TSpectrum2Painter.h.
Referenced by GetAngles(), Paint(), and SetAngles().
|
protected |
Definition at line 157 of file TSpectrum2Painter.h.
Referenced by GetBezier(), Paint(), and SetBezier().
|
protected |
Definition at line 130 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 131 of file TSpectrum2Painter.h.
Referenced by Envelope(), Paint(), and Transform().
|
protected |
Definition at line 132 of file TSpectrum2Painter.h.
Referenced by Envelope(), Paint(), and Transform().
|
protected |
Definition at line 133 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), and Transform().
|
protected |
Definition at line 190 of file TSpectrum2Painter.h.
Referenced by BezierSmoothing(), and Paint().
|
protected |
Definition at line 191 of file TSpectrum2Painter.h.
Referenced by BezierSmoothing(), and Paint().
|
protected |
Definition at line 164 of file TSpectrum2Painter.h.
Referenced by GetChanGrid(), Paint(), and SetChanGrid().
|
protected |
Definition at line 163 of file TSpectrum2Painter.h.
Referenced by GetChanGrid(), Paint(), and SetChanGrid().
|
protected |
Definition at line 162 of file TSpectrum2Painter.h.
Referenced by DrawMarker(), GetChanMarks(), and SetChanMarks().
|
protected |
Definition at line 158 of file TSpectrum2Painter.h.
Referenced by GetChanMarks(), Paint(), and SetChanMarks().
|
protected |
Definition at line 161 of file TSpectrum2Painter.h.
Referenced by GetChanMarks(), Paint(), and SetChanMarks().
|
protected |
Definition at line 159 of file TSpectrum2Painter.h.
Referenced by GetChanMarks(), Paint(), and SetChanMarks().
|
protected |
Definition at line 160 of file TSpectrum2Painter.h.
Referenced by GetChanMarks(), Paint(), and SetChanMarks().
|
protected |
Definition at line 150 of file TSpectrum2Painter.h.
Referenced by ColorModel(), GetColorAlgorithm(), and SetColorAlgorithm().
|
protected |
Definition at line 142 of file TSpectrum2Painter.h.
Referenced by GetContourWidth(), Paint(), and SetContourWidth().
|
protected |
Definition at line 138 of file TSpectrum2Painter.h.
Referenced by GetDisplayMode(), Paint(), SetBezier(), and SetDisplayMode().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 185 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Envelope(), EnvelopeBars(), Paint(), Slice(), and ~TSpectrum2Painter().
|
protected |
Definition at line 186 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), Slice(), and ~TSpectrum2Painter().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by BezierSmoothing(), and Paint().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by BezierSmoothing(), and Paint().
|
protected |
Definition at line 123 of file TSpectrum2Painter.h.
Referenced by Paint(), ShadowColorCalculation(), and Transform().
|
protected |
Definition at line 167 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), Slice(), and Transform().
|
protected |
Definition at line 168 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), Slice(), and Transform().
|
protected |
Definition at line 146 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), and Paint().
|
protected |
Definition at line 151 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetLightHeightWeight(), and SetLightHeightWeight().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Envelope(), EnvelopeBars(), and Paint().
|
protected |
Definition at line 188 of file TSpectrum2Painter.h.
Referenced by Paint().
|
protected |
Definition at line 137 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetDisplayMode(), Paint(), SetColorAlgorithm(), SetDisplayMode(), SetLightHeightWeight(), and SetShading().
|
protected |
Definition at line 169 of file TSpectrum2Painter.h.
Referenced by Paint().
|
protected |
Definition at line 170 of file TSpectrum2Painter.h.
Referenced by Paint().
|
protected |
Definition at line 171 of file TSpectrum2Painter.h.
Referenced by Paint().
|
protected |
Definition at line 172 of file TSpectrum2Painter.h.
Referenced by Paint().
|
protected |
Definition at line 187 of file TSpectrum2Painter.h.
Referenced by ColorModel().
|
protected |
buffers' size
Definition at line 189 of file TSpectrum2Painter.h.
Referenced by ColorModel(), and Paint().
|
protected |
Definition at line 140 of file TSpectrum2Painter.h.
Referenced by GetNodes(), Paint(), and SetNodes().
|
protected |
Definition at line 141 of file TSpectrum2Painter.h.
Referenced by GetNodes(), Paint(), and SetNodes().
|
protected |
Definition at line 180 of file TSpectrum2Painter.h.
Referenced by Paint().
|
protected |
Definition at line 134 of file TSpectrum2Painter.h.
Referenced by GetPenAttr(), Paint(), and SetPenAttr().
|
protected |
Definition at line 135 of file TSpectrum2Painter.h.
Referenced by GetPenAttr(), Paint(), and SetPenAttr().
|
protected |
Definition at line 136 of file TSpectrum2Painter.h.
Referenced by GetPenAttr(), Paint(), and SetPenAttr().
|
protected |
Definition at line 147 of file TSpectrum2Painter.h.
Referenced by ColorModel(), GetColorIncrements(), and SetColorIncrements().
|
protected |
Definition at line 148 of file TSpectrum2Painter.h.
Referenced by ColorModel(), GetColorIncrements(), and SetColorIncrements().
|
protected |
Definition at line 149 of file TSpectrum2Painter.h.
Referenced by ColorModel(), GetColorIncrements(), and SetColorIncrements().
|
protected |
Definition at line 156 of file TSpectrum2Painter.h.
Referenced by GetShading(), Paint(), and SetShading().
|
protected |
Definition at line 155 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetShading(), Paint(), and SetShading().
|
protected |
Definition at line 173 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), Slice(), and Transform().
|
protected |
Definition at line 174 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), Slice(), and Transform().
|
protected |
Definition at line 175 of file TSpectrum2Painter.h.
Referenced by Paint(), Slice(), and Transform().
|
protected |
Definition at line 176 of file TSpectrum2Painter.h.
Referenced by Paint(), Slice(), and Transform().
|
protected |
Definition at line 177 of file TSpectrum2Painter.h.
Referenced by Paint(), Slice(), and Transform().
|
protected |
Definition at line 145 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetAngles(), Paint(), and SetAngles().
|
protected |
Definition at line 178 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), Slice(), and Transform().
|
protected |
Definition at line 179 of file TSpectrum2Painter.h.
Referenced by Paint(), Slice(), and Transform().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Envelope(), EnvelopeBars(), and Paint().
|
protected |
Definition at line 152 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetLightPosition(), SetLightPosition(), and ShadowColorCalculation().
|
protected |
Definition at line 125 of file TSpectrum2Painter.h.
Referenced by Paint(), and ShadowColorCalculation().
|
protected |
Definition at line 124 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), ShadowColorCalculation(), Slice(), and Transform().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Envelope(), EnvelopeBars(), and Paint().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Envelope(), EnvelopeBars(), and Paint().
|
protected |
Definition at line 153 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetLightPosition(), SetLightPosition(), and ShadowColorCalculation().
|
protected |
Definition at line 127 of file TSpectrum2Painter.h.
Referenced by Paint(), and ShadowColorCalculation().
|
protected |
Definition at line 126 of file TSpectrum2Painter.h.
Referenced by CopyEnvelope(), Paint(), ShadowColorCalculation(), Slice(), and Transform().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Envelope(), EnvelopeBars(), and Paint().
|
protected |
Definition at line 184 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by Paint(), Slice(), and Transform().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 154 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetLightPosition(), SetLightPosition(), and ShadowColorCalculation().
|
protected |
Definition at line 129 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), and Paint().
|
protected |
Definition at line 128 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), Paint(), and Transform().
|
protected |
Definition at line 183 of file TSpectrum2Painter.h.
Referenced by Paint(), and Transform().
|
protected |
Definition at line 139 of file TSpectrum2Painter.h.
Referenced by ColorCalculation(), GetZScale(), Paint(), SetZScale(), ShadowColorCalculation(), and Transform().