Logo ROOT   6.12/07
Reference Guide
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
virtual const char * getVal() const
Return value of object. Calculated if dirty, otherwise cached value is returned.
Definition: RooStringVar.h:34
virtual void setVal(const char *newVal)
Set value to given TString.
Basic string class.
Definition: TString.h:125
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t isFundamental() const
Definition: RooStringVar.h:39
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual RooAbsArg & operator=(const char *newValue)
Set value to given TString.
char * _value
Definition: RooAbsString.h:68
virtual TObject * clone(const char *newname) const
Definition: RooStringVar.h:29
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
virtual ~RooStringVar()
Destructor.
const Bool_t kFALSE
Definition: RtypesCore.h:88
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsString is the common abstract base class for objects that represent a string value...
Definition: RooAbsString.h:25
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
RooStringVar implements a string values RooAbsArg.
Definition: RooStringVar.h:23
const Bool_t kTRUE
Definition: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109