Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooPlotable.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
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
17/**
18\file RooPlotable.cxx
19\class RooPlotable
20\ingroup Roofitcore
21
22Class RooPotable is a base class for objects that can be inserted into RooPlots and take
23advantage of its internal normalization and axis range adjustment features. The
24most useful implementation of RooPlotable are RooHist and RooCurve.
25**/
26
27#include "RooPlotable.h"
28#include "TObject.h"
29#include "Riostream.h"
30
31using std::endl, std::ostream;
32
34
35
36////////////////////////////////////////////////////////////////////////////////
37/// Print detailed information
38
39void RooPlotable::printMultiline(ostream& os, Int_t /*content*/, bool /*verbose*/, TString indent) const {
40 os << indent << "--- RooPlotable ---" << endl;
41 os << indent << " y-axis min = " << getYAxisMin() << endl
42 << indent << " y-axis max = " << getYAxisMax() << endl
43 << indent << " y-axis label \"" << getYAxisLabel() << "\"" << endl;
44}
45
46
47////////////////////////////////////////////////////////////////////////////////
48/// Return cast of RooPlotable as TObject. Note that is this a cross
49/// cast that will change the pointer value in most cases
50
52 return dynamic_cast<TObject*>(this);
53}
#define ClassImp(name)
Definition Rtypes.h:377
static void indent(ostringstream &buf, int indent_level)
Class RooPotable is a base class for objects that can be inserted into RooPlots and take advantage of...
Definition RooPlotable.h:26
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Print detailed information.
TObject * crossCast()
Return cast of RooPlotable as TObject.
double getYAxisMin() const
Definition RooPlotable.h:38
double getYAxisMax() const
Definition RooPlotable.h:39
const char * getYAxisLabel() const
Definition RooPlotable.h:28
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139