Logo ROOT   6.12/07
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 
23 class TObject;
24 class RooArgSet;
25 
26 class RooPlotable : public RooPrintable {
27 public:
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; }
33  inline void updateYAxisLimits(Double_t y) {
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 
52  TObject *crossCast();
53 protected:
56  ClassDef(RooPlotable,1) // Abstract interface for plotable objects in a RooPlot
57 };
58 
59 #endif
virtual Double_t getFitRangeBinW() const =0
float ymin
Definition: THbookFile.cxx:93
Double_t _ymax
Definition: RooPlotable.h:55
Class RooPotable is a base class for objects that can be inserted into RooPlots and take advantage of...
Definition: RooPlotable.h:26
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print detailed information.
Definition: RooPlotable.cxx:43
Basic string class.
Definition: TString.h:125
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual ~RooPlotable()
Definition: RooPlotable.h:29
TObject * crossCast()
Return cast of RooPlotable as TObject.
Definition: RooPlotable.cxx:55
#define ClassDef(name, id)
Definition: Rtypes.h:320
RooPlotable is a &#39;mix-in&#39; base class that define the standard RooFit plotting and printing methods...
Definition: RooPrintable.h:25
virtual Double_t getFitRangeNEvt() const =0
Double_t getYAxisMax() const
Definition: RooPlotable.h:42
Double_t _ymin
Definition: RooPlotable.h:55
Double_t _normValue
Definition: RooPlotable.h:55
void setYAxisLimits(Double_t ymin, Double_t ymax)
Definition: RooPlotable.h:37
float ymax
Definition: THbookFile.cxx:93
void updateYAxisLimits(Double_t y)
Definition: RooPlotable.h:33
const char * getYAxisLabel() const
Definition: RooPlotable.h:31
const Bool_t kFALSE
Definition: RtypesCore.h:88
Double_t getYAxisMin() const
Definition: RooPlotable.h:41
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
Mother of all ROOT objects.
Definition: TObject.h:37
void setYAxisLabel(const char *label)
Definition: RooPlotable.h:32
TString _yAxisLabel
Definition: RooPlotable.h:54
const char * Data() const
Definition: TString.h:345