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