#include "TDrawInfo.h"

TDrawInfo


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

class TDrawInfo : public TObject

Inheritance Chart:
TObject
<-
TDrawInfo

    protected:
void ClearPrevious() Bool_t ParseName(TString name) Bool_t ParseOption() Bool_t ParseVarExp() Bool_t SplitVariables(TString variables) public:
TDrawInfo() TDrawInfo(const TDrawInfo&) ~TDrawInfo() static TClass* Class() TDrawInfo::EOutputType DefineType() Bool_t GetAdd() const Int_t GetDimension() const Bool_t GetDraw() const TString GetExp() const Double_t GetIfSpecified(Int_t num, Double_t def) const Int_t GetNoParameters() const TString GetObjectName() const TString GetObjectTitle() const TObject* GetOriginal() const Double_t GetParameter(int num) const TString GetProofSelectorName() const TString GetSelection() const TString GetVarExp(Int_t num) const TString GetVarExp() const virtual TClass* IsA() const Bool_t IsSpecified(int num) const TDrawInfo& operator=(const TDrawInfo&) Bool_t Parse(const char* varexp, const char* selection, Option_t* option) void SetObjectName(const char* s) void SetOriginal(TObject* o) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TString fExp complete variable expression TString fSelection selection expression TString fOption draw options Int_t fDimension dimension of the histogram/plot TString fVarExp[4] variable expression 0 - X, 1 - Y, 2 - Z, 3 - W Bool_t fAdd values should be added to an existing object TString fName histogram's/plot's name Int_t fNoParameters if dimensions of the plot was specified Bool_t fParameterGiven[9] true if the parameter was given, otherwise false Double_t fParameters[9] parameters in brackets Bool_t fDraw if to draw the plot TObject* fOriginal original plot (if it is to be reused) Bool_t fDrawProfile true if the options contain :"prof" TDrawInfo::EOutputType fOutputType type of the output public:
static const TDrawInfo::EOutputType kUNKNOWN static const TDrawInfo::EOutputType kEVENTLIST static const TDrawInfo::EOutputType kPROFILE static const TDrawInfo::EOutputType kPROFILE2D static const TDrawInfo::EOutputType kGRAPH static const TDrawInfo::EOutputType kPOLYMARKER3D static const TDrawInfo::EOutputType kHISTOGRAM1D static const TDrawInfo::EOutputType kHISTOGRAM2D static const TDrawInfo::EOutputType kLISTOFGRAPHS static const TDrawInfo::EOutputType kLISTOFPOLYMARKERS3D static Int_t fgMaxDimension = 4 static Int_t fgMaxParameters = 9

Class Description

                                                                      
 TDrawInfo                                                            
                                                                      
 Class that parses all parameters for TTree::Draw().                  
 See TTree::Draw() for the format description.                        
                                                                      


TDrawInfo()
 Constructor - cleans all the class variables.

~TDrawInfo()
 Destructor.

void ClearPrevious()
 Resets all the variables of the class.

Bool_t SplitVariables(TString variables)
 Parse expression [var1 [:var2 [:var3] ...]],
 number of variables cannot be greater than fgMaxDimension.
 A colon which is followed by (or that follows) another semicolon
 is not regarded as a separator.
 If there are more separating : than fgMaxDimension - 1 then
 all characters after (fgMaxDimension - 1)th colon is put into
 the last variable.
 fDimension := <number of variables>
 fVarExp[0] := <first variable string>
 fVarExp[1] := <second variable string>
 ..
 Returns kFALSE in case of an error.

Bool_t ParseName(TString name)
 Syntax:
 [[+]name[(num1 [, [num2] ] [, [num3] ] ...)]]
 num's are floating point numbers
 sets the fileds fNoParameters, fParameterGiven, fParameters, fAdd, fName
 to apropriate values.
 Returns fKALSE in case of an error.

Bool_t ParseVarExp()
 Split variables and parse name and parameters in brackets.

Bool_t ParseOption()
 Check if options contain some data important for choosing the type of the
 drawn object.

Bool_t Parse(const char *varexp, const char *selection, Option_t *option)
 Parses parameters from TTree::Draw().
 varexp - Variable expression; see TTree::Draw()
 selection - selection expression; see TTree::Draw()
 option - Drawnig option; see TTree::Draw

TString GetProofSelectorName() const
 Returns apropriate TSelector class name for proof for the object that is to be drawn
 assumes that Parse() method has been called before.

Double_t GetParameter(Int_t num) const
 returns *num*-th parameter from brackets in the expression
 in case of an error (wrong number) returns 0.0
 num - number of parameter (counted from 0)

Double_t GetIfSpecified(Int_t num, Double_t def) const
 num - parameter number
 def - default value of the parameter
 returns the value of *num*-th parameter from the brackets in the variable expression
 if the parameter of that number wasn't specified returns *def*.

Bool_t IsSpecified(int num) const
 returns kTRUE if the *num*-th parameter was specified
 otherwise returns fFALSE
 in case of an error (wrong num) prints an error message and
 returns kFALSE.

TString GetVarExp(Int_t num) const
 Returns the *num*-th variable string
 in case of an error prints an error message and returns an empty string.

TString GetVarExp() const
 Returns the variable string, i.e. [var1[:var2[:var2[:var4]]]].



Inline Functions


                       TString GetObjectName() const
                       TString GetObjectTitle() const
                        Bool_t GetAdd() const
                         Int_t GetDimension() const
                       TString GetSelection() const
                       TString GetExp() const
                      TObject* GetOriginal() const
                         Int_t GetNoParameters() const
                        Bool_t GetDraw() const
                          void SetObjectName(const char* s)
                          void SetOriginal(TObject* o)
        TDrawInfo::EOutputType DefineType()
                       TClass* Class()
                       TClass* IsA() const
                          void ShowMembers(TMemberInspector& insp, char* parent)
                          void Streamer(TBuffer& b)
                          void StreamerNVirtual(TBuffer& b)
                     TDrawInfo TDrawInfo(const TDrawInfo&)
                    TDrawInfo& operator=(const TDrawInfo&)


Author: Marek Biskup 24/01/2004
Last update: root/proof:$Name: $:$Id: TDrawInfo.cxx,v 1.4 2005/03/11 11:51:21 brun Exp $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.