ROOT
6.06/08
Reference Guide
roofit
roofitcore
src
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
//
19
// BEGIN_HTML
20
// RooRangeBinning is binning/range definition that only defines a range
21
// but no binning. It it used to store named ranges created by
22
// the RooRealVar::setRange() method
23
// END_HTML
24
//
25
26
#include "
RooFit.h
"
27
28
#include "
RooNumber.h
"
29
#include "
RooNumber.h
"
30
#include "
RooMsgService.h
"
31
#include "
Riostream.h
"
32
#include "
RooMsgService.h
"
33
34
#include "
RooRangeBinning.h
"
35
36
using namespace
std
;
37
38
ClassImp
(
RooRangeBinning
)
39
;
40
41
42
43
////////////////////////////////////////////////////////////////////////////////
44
/// Default constructor
45
46
RooRangeBinning::RooRangeBinning
(
const
char
*
name
) :
47
RooAbsBinning
(name)
48
{
49
_range
[0] = -
RooNumber::infinity
() ;
50
_range
[1] = +
RooNumber::infinity
() ;
51
52
}
53
54
55
////////////////////////////////////////////////////////////////////////////////
56
/// Construct binning with range [xmin,xmax] with no binning substructure
57
58
RooRangeBinning::RooRangeBinning
(
Double_t
xmin
,
Double_t
xmax
,
const
char
*
name
) :
59
RooAbsBinning
(name)
60
{
61
_range
[0] =
xmin
;
62
_range
[1] =
xmax
;
63
}
64
65
66
67
////////////////////////////////////////////////////////////////////////////////
68
/// Copy constructor
69
70
RooRangeBinning::RooRangeBinning
(
const
RooRangeBinning
& other,
const
char
*
name
) :
71
RooAbsBinning
(name)
72
{
73
_range
[0] = other.
_range
[0] ;
74
_range
[1] = other.
_range
[1] ;
75
}
76
77
78
79
////////////////////////////////////////////////////////////////////////////////
80
/// Destructor
81
82
RooRangeBinning::~RooRangeBinning
()
83
{
84
}
85
86
87
88
////////////////////////////////////////////////////////////////////////////////
89
/// Change limits of the binning to [xlo,xhi]
90
91
void
RooRangeBinning::setRange
(
Double_t
xlo,
Double_t
xhi)
92
{
93
if
(xlo>xhi) {
94
oocoutE
((
TObject
*)0,
InputArguments
) <<
"RooRangeBinning::setRange: ERROR low bound > high bound"
<< endl ;
95
return
;
96
}
97
98
_range
[0] = xlo ;
99
_range
[1] = xhi ;
100
}
xmin
float xmin
Definition:
THbookFile.cxx:93
RooNumber.h
RooMsgService.h
std
STL namespace.
RooRangeBinning::_range
Double_t _range[2]
Definition:
RooRangeBinning.h:49
oocoutE
#define oocoutE(o, a)
Definition:
RooMsgService.h:48
RooRangeBinning::setRange
virtual void setRange(Double_t xlo, Double_t xhi)
Change limits of the binning to [xlo,xhi].
Definition:
RooRangeBinning.cxx:91
RooNumber::infinity
static Double_t infinity()
Return internal infinity representation.
Definition:
RooNumber.cxx:48
RooRangeBinning.h
xmax
float xmax
Definition:
THbookFile.cxx:93
Riostream.h
RooAbsBinning
Definition:
RooAbsBinning.h:26
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:279
Double_t
double Double_t
Definition:
RtypesCore.h:55
RooRangeBinning
Definition:
RooRangeBinning.h:21
name
#define name(a, b)
Definition:
linkTestLib0.cpp:5
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
RooRangeBinning::RooRangeBinning
RooRangeBinning(const char *name=0)
Default constructor.
Definition:
RooRangeBinning.cxx:46
RooRangeBinning::~RooRangeBinning
virtual ~RooRangeBinning()
Destructor.
Definition:
RooRangeBinning.cxx:82
RooFit::InputArguments
Definition:
RooGlobalFunc.h:58
RooFit.h
return
return
Definition:
HLFactory.cxx:514