ROOT  6.06/09
Reference Guide
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
39 ;
40 
41 
42 
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Default constructor
45 
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 
59  RooAbsBinning(name)
60 {
61  _range[0] = xmin ;
62  _range[1] = xmax ;
63 }
64 
65 
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// Copy constructor
69 
71  RooAbsBinning(name)
72 {
73  _range[0] = other._range[0] ;
74  _range[1] = other._range[1] ;
75 }
76 
77 
78 
79 ////////////////////////////////////////////////////////////////////////////////
80 /// Destructor
81 
83 {
84 }
85 
86 
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Change limits of the binning to [xlo,xhi]
90 
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 }
float xmin
Definition: THbookFile.cxx:93
ClassImp(RooRangeBinning)
STL namespace.
Double_t _range[2]
#define oocoutE(o, a)
Definition: RooMsgService.h:48
virtual void setRange(Double_t xlo, Double_t xhi)
Change limits of the binning to [xlo,xhi].
return
Definition: TBase64.cxx:62
static Double_t infinity()
Return internal infinity representation.
Definition: RooNumber.cxx:48
float xmax
Definition: THbookFile.cxx:93
double Double_t
Definition: RtypesCore.h:55
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
RooRangeBinning(const char *name=0)
Default constructor.
virtual ~RooRangeBinning()
Destructor.