Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooStringVar.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooStringVar.h,v 1.23 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_STRING_VAR
17 #define ROO_STRING_VAR
18 
19 #include "TString.h"
20 #include "RooAbsString.h"
21 class RooArgSet ;
22 
23 class RooStringVar : public RooAbsString {
24 public:
25  // Constructors, assignment etc.
26  inline RooStringVar() { }
27  RooStringVar(const char *name, const char *title, const char* value, Int_t size=1024) ;
28  RooStringVar(const RooStringVar& other, const char* name=0);
29  virtual TObject* clone(const char* newname) const { return new RooStringVar(*this,newname); }
30  virtual ~RooStringVar();
31 
32  // Parameter value and error accessors
33  virtual operator TString() ;
34  virtual const char* getVal() const { return _value ; } // overrides RooAbsReal::getVal()
35  virtual void setVal(const char* newVal) ;
36  virtual RooAbsArg& operator=(const char* newValue);
37 
38  // We implement a fundamental type of AbsArg that can be stored in a dataset
39  inline virtual Bool_t isFundamental() const { return kTRUE; }
40 
41  // I/O streaming interface (machine readable)
42  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
43  virtual void writeToStream(std::ostream& os, Bool_t compact) const ;
44 
45 protected:
46 
47  ClassDef(RooStringVar,1) // String-valued variable
48 };
49 
50 #endif