Logo ROOT   6.16/01
Reference Guide
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 virtual ~RooPlotable() { }
30
31 inline const char* getYAxisLabel() const { return _yAxisLabel.Data(); }
32 inline void setYAxisLabel(const char *label) { _yAxisLabel= label; }
34 if(y > _ymax) _ymax= y;
35 if(y < _ymin) _ymin= y;
36 }
38 _ymin = ymin ;
39 _ymax = ymax ;
40 }
41 inline Double_t getYAxisMin() const { return _ymin; }
42 inline Double_t getYAxisMax() const { return _ymax; }
43
44 // the normalization value refers to the full "fit range" instead of
45 // the "plot range"
46 virtual Double_t getFitRangeNEvt() const = 0;
47 virtual Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const = 0;
48 virtual Double_t getFitRangeBinW() const = 0;
49
50 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent= "") const;
51
53protected:
56 ClassDef(RooPlotable,1) // Abstract interface for plotable objects in a RooPlot
57};
58
59#endif
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:324
float ymin
Definition: THbookFile.cxx:93
float ymax
Definition: THbookFile.cxx:93
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
Class RooPotable is a base class for objects that can be inserted into RooPlots and take advantage of...
Definition: RooPlotable.h:26
Double_t getYAxisMin() const
Definition: RooPlotable.h:41
void updateYAxisLimits(Double_t y)
Definition: RooPlotable.h:33
virtual ~RooPlotable()
Definition: RooPlotable.h:29
virtual Double_t getFitRangeNEvt() const =0
Double_t _ymin
Definition: RooPlotable.h:55
Double_t getYAxisMax() const
Definition: RooPlotable.h:42
virtual Double_t getFitRangeBinW() const =0
Double_t _normValue
Definition: RooPlotable.h:55
TObject * crossCast()
Return cast of RooPlotable as TObject.
Definition: RooPlotable.cxx:55
virtual Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const =0
void setYAxisLimits(Double_t ymin, Double_t ymax)
Definition: RooPlotable.h:37
Double_t _ymax
Definition: RooPlotable.h:55
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print detailed information.
Definition: RooPlotable.cxx:43
void setYAxisLabel(const char *label)
Definition: RooPlotable.h:32
const char * getYAxisLabel() const
Definition: RooPlotable.h:31
TString _yAxisLabel
Definition: RooPlotable.h:54
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
Definition: RooPrintable.h:25
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
Double_t y[n]
Definition: legend1.C:17