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
22RooRangeBinning is binning/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 namespace std;
34
36;
37
38
39
40////////////////////////////////////////////////////////////////////////////////
41/// Default constructor
42
45{
48
49}
50
51
52////////////////////////////////////////////////////////////////////////////////
53/// Construct binning with range [xmin,xmax] with no binning substructure
54
55RooRangeBinning::RooRangeBinning(double xmin, double xmax, const char* name) :
57{
58 _range[0] = xmin ;
59 _range[1] = xmax ;
60}
61
62
63
64////////////////////////////////////////////////////////////////////////////////
65/// Copy constructor
66
69{
70 _range[0] = other._range[0] ;
71 _range[1] = other._range[1] ;
72}
73
74
75
76////////////////////////////////////////////////////////////////////////////////
77/// Destructor
78
80{
81}
82
83
84
85////////////////////////////////////////////////////////////////////////////////
86/// Change limits of the binning to [xlo,xhi]
87
88void RooRangeBinning::setRange(double xlo, double xhi)
89{
90 if (xlo>xhi) {
91 oocoutE(nullptr,InputArguments) << "RooRangeBinning::setRange: ERROR low bound > high bound" << endl ;
92 return ;
93 }
94
95 _range[0] = xlo ;
96 _range[1] = xhi ;
97}
#define oocoutE(o, a)
#define ClassImp(name)
Definition Rtypes.h:377
char name[80]
Definition TGX11.cxx:110
float xmin
float xmax
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
static constexpr double infinity()
Return internal infinity representation.
Definition RooNumber.h:24
RooRangeBinning is binning/range definition that only defines a range but no binning.
~RooRangeBinning() override
Destructor.
RooRangeBinning(const char *name=nullptr)
Default constructor.
void setRange(double xlo, double xhi) override
Change limits of the binning to [xlo,xhi].