Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooRangeBinning.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
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
17/**
18\file RooRangeBinning.cxx
19\class RooRangeBinning
20\ingroup Roofitcore
21
22Binning/range definition that only defines a range
23but no binning. It it used to store named ranges created by
24the RooRealVar::setRange() method.
25**/
26
27#include "RooNumber.h"
28#include "RooMsgService.h"
29#include "Riostream.h"
30
31#include "RooRangeBinning.h"
32
33using std::endl;
34
36
37////////////////////////////////////////////////////////////////////////////////
38/// Default constructor
39
42{
45
46}
47
48
49////////////////////////////////////////////////////////////////////////////////
50/// Construct binning with range [xmin,xmax] with no binning substructure
51
52RooRangeBinning::RooRangeBinning(double xmin, double xmax, const char* name) :
54{
55 _range[0] = xmin ;
56 _range[1] = xmax ;
57}
58
59
60
61////////////////////////////////////////////////////////////////////////////////
62/// Copy constructor
63
66{
67 _range[0] = other._range[0] ;
68 _range[1] = other._range[1] ;
69}
70
71////////////////////////////////////////////////////////////////////////////////
72/// Change limits of the binning to [xlo,xhi]
73
74void RooRangeBinning::setRange(double xlo, double xhi)
75{
76 if (xlo>xhi) {
77 oocoutE(nullptr,InputArguments) << "RooRangeBinning::setRange: ERROR low bound > high bound" << endl ;
78 return ;
79 }
80
81 _range[0] = xlo ;
82 _range[1] = xhi ;
83}
#define oocoutE(o, a)
#define ClassImp(name)
Definition Rtypes.h:377
char name[80]
Definition TGX11.cxx:110
float xmin
float xmax
Abstract base class for RooRealVar binning definitions.
static constexpr double infinity()
Return internal infinity representation.
Definition RooNumber.h:25
Binning/range definition that only defines a range but no binning.
RooRangeBinning(const char *name=nullptr)
Default constructor.
void setRange(double xlo, double xhi) override
Change limits of the binning to [xlo,xhi].