RooConstVar.cxx

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  * @(#)root/roofitcore:$Id: RooConstVar.cxx 24269 2008-06-13 15:37:03Z wouter $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 
00017 //////////////////////////////////////////////////////////////////////////////
00018 // 
00019 // BEGIN_HTML
00020 // RooConstVar represent a constant real-valued object
00021 // END_HTML
00022 //
00023 
00024 
00025 #include "RooFit.h"
00026 
00027 #include "Riostream.h"
00028 #include "RooConstVar.h"
00029 
00030 ClassImp(RooConstVar)
00031   ;
00032 
00033 
00034 
00035 //_____________________________________________________________________________
00036 RooConstVar::RooConstVar(const char *name, const char *title, Double_t value) : 
00037   RooAbsReal(name,title), _value(value)
00038 {  
00039   // Constructor with value
00040 
00041   setAttribute("Constant",kTRUE) ;
00042 }
00043 
00044 
00045 
00046 //_____________________________________________________________________________
00047 RooConstVar::RooConstVar(const RooConstVar& other, const char* name) : 
00048   RooAbsReal(other, name), _value(other._value)
00049 {
00050 
00051   // Copy constructor
00052 }
00053 
00054 
00055 
00056 //_____________________________________________________________________________
00057 RooConstVar::~RooConstVar() 
00058 {
00059   // Destructor
00060 }
00061 
00062 
00063 
00064 //_____________________________________________________________________________
00065 Double_t RooConstVar::getVal(const RooArgSet*) const 
00066 { 
00067   // Return value
00068   return _value ; 
00069 }
00070 
00071 
00072 
00073 //_____________________________________________________________________________
00074 void RooConstVar::writeToStream(ostream& os, Bool_t /*compact*/) const
00075 {
00076   // Write object contents to stream
00077   os << _value ;
00078 }
00079 

Generated on Tue Jul 5 15:06:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1