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 const char* getYAxisLabel() const { return _yAxisLabel.Data(); }
29 inline void setYAxisLabel(const char *label) { _yAxisLabel= label; }
30 inline void updateYAxisLimits(double y) {
31 if(y > _ymax) _ymax= y;
32 if(y < _ymin) _ymin= y;
33 }
34 inline void setYAxisLimits(double ymin, double ymax) {
35 _ymin = ymin ;
36 _ymax = ymax ;
37 }
38 inline double getYAxisMin() const { return _ymin; }
39 inline double getYAxisMax() const { return _ymax; }
40
41 // the normalization value refers to the full "fit range" instead of
42 // the "plot range"
43 virtual double getFitRangeNEvt() const = 0;
44 virtual double getFitRangeNEvt(double xlo, double xhi) const = 0;
45 virtual double getFitRangeBinW() const = 0;
46
47 void printMultiline(std::ostream& os, Int_t contents, bool verbose=false, TString indent= "") const override;
48
50protected:
52 double _ymin = 0.0;
53 double _ymax = 0.0;
54 double _normValue = 0.0;
55 ClassDefOverride(RooPlotable,1) // Abstract interface for plotable objects in a RooPlot
56};
57
58#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
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:24
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:53
virtual double getFitRangeNEvt() const =0
double _normValue
Definition RooPlotable.h:54
void updateYAxisLimits(double y)
Definition RooPlotable.h:30
TObject * crossCast()
Return cast of RooPlotable as TObject.
double getYAxisMin() const
Definition RooPlotable.h:38
void setYAxisLimits(double ymin, double ymax)
Definition RooPlotable.h:34
virtual double getFitRangeNEvt(double xlo, double xhi) const =0
double getYAxisMax() const
Definition RooPlotable.h:39
void setYAxisLabel(const char *label)
Definition RooPlotable.h:29
const char * getYAxisLabel() const
Definition RooPlotable.h:28
virtual double getFitRangeBinW() const =0
double _ymin
Definition RooPlotable.h:52
TString _yAxisLabel
Definition RooPlotable.h:51
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:376
Double_t y[n]
Definition legend1.C:17