ROOT
master
Reference Guide
RooDouble.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitCore *
4
* File: $Id: RooDouble.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
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
#ifndef ROO_DOUBLE
17
#define ROO_DOUBLE
18
19
#include "
Rtypes.h
"
20
#include "
TNamed.h
"
21
22
class
RooDouble
:
public
TNamed
{
23
public
:
24
25
RooDouble
() :
_value
(0) {
26
// Default constructor
27
} ;
28
RooDouble
(
Double_t
value) ;
29
RooDouble
(
const
RooDouble
& other) :
TNamed
(other),
_value
(other.
_value
) {}
30
virtual
~RooDouble
() {
31
// Destructor
32
} ;
33
34
// Double_t cast operator
35
inline
operator
Double_t
()
const
{
36
// Return value of contained double
37
return
_value
;
38
}
39
RooDouble
&
operator=
(
Double_t
value) {
40
// Return true if contained double equals value
41
_value
= value ;
return
*this ;
42
}
43
44
// Sorting interface ;
45
Int_t
Compare
(
const
TObject
* other)
const
;
46
virtual
Bool_t
IsSortable
()
const
{
47
// We are a sortable object
48
return
kTRUE
;
49
}
50
51
protected
:
52
53
Double_t
_value
;
// Value payload
54
ClassDef
(
RooDouble
,1)
// Container class for Double_t
55
};
56
57
#endif
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:91
TNamed.h
Int_t
int Int_t
Definition:
RtypesCore.h:45
RooDouble::_value
Double_t _value
Definition:
RooDouble.h:53
bool
RooDouble
RooDouble is a minimal implementation of a TObject holding a Double_t value.
Definition:
RooDouble.h:22
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition:
TNamed.h:29
RooDouble::RooDouble
RooDouble(const RooDouble &other)
Definition:
RooDouble.h:29
Double_t
double Double_t
Definition:
RtypesCore.h:59
RooDouble::operator=
RooDouble & operator=(Double_t value)
Definition:
RooDouble.h:39
RooDouble::RooDouble
RooDouble()
Definition:
RooDouble.h:25
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:325
RooDouble::Compare
Int_t Compare(const TObject *other) const
Implement comparison to other TObjects that are also RooDouble to faciliate sorting of RooDoubles in ...
Definition:
RooDouble.cxx:49
RooDouble::~RooDouble
virtual ~RooDouble()
Definition:
RooDouble.h:30
RooDouble::IsSortable
virtual Bool_t IsSortable() const
Definition:
RooDouble.h:46
Rtypes.h
roofit
roofitcore
inc
RooDouble.h
ROOT master - Reference Guide Generated on Wed Jan 27 2021 11:59:14 (GVA Time) using Doxygen 1.9.0