Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooConstVar.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 RooConstVar.cxx
19\class RooConstVar
20\ingroup Roofitcore
21
22Represents a constant real-valued object.
23**/
24
25#include "RooConstVar.h"
26#include "RooNumber.h"
27
28
29
30////////////////////////////////////////////////////////////////////////////////
31/// Constructor with value
32RooConstVar::RooConstVar(const char *name, const char *title, double value) :
33 RooAbsReal(name,title)
34{
35 _fast = true;
36 _value = value;
37 setAttribute("Constant",true) ;
38}
39
40
41
42////////////////////////////////////////////////////////////////////////////////
43/// Copy constructor
46{
47 _fast = true;
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Write object contents to stream
52
53void RooConstVar::writeToStream(std::ostream& os, bool /*compact*/) const
54{
55 os << _value ;
56}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
char name[80]
Definition TGX11.cxx:110
bool _fast
Definition RooAbsArg.h:656
void setAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
double _value
Cache for current value of object.
Definition RooAbsReal.h:535
Represents a constant real-valued object.
Definition RooConstVar.h:23
void writeToStream(std::ostream &os, bool compact) const override
Write object contents to stream.