Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooPlotable.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooPlotable.h,v 1.14 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_PLOTABLE
17#define ROO_PLOTABLE
18
19#include "Rtypes.h"
20#include "TString.h"
21#include "RooPrintable.h"
22
23class TObject;
24class RooArgSet;
25
26class RooPlotable : public RooPrintable {
27public:
28 inline RooPlotable() : _ymin(0), _ymax(0), _normValue(0) { }
29 inline ~RooPlotable() override { }
30
31 inline const char* getYAxisLabel() const { return _yAxisLabel.Data(); }
32 inline void setYAxisLabel(const char *label) { _yAxisLabel= label; }
33 inline void updateYAxisLimits(double y) {
34 if(y > _ymax) _ymax= y;
35 if(y < _ymin) _ymin= y;
36 }
37 inline void setYAxisLimits(double ymin, double ymax) {
38 _ymin = ymin ;
39 _ymax = ymax ;
40 }
41 inline double getYAxisMin() const { return _ymin; }
42 inline double getYAxisMax() const { return _ymax; }
43
44 // the normalization value refers to the full "fit range" instead of
45 // the "plot range"
46 virtual double getFitRangeNEvt() const = 0;
47 virtual double getFitRangeNEvt(double xlo, double xhi) const = 0;
48 virtual double getFitRangeBinW() const = 0;
49
50 void printMultiline(std::ostream& os, Int_t contents, bool verbose=false, TString indent= "") const override;
51
53protected:
56 ClassDefOverride(RooPlotable,1) // Abstract interface for plotable objects in a RooPlot
57};
58
59#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
static void indent(ostringstream &buf, int indent_level)
float ymin
float ymax
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
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.
double _ymax
Definition RooPlotable.h:55
virtual double getFitRangeNEvt() const =0
double _normValue
Definition RooPlotable.h:55
void updateYAxisLimits(double y)
Definition RooPlotable.h:33
TObject * crossCast()
Return cast of RooPlotable as TObject.
double getYAxisMin() const
Definition RooPlotable.h:41
void setYAxisLimits(double ymin, double ymax)
Definition RooPlotable.h:37
virtual double getFitRangeNEvt(double xlo, double xhi) const =0
~RooPlotable() override
Definition RooPlotable.h:29
double getYAxisMax() const
Definition RooPlotable.h:42
void setYAxisLabel(const char *label)
Definition RooPlotable.h:32
const char * getYAxisLabel() const
Definition RooPlotable.h:31
virtual double getFitRangeBinW() const =0
double _ymin
Definition RooPlotable.h:55
TString _yAxisLabel
Definition RooPlotable.h:54
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380
Double_t y[n]
Definition legend1.C:17