Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
35
36////////////////////////////////////////////////////////////////////////////////
37/// Default constructor
38
46
47
48////////////////////////////////////////////////////////////////////////////////
49/// Construct binning with range [xmin,xmax] with no binning substructure
50
51RooRangeBinning::RooRangeBinning(double xmin, double xmax, const char* name) :
53{
54 _range[0] = xmin ;
55 _range[1] = xmax ;
56}
57
58
59
60////////////////////////////////////////////////////////////////////////////////
61/// Copy constructor
62
65{
66 _range[0] = other._range[0] ;
67 _range[1] = other._range[1] ;
68}
69
70////////////////////////////////////////////////////////////////////////////////
71/// Change limits of the binning to [xlo,xhi]
72
73void RooRangeBinning::setRange(double xlo, double xhi)
74{
75 if (xlo>xhi) {
76 oocoutE(nullptr,InputArguments) << "RooRangeBinning::setRange: ERROR low bound > high bound" << std::endl ;
77 return ;
78 }
79
80 _range[0] = xlo ;
81 _range[1] = xhi ;
82}
#define oocoutE(o, a)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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].