RooPlotable.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooPlotable.h,v 1.14 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_PLOTABLE
00017 #define ROO_PLOTABLE
00018 
00019 #include "Rtypes.h"
00020 #include "TString.h"
00021 #include "RooPrintable.h"
00022 
00023 class TObject;
00024 class RooArgSet;
00025 
00026 class RooPlotable : public RooPrintable {
00027 public:
00028   inline RooPlotable() : _ymin(0), _ymax(0), _normValue(0) { }
00029   inline virtual ~RooPlotable() { }
00030 
00031   inline const char* getYAxisLabel() const { return _yAxisLabel.Data(); }
00032   inline void setYAxisLabel(const char *label) { _yAxisLabel= label; }
00033   inline void updateYAxisLimits(Double_t y) {
00034     if(y > _ymax) _ymax= y;
00035     if(y < _ymin) _ymin= y;
00036   }
00037   inline void setYAxisLimits(Double_t ymin, Double_t ymax) { 
00038     _ymin = ymin ;
00039     _ymax = ymax ;
00040   }
00041   inline Double_t getYAxisMin() const { return _ymin; }
00042   inline Double_t getYAxisMax() const { return _ymax; }
00043 
00044   // the normalization value refers to the full "fit range" instead of
00045   // the "plot range"
00046   virtual Double_t getFitRangeNEvt() const = 0;
00047   virtual Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const = 0;
00048   virtual Double_t getFitRangeBinW() const = 0;
00049 
00050   virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent= "") const;
00051 
00052   TObject *crossCast();
00053 protected:
00054   TString _yAxisLabel;
00055   Double_t _ymin, _ymax, _normValue;
00056   ClassDef(RooPlotable,1) // Abstract interface for plotable objects in a RooPlot
00057 };
00058 
00059 #endif

Generated on Tue Jul 5 14:26:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1