Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooPrintable.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooPrintable.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_PRINTABLE
17#define ROO_PRINTABLE
18
19
20class TNamed ;
21
22#include "Rtypes.h"
23#include "TString.h"
24
26public:
27 inline RooPrintable() { }
28 inline virtual ~RooPrintable() { }
29
30 // New-style printing
31
32 // Master print function
33 enum ContentsOption { kName=1, kClassName=2, kValue=4, kArgs=8, kExtras=16, kAddress=32, kTitle=64, kCollectionHeader=128} ; // Can be ORed
34 enum StyleOption { kInline=1, kSingleLine=2, kStandard=3, kVerbose=4, kTreeStructure=5 } ; // Exclusive
35 virtual void printStream(std::ostream& os, Int_t contents, StyleOption style, TString indent="") const ;
36
37 // Virtual hook function for class-specific content implementation
38 virtual void printAddress(std::ostream& os) const ;
39 virtual void printName(std::ostream& os) const ;
40 virtual void printTitle(std::ostream& os) const ;
41 virtual void printClassName(std::ostream& os) const ;
42 virtual void printValue(std::ostream& os) const ;
43 virtual void printArgs(std::ostream& os) const ;
44 virtual void printExtras(std::ostream& os) const ;
45 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
46 virtual void printTree(std::ostream& os, TString indent="") const ;
47
48 static std::ostream& defaultPrintStream(std::ostream *os= 0);
49 virtual Int_t defaultPrintContents(Option_t* opt) const ;
50 virtual StyleOption defaultPrintStyle(Option_t* opt) const ;
51
52 // Formatting control
53 static void nameFieldLength(Int_t newLen) ;
54
55protected:
56
58
59 ClassDef(RooPrintable,1) // Interface for printable objects
60
61
62};
63
64namespace RooFit {
65std::ostream& operator<<(std::ostream& os, const RooPrintable& rp) ;
66}
67
68#ifndef __CINT__
69using RooFit::operator<< ;
70#endif
71
72#endif
const Bool_t kFALSE
Definition RtypesCore.h:92
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
Definition TBuffer.h:399
static void indent(ostringstream &buf, int indent_level)
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
virtual void printTree(std::ostream &os, TString indent="") const
Interface for tree structure printing of object.
virtual void printName(std::ostream &os) const
Print name of object.
static Int_t _nameLength
virtual void printArgs(std::ostream &os) const
Interface for printing of object arguments.
static void nameFieldLength(Int_t newLen)
Set length of field reserved from printing name of RooAbsArgs in multi-line collection printing to gi...
virtual void printExtras(std::ostream &os) const
Interface to print extras of object.
virtual StyleOption defaultPrintStyle(Option_t *opt) const
virtual Int_t defaultPrintContents(Option_t *opt) const
Default choice of contents to be printed (name and value)
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
virtual void printClassName(std::ostream &os) const
Print class name of object.
virtual void printTitle(std::ostream &os) const
Print title of object.
virtual void printAddress(std::ostream &os) const
Print class name of object.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
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,...
virtual void printValue(std::ostream &os) const
Interface to print value of object.
virtual ~RooPrintable()
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Basic string class.
Definition TString.h:136
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
TCanvas * style()
Definition style.C:1