Logo ROOT   6.14/05
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
RooPrintable Class Reference

RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.

Each RooPlotable implementation must define methods that print the objects name, class name, title, value, arguments and extras to a provided stream. The definition of value is class dependent. The definition of arguments is also class dependent, but should always be interpreted as the names (and properties) of any (RooAbsArg) external inputs of a given object. The extras method can be used to print any properties that does not fit in any of the other classes. Each object an also override the definitions made in defaultPrintStyle and defaultPrintContents to determine what is printed (in terms of contents) and how it is printed (inline,single-line or multiline) given a Print() option string.

Definition at line 25 of file RooPrintable.h.

Public Types

enum  ContentsOption {
  kName =1, kClassName =2, kValue =4, kArgs =8,
  kExtras =16, kAddress =32, kTitle =64, kCollectionHeader =128
}
 
enum  StyleOption {
  kInline =1, kSingleLine =2, kStandard =3, kVerbose =4,
  kTreeStructure =5
}
 

Public Member Functions

 RooPrintable ()
 
virtual ~RooPrintable ()
 
virtual Int_t defaultPrintContents (Option_t *opt) const
 Default choice of contents to be printed (name and value) More...
 
virtual StyleOption defaultPrintStyle (Option_t *opt) const
 
virtual void printAddress (std::ostream &os) const
 Print class name of object. More...
 
virtual void printArgs (std::ostream &os) const
 Interface for printing of object arguments. More...
 
virtual void printClassName (std::ostream &os) const
 Print class name of object. More...
 
virtual void printExtras (std::ostream &os) const
 Interface to print extras of object. More...
 
virtual void printMultiline (std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
 Interface for detailed printing of object. More...
 
virtual void printName (std::ostream &os) const
 Print name of object. More...
 
virtual void printStream (std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
 Print description of object on ostream, printing contents set by contents integer, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'. More...
 
virtual void printTitle (std::ostream &os) const
 Print title of object. More...
 
virtual void printTree (std::ostream &os, TString indent="") const
 Interface for tree structure printing of object. More...
 
virtual void printValue (std::ostream &os) const
 Interface to print value of object. More...
 

Static Public Member Functions

static std::ostream & defaultPrintStream (std::ostream *os=0)
 Return a reference to the current default stream to use in Print(). More...
 
static void nameFieldLength (Int_t newLen)
 Set length of field reserved from printing name of RooAbsArgs in multi-line collection printing to given amount. More...
 

Static Protected Attributes

static Int_t _nameLength
 

#include <RooPrintable.h>

Inheritance diagram for RooPrintable:
[legend]

Member Enumeration Documentation

◆ ContentsOption

Enumerator
kName 
kClassName 
kValue 
kArgs 
kExtras 
kAddress 
kTitle 
kCollectionHeader 

Definition at line 33 of file RooPrintable.h.

◆ StyleOption

Enumerator
kInline 
kSingleLine 
kStandard 
kVerbose 
kTreeStructure 

Definition at line 34 of file RooPrintable.h.

Constructor & Destructor Documentation

◆ RooPrintable()

RooPrintable::RooPrintable ( )
inline

Definition at line 27 of file RooPrintable.h.

◆ ~RooPrintable()

virtual RooPrintable::~RooPrintable ( )
inlinevirtual

Definition at line 28 of file RooPrintable.h.

Member Function Documentation

◆ defaultPrintContents()

Int_t RooPrintable::defaultPrintContents ( Option_t opt) const
virtual

Default choice of contents to be printed (name and value)

Reimplemented in RooAbsArg, RooAbsData, RooAbsCollection, RooPlot, RooRealVar, RooAbsDataStore, RooFitResult, RooAbsGenContext, and Roo1DTable.

Definition at line 233 of file RooPrintable.cxx.

◆ defaultPrintStream()

ostream & RooPrintable::defaultPrintStream ( std::ostream *  os = 0)
static

Return a reference to the current default stream to use in Print().

Use the optional parameter to specify a new default stream (a reference to the old one is still returned). This method allows subclasses to provide an inline implementation of Print() without pulling in iostream.h.

Definition at line 272 of file RooPrintable.cxx.

◆ defaultPrintStyle()

RooPrintable::StyleOption RooPrintable::defaultPrintStyle ( Option_t opt) const
virtual

Reimplemented in RooFitResult, RooNumIntConfig, RooAbsGenContext, and RooNumGenConfig.

Definition at line 241 of file RooPrintable.cxx.

◆ nameFieldLength()

void RooPrintable::nameFieldLength ( Int_t  newLen)
static

Set length of field reserved from printing name of RooAbsArgs in multi-line collection printing to given amount.

Definition at line 63 of file RooPrintable.cxx.

◆ printAddress()

void RooPrintable::printAddress ( std::ostream &  os) const
virtual

Print class name of object.

Reimplemented in RooAbsArg.

Definition at line 223 of file RooPrintable.cxx.

◆ printArgs()

void RooPrintable::printArgs ( std::ostream &  os) const
virtual

◆ printClassName()

void RooPrintable::printClassName ( std::ostream &  os) const
virtual

◆ printExtras()

void RooPrintable::printExtras ( std::ostream &  os) const
virtual

Interface to print extras of object.

Reimplemented in RooRealVar.

Definition at line 163 of file RooPrintable.cxx.

◆ printMultiline()

void RooPrintable::printMultiline ( std::ostream &  os,
Int_t  contents,
Bool_t  verbose = kFALSE,
TString  indent = "" 
) const
virtual

◆ printName()

void RooPrintable::printName ( std::ostream &  os) const
virtual

◆ printStream()

void RooPrintable::printStream ( std::ostream &  os,
Int_t  contents,
StyleOption  style,
TString  indent = "" 
) const
virtual

Print description of object on ostream, printing contents set by contents integer, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.

Each message is prefixed by string 'indent' when printed

Definition at line 75 of file RooPrintable.cxx.

◆ printTitle()

void RooPrintable::printTitle ( std::ostream &  os) const
virtual

◆ printTree()

void RooPrintable::printTree ( std::ostream &  os,
TString  indent = "" 
) const
virtual

Interface for tree structure printing of object.

Reimplemented in RooAbsArg.

Definition at line 179 of file RooPrintable.cxx.

◆ printValue()

void RooPrintable::printValue ( std::ostream &  os) const
virtual

Member Data Documentation

◆ _nameLength

Int_t RooPrintable::_nameLength
staticprotected

Definition at line 57 of file RooPrintable.h.


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