Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooDouble.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: RooDouble.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_DOUBLE
0017 #define ROO_DOUBLE
0018 
0019 #include "Rtypes.h"
0020 #include "TNamed.h"
0021 
0022 class RooDouble : public TNamed {
0023 public:
0024 
0025   /// Default constructor
0026   RooDouble() : _value(0) {
0027   } ;
0028   RooDouble(double value) ;
0029   RooDouble(const RooDouble& other) : TNamed(other), _value(other._value) {}
0030 
0031   // double cast operator
0032   /// Return value of contained double
0033   inline operator double() const {
0034     return _value ;
0035   }
0036   /// Return true if contained double equals value
0037   RooDouble& operator=(double value) {
0038     _value = value ; return *this ;
0039   }
0040 
0041   // Sorting interface ;
0042   Int_t Compare(const TObject* other) const override ;
0043   /// We are a sortable object
0044   bool IsSortable() const override {
0045     return true ;
0046   }
0047 
0048 protected:
0049 
0050   double _value ; ///< Value payload
0051   ClassDefOverride(RooDouble,1) // Container class for double
0052 };
0053 
0054 #endif