library: libHist #include "TF12.h"

# TF12

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

## class TF12 : public TF1

| Inheritance Chart:
`TObject`
| <- | `TNamed`
| <- | `TFormula`
`TAttLine`
`TAttFill`
`TAttMarker`
| <- | `TF1`
| <- | `TF12` |

        public:

                           TF12()
                           TF12(const char* name, TF2* f2, Double_t xy, Option_t* option = "x")
                           TF12(const TF12& f12)
                   virtual ~TF12()
            static TClass* Class()
              virtual void Copy(TObject& f12) const
              virtual TF1* DrawCopy(Option_t* option = "") const
          virtual Double_t Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const
          virtual Double_t EvalPar(const Double_t* x, const Double_t* params = 0)
          virtual Double_t GetXY() const
           virtual TClass* IsA() const
              virtual void SavePrimitive(ofstream& out, Option_t* option)
              virtual void SetXY(Double_t xy)
              virtual void ShowMembers(TMemberInspector& insp, char* parent)
              virtual void Streamer(TBuffer& b)
                      void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

          Double_t fXY    Value along Y (if projection X) or X (if projection Y)
             Int_t fCase  projection along X(0), or Y(1)
              TF2* fF2    pointer to the mother TF2

## Class Description

     a projection of a TF2 along X or Y
     has the same behaviour as a TF1

          Example of a function

       TF2 *f2 = new TF2("f2","sin(x)*sin(y)/(x*y)",0,5,0,5);
       TF12 *f12 = new TF12("f12",f2,0.1,"y");
       f12->Draw();

TF12(): TF1()

     TF12 default constructor

TF12(const char *name, TF2 *f2, Double_t xy, Option_t *option) :TF1(name,"x",0,0)

     TF12 normal constructor
       Create a TF12 (special TF1) from a projection of a TF2
       for a fix value of Y if option="X" or X if option="Y"
     This value may be changed at any time via TF12::SetXY(xy)

~TF12()

    *-*-*-*-*-*-*-*-*-*-*F2 default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  =====================

TF12(const TF12 &f12) : TF1(f12)

void Copy(TObject &obj) const

    *-*-*-*-*-*-*-*-*-*-*Copy this F2 to a new F2*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ========================

TF1* DrawCopy(Option_t *option) const

    *-*-*-*-*-*-*-*Draw a copy of this function with its current attributes*-*-*
    *-*            ========================================================
    *-*
    *-*  This function MUST be used instead of Draw when you want to draw
    *-*  the same function with different parameters settings in the same canvas.
    *-*
    *-* Possible option values are:
    *-*   "SAME"  superimpose on top of existing picture
    *-*   "L"     connect all computed points with a straight line
    *-*   "C"     connect all computed points with a smooth curve.
    *-*
    *-* Note that the default value is "F". Therefore to draw on top
    *-* of an existing picture, specify option "SL"
    *-*
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Double_t Eval(Double_t x, Double_t /*y*/, Double_t /*z*/, Double_t /*t*/) const

    *-*-*-*-*-*-*-*-*-*-*Evaluate this formula*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  =====================
    *-*
    *-*   Computes the value of the referenced TF2 for a fix value of X or Y
    *-*
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Double_t EvalPar(const Double_t *x, const Double_t *params)

     Evaluate this function at point x[0]
       x[0] is the value along X if fCase =0, the value along Y if fCase=1
     if params is non null, the array will be used instead of the internal TF2
     parameters

void SavePrimitive(ofstream & /*out*/, Option_t * /*option*/)

     Save primitive as a C++ statement(s) on output stream out

void SetXY(Double_t xy)

     set the value of the constant for the TF2
       constant in X when projecting along Y
       constant in Y when projecting along X
      The function title is set to include the value of the constant
      The current pad is updated

### Inline Functions

               Double_t GetXY() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)

Author: Rene Brun 05/04/2003
Last update: root/hist:$Name: $:$Id: TF12.cxx,v 1.4 2005/04/29 20:34:51 brun Exp $
Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *