RooAbsString.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooAbsString.h,v 1.26 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_ABS_STRING
00017 #define ROO_ABS_STRING
00018 
00019 #include "RooAbsArg.h"
00020 
00021 class RooArgSet ;
00022 class TH1F ;
00023 
00024 class RooAbsString : public RooAbsArg {
00025 public:
00026 
00027   // Constructors, assignment etc
00028   RooAbsString() ;
00029   RooAbsString(const char *name, const char *title, Int_t size=128) ;
00030   RooAbsString(const RooAbsString& other, const char* name=0);
00031   virtual ~RooAbsString();
00032 
00033   // Return value and unit accessors
00034   virtual const char* getVal() const ;
00035   Bool_t operator==(const char*) const ;
00036   virtual Bool_t operator==(const RooAbsArg& other) ;
00037 
00038   // I/O streaming interface (machine readable)
00039   virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
00040   virtual void writeToStream(ostream& os, Bool_t compact) const ;
00041 
00042   // Printing interface (human readable)
00043   virtual void printValue(ostream& os) const ;
00044 
00045 
00046   RooAbsArg *createFundamental(const char* newname=0) const;
00047 
00048 protected:
00049 
00050   // Function evaluation and error tracing
00051   const char* traceEval() const ;
00052   virtual Bool_t traceEvalHook(const char* value) const ;
00053   virtual TString evaluate() const { return "" ; }
00054 
00055   // Internal consistency checking (needed by RooDataSet)
00056   virtual Bool_t isValid() const ;
00057   virtual Bool_t isValidString(const char*, Bool_t printError=kFALSE) const ;
00058 
00059   virtual void syncCache(const RooArgSet* nset=0) ;
00060   void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE) ;
00061   virtual void attachToTree(TTree& t, Int_t bufSize=32000) ;
00062   virtual void fillTreeBranch(TTree& t) ;
00063   virtual void setTreeBranchStatus(TTree& t, Bool_t active) ;
00064   Int_t _len ; // Length of _value
00065   mutable char *_value ; //[_len] Value
00066 
00067   ClassDef(RooAbsString,1) // Abstract string-valued variable
00068 };
00069 
00070 #endif

Generated on Tue Jul 5 14:26:02 2011 for ROOT_528-00b_version by  doxygen 1.5.1