Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
22class RooDouble : public TNamed {
23public:
24
25 /// Default constructor
27 } ;
28 RooDouble(double value) ;
29 RooDouble(const RooDouble& other) : TNamed(other), _value(other._value) {}
30
31 // double cast operator
32 /// Return value of contained double
33 inline operator double() const {
34 return _value ;
35 }
36 /// Return true if contained double equals value
38 _value = value ; return *this ;
39 }
40
41 // Sorting interface ;
42 Int_t Compare(const TObject* other) const override ;
43 /// We are a sortable object
44 bool IsSortable() const override {
45 return true ;
46 }
47
48protected:
49
50 double _value ; ///< Value payload
51 ClassDefOverride(RooDouble,1) // Container class for double
52};
53
54#endif
int Int_t
Definition RtypesCore.h:45
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Minimal implementation of a TObject holding a double value.
Definition RooDouble.h:22
RooDouble & operator=(double value)
Return true if contained double equals value.
Definition RooDouble.h:37
bool IsSortable() const override
We are a sortable object.
Definition RooDouble.h:44
RooDouble()
Default constructor.
Definition RooDouble.h:26
double _value
Value payload.
Definition RooDouble.h:50
Int_t Compare(const TObject *other) const override
Implement comparison to other TObjects that are also RooDouble to facilitate sorting of RooDoubles in...
Definition RooDouble.cxx:43
RooDouble(const RooDouble &other)
Definition RooDouble.h:29
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41