RooRangeBinning.cxx

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  * @(#)root/roofitcore:$Id: RooRangeBinning.cxx 24285 2008-06-16 15:05:15Z wouter $
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 
00017 //////////////////////////////////////////////////////////////////////////////
00018 //
00019 // BEGIN_HTML
00020 // RooRangeBinning is binning/range definition that only defines a range
00021 // but no binning. It it used to store named ranges created by
00022 // the RooRealVar::setRange() method
00023 // END_HTML
00024 //
00025 
00026 #include "RooFit.h"
00027 
00028 #include "RooNumber.h"
00029 #include "RooNumber.h"
00030 #include "RooMsgService.h"
00031 #include "Riostream.h"
00032 #include "RooMsgService.h"
00033 
00034 #include "RooRangeBinning.h"
00035 
00036 ClassImp(RooRangeBinning) 
00037 ;
00038 
00039 
00040 
00041 //_____________________________________________________________________________
00042 RooRangeBinning::RooRangeBinning(const char* name) :
00043   RooAbsBinning(name)
00044 {
00045   // Default constructor
00046   _range[0] = -RooNumber::infinity() ;
00047   _range[1] = +RooNumber::infinity() ;
00048 
00049 }
00050 
00051 
00052 //_____________________________________________________________________________
00053 RooRangeBinning::RooRangeBinning(Double_t xmin, Double_t xmax, const char* name) :
00054   RooAbsBinning(name)
00055 {
00056   // Construct binning with range [xmin,xmax] with no binning substructure
00057   _range[0] = xmin ;
00058   _range[1] = xmax ;
00059 }
00060 
00061 
00062 
00063 //_____________________________________________________________________________
00064 RooRangeBinning::RooRangeBinning(const RooRangeBinning& other, const char* name) :
00065   RooAbsBinning(name)
00066 {
00067   // Copy constructor
00068 
00069   _range[0] = other._range[0] ;
00070   _range[1] = other._range[1] ;
00071 }
00072 
00073 
00074 
00075 //_____________________________________________________________________________
00076 RooRangeBinning::~RooRangeBinning() 
00077 {
00078   // Destructor 
00079 }
00080 
00081 
00082 
00083 //_____________________________________________________________________________
00084 void RooRangeBinning::setRange(Double_t xlo, Double_t xhi) 
00085 {
00086   // Change limits of the binning to [xlo,xhi]
00087 
00088   if (xlo>xhi) {
00089     oocoutE((TObject*)0,InputArguments) << "RooRangeBinning::setRange: ERROR low bound > high bound" << endl ;
00090     return ;
00091   }
00092 
00093   _range[0] = xlo ;
00094   _range[1] = xhi ;
00095 }

Generated on Tue Jul 5 15:07:08 2011 for ROOT_528-00b_version by  doxygen 1.5.1