library: libRooFit #include "RooGraphNode.h"

# RooGraphNode

class description - source file - inheritance tree (.pdf)

## class RooGraphNode : public TObject

| Inheritance Chart:
`TObject`
| <- | `RooGraphNode` |

        public:

                              RooGraphNode()
                              RooGraphNode(double x, double y)
                              RooGraphNode(double x, double y, double w, double l, TString text)
                              RooGraphNode(const RooGraphNode&)
                              ~RooGraphNode()
               static TClass* Class()
                         void draw()
                         void draw(int color)
                         void GetDxDy(double& dx, double& dy, TList* nodessprings)
                    TEllipse* GetEllipse(TList* padlist)
          virtual const char* GetName() const
                         void GetNumber(double number)
                       double GetRadius() const
                       double GetTotalE(TList* nodessprings, char m)
                       double GetTotalE2(TList* nodessprings, char m)
                       double GetTotalEChange(TList* nodessprings)
                       double GetTotalExy(TList* nodessprings)
                         void GetValue(double number, TList* padlist, TList* edges)
                       double GetX1() const
                       double GetY1() const
              virtual TClass* IsA() const
                         void NodesSprings(TList* springs, TList* nodessprings)
                RooGraphNode& operator=(const RooGraphNode&)
                         void paint()
                         void print() const
                         void read(ifstream& file)
                         void ReadPDF(ifstream& file)
                         void RedrawEdges(TList* edges)
                         void RedrawEdges(TList* edges, int color)
                         void RemoveE(TList* padlist)
                         void RemoveEdges(TList* edges, TList* padlist)
                         void RemoveN(TList* padlist)
                         void RemoveT(TList* padlist)
                         void SetCoords(double x, double y)
                         void SetSize(double w, double l)
                         void SetText(TString text)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)

### Data Members

        private:

           double fX1      x coordinate
           double fY1      y coordinate
           double fR1      node width
           double fR2      node length
          TString ftext    string of text
           double fnumber

## Class Description

    RooGraphNode:

    The purpose of this class is to create nodes, based from the TEllipse class
    that have a position, name, and energy that is drawn on the graph with the
    node.  The energy is determined by the topology of the system of nodes the
    node is drawn with and the edges it is attached with and is calculated from
    a system of strings that attach all the nodes in the system.

RooGraphNode()

    Node default constructor

RooGraphNode(double x, double y)

    Node constructor with default radius and text

RooGraphNode(double x, double y, double w, double l, TString text)

    Node standard constructor

void paint()

    Paints Node to canvas by painting an ellipse and text at that location

void draw()

    Draws Node to canvas

void draw(int color)

    Draws Node to canvas with given color

void print() const

    outputs location and size of the node to screen

void read(ifstream &file)

    Reads the properties of the node from a file of a set format

void ReadPDF(ifstream &file)

    Reads the properties of the node from a file created from the PDF info

void SetCoords(double x, double y)

    Changes the coordinates of the node to the given values

void SetSize(double w, double l)

    Sets the size of the node to the given values

void SetText(TString text)

    Changes the name and attached string of the node to given string

void GetNumber(double /*number*/)

    draws the given number value to the screen at the node location.
    This is a number or value associated with the node.

void GetValue(double number, TList *padlist, TList *edges)

TEllipse* GetEllipse(TList *padlist)

    Returns the ellipse that was created by drawing this ellipse to the current
    canvas by finding it from the list of canvas objects.

void RemoveT(TList *padlist)

    Finds and removes the text associated with this node from the list of
    canvas objects

void RemoveN(TList *padlist)

    Finds the number associated with this node, created from GetNumber, and
    removes it from the canvas by finding it in the list of canvas objects

void RemoveE(TList *padlist)

    Removes the ellipse associated with this node from the canvas
    This is the only way to redraw the Node in a new location

void RemoveEdges(TList *edges, TList *padlist)

    Finds all the edges associated with this node by searching a list of all
    the edges on the canvas, and then finds them in the list of canvas objects
    and removes them from the canvas.
    This is the only way the edges can be redrawn in new location

void RedrawEdges(TList *edges)

    Redraws the edges associated with this node.

void RedrawEdges(TList *edges, int color)

    Redraws the edges associated with this node in the given color

void NodesSprings(TList *springs, TList *nodessprings)

    Finds all the springs associated witht this node from the list of springs
    existing and puts them into a list.

double GetTotalEChange(TList *nodessprings)

    Returns the total change in energy for this node

double GetTotalE(TList *nodessprings, char m)

    Returns the derivative of the energy of this node with respect to either
    x or y, which is determined by the input character m

double GetTotalE2(TList *nodessprings, char m)

    Returns the second derivative of the energy of the node with respect to
    x or y, determined by the input character m

double GetTotalExy(TList *nodessprings)

    Returns the double derivative of the energy of the node with respect to
    both x and y

void GetDxDy(double &dx, double &dy, TList *nodessprings)

    Solves for two parameters, dx and dy, which are the change in the possition
    of the node necessary to reduce it's energy

### Inline Functions

                     void ~RooGraphNode()
                   double GetX1() const
                   double GetY1() const
                   double GetRadius() const
              const char* GetName() const
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
             RooGraphNode RooGraphNode(const RooGraphNode&)
            RooGraphNode& operator=(const RooGraphNode&)

Last update: Tue Jun 28 18:12:54 2005
Copyright (c) 2000-2005, Regents of the University of California *