00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooStringVar.h,v 1.23 2007/05/11 09:11:30 verkerke Exp $ 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 #ifndef ROO_STRING_VAR 00017 #define ROO_STRING_VAR 00018 00019 #include "Riosfwd.h" 00020 #include "TString.h" 00021 #include "RooAbsString.h" 00022 class RooArgSet ; 00023 00024 class RooStringVar : public RooAbsString { 00025 public: 00026 // Constructors, assignment etc. 00027 inline RooStringVar() { } 00028 RooStringVar(const char *name, const char *title, const char* value, Int_t size=1024) ; 00029 RooStringVar(const RooStringVar& other, const char* name=0); 00030 virtual TObject* clone(const char* newname) const { return new RooStringVar(*this,newname); } 00031 virtual ~RooStringVar(); 00032 00033 // Parameter value and error accessors 00034 virtual operator TString() ; 00035 virtual const char* getVal() const { return _value ; } // overrides RooAbsReal::getVal() 00036 virtual void setVal(const char* newVal) ; 00037 virtual RooAbsArg& operator=(const char* newValue); 00038 00039 // We implement a fundamental type of AbsArg that can be stored in a dataset 00040 inline virtual Bool_t isFundamental() const { return kTRUE; } 00041 00042 // I/O streaming interface (machine readable) 00043 virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ; 00044 virtual void writeToStream(ostream& os, Bool_t compact) const ; 00045 00046 protected: 00047 00048 ClassDef(RooStringVar,1) // String-valued variable 00049 }; 00050 00051 #endif