Loading [MathJax]/jax/output/HTML-CSS/config.js
Logo ROOT  
Reference Guide
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
22RooConstVar represent a constant real-valued object
23**/
24
25
26#include "RooFit.h"
27
28#include "Riostream.h"
29#include "RooConstVar.h"
30
31using namespace std;
32
34 ;
35
36
37
38////////////////////////////////////////////////////////////////////////////////
39/// Constructor with value
40///_fast = kTRUE ;
41
42RooConstVar::RooConstVar(const char *name, const char *title, Double_t value) :
43 RooAbsReal(name,title), _value(value)
44{
45 setAttribute("Constant",kTRUE) ;
46}
47
48
49
50////////////////////////////////////////////////////////////////////////////////
51/// Copy constructor
52///_fast = kTRUE ;
53
54RooConstVar::RooConstVar(const RooConstVar& other, const char* name) :
55 RooAbsReal(other, name), _value(other._value)
56{
57}
58
59
60
61////////////////////////////////////////////////////////////////////////////////
62/// Destructor
63
65{
66}
67
68
69////////////////////////////////////////////////////////////////////////////////
70/// Write object contents to stream
71
72void RooConstVar::writeToStream(ostream& os, Bool_t /*compact*/) const
73{
74 os << _value ;
75}
76
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:365
char name[80]
Definition: TGX11.cxx:109
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Definition: RooAbsArg.cxx:261
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:59
RooConstVar represent a constant real-valued object.
Definition: RooConstVar.h:25
void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream.
Definition: RooConstVar.cxx:72
Double_t _value
Definition: RooConstVar.h:53
virtual ~RooConstVar()
Destructor.
Definition: RooConstVar.cxx:64