Logo ROOT   6.18/05
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"
21class RooArgSet ;
22
23class RooStringVar : public RooAbsString {
24public:
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
45protected:
46
47 ClassDef(RooStringVar,1) // String-valued variable
48};
49
50#endif
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassDef(name, id)
Definition: Rtypes.h:326
char name[80]
Definition: TGX11.cxx:109
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:70
RooAbsString is the common abstract base class for objects that represent a string value.
Definition: RooAbsString.h:25
char * _value
Definition: RooAbsString.h:68
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooStringVar implements a string values RooAbsArg.
Definition: RooStringVar.h:23
virtual RooAbsArg & operator=(const char *newValue)
Set value to given TString.
virtual TObject * clone(const char *newname) const
Definition: RooStringVar.h:29
virtual void setVal(const char *newVal)
Set value to given TString.
virtual const char * getVal() const
Return value of object. Calculated if dirty, otherwise cached value is returned.
Definition: RooStringVar.h:34
virtual ~RooStringVar()
Destructor.
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
Definition: RooStringVar.h:39
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131