Logo ROOT   6.08/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 "Riosfwd.h"
20 #include "TString.h"
21 #include "RooAbsString.h"
22 class RooArgSet ;
23 
24 class RooStringVar : public RooAbsString {
25 public:
26  // Constructors, assignment etc.
27  inline RooStringVar() { }
28  RooStringVar(const char *name, const char *title, const char* value, Int_t size=1024) ;
29  RooStringVar(const RooStringVar& other, const char* name=0);
30  virtual TObject* clone(const char* newname) const { return new RooStringVar(*this,newname); }
31  virtual ~RooStringVar();
32 
33  // Parameter value and error accessors
34  virtual operator TString() ;
35  virtual const char* getVal() const { return _value ; } // overrides RooAbsReal::getVal()
36  virtual void setVal(const char* newVal) ;
37  virtual RooAbsArg& operator=(const char* newValue);
38 
39  // We implement a fundamental type of AbsArg that can be stored in a dataset
40  inline virtual Bool_t isFundamental() const { return kTRUE; }
41 
42  // I/O streaming interface (machine readable)
43  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
44  virtual void writeToStream(std::ostream& os, Bool_t compact) const ;
45 
46 protected:
47 
48  ClassDef(RooStringVar,1) // String-valued variable
49 };
50 
51 #endif
virtual const char * getVal() const
Return value of object. Calculated if dirty, otherwise cached value is returned.
Definition: RooStringVar.h:35
virtual void setVal(const char *newVal)
Set value to given TString.
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual Bool_t isFundamental() const
Definition: RooStringVar.h:40
#define ClassDef(name, id)
Definition: Rtypes.h:254
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:30
bool verbose
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
virtual ~RooStringVar()
Destructor.
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
const Bool_t kTRUE
Definition: Rtypes.h:91
RooStringVar implements a string values RooAbsArg.
Definition: RooStringVar.h:24
char name[80]
Definition: TGX11.cxx:109