#ifndef ROO_WORKSPACE
#define ROO_WORKSPACE
#include "RooPrintable.h"
#include "RooArgSet.h"
#include "RooLinkedList.h"
#include "RooCmdArg.h"
#include "RooExpensiveObjectCache.h"
#include <map>
#include <list>
#include <string>
class TClass ;
class RooAbsPdf ;
class RooAbsData ;
class RooRealVar ;
class RooCategory ;
class RooAbsReal ;
class RooAbsCategory ;
#include "TNamed.h"
#include "TDirectoryFile.h"
class RooWorkspace : public TNamed {
public:
RooWorkspace() ;
RooWorkspace(const char* name, const char* title=0) ;
RooWorkspace(const RooWorkspace& other) ;
~RooWorkspace() ;
Bool_t importClassCode(const char* pat="*", Bool_t doReplace=kFALSE) ;
Bool_t importClassCode(TClass* theClass, Bool_t doReplace=kFALSE) ;
Bool_t import(const RooAbsArg& arg, const RooCmdArg& arg1=RooCmdArg(),const RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(const RooArgSet& args, const RooCmdArg& arg1=RooCmdArg(),const RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t import(RooAbsData& data, const RooCmdArg& arg1=RooCmdArg(),const RooCmdArg& arg2=RooCmdArg(),const RooCmdArg& arg3=RooCmdArg()) ;
Bool_t saveSnapshot(const char* name, const RooArgSet& params, Bool_t importValues=kFALSE) ;
Bool_t loadSnapshot(const char* name) ;
Bool_t merge(const RooWorkspace& other) ;
Bool_t join(const RooWorkspace& other) ;
RooAbsPdf* pdf(const char* name) ;
RooAbsReal* function(const char* name) ;
RooRealVar* var(const char* name) ;
RooCategory* cat(const char* name) ;
RooAbsCategory* catfunc(const char* name) ;
RooAbsData* data(const char* name) ;
RooAbsArg* arg(const char* name) ;
RooAbsArg* fundArg(const char* name) ;
TIterator* componentIterator() { return _allOwnedNodes.createIterator() ; }
const RooArgSet& components() const { return _allOwnedNodes ; }
Bool_t makeDir() ;
void Print(Option_t* opts=0) const ;
static void autoImportClassCode(Bool_t flag) ;
static void addClassDeclImportDir(const char* dir) ;
static void addClassImplImportDir(const char* dir) ;
static void setClassFileExportDir(const char* dir=0) ;
class CodeRepo : public TObject {
public:
CodeRepo(RooWorkspace* wspace=0) : _wspace(wspace), _compiledOK(kTRUE) {} ;
virtual ~CodeRepo() {} ;
Bool_t autoImportClass(TClass* tc, Bool_t doReplace=kFALSE) ;
Bool_t compileClasses() ;
Bool_t compiledOK() const { return _compiledOK ; }
std::string listOfClassNames() const ;
class ClassRelInfo {
public:
TString _baseName;
TString _fileBase ;
} ;
class ClassFiles {
public:
ClassFiles() : _extracted(kFALSE) {}
TString _hext ;
TString _hfile ;
TString _cxxfile ;
Bool_t _extracted ;
} ;
protected:
RooWorkspace* _wspace ;
std::map<TString,ClassRelInfo> _c2fmap ;
std::map<TString,ClassFiles> _fmap ;
Bool_t _compiledOK ;
ClassDef(CodeRepo,1) ;
} ;
class WSDir : public TDirectoryFile {
public:
WSDir(const char* name, const char* title, RooWorkspace* wspace) :
TDirectoryFile(name,title,"RooWorkspace::WSDir",0),
_wspace(wspace)
{
}
virtual ~WSDir() { Clear("nodelete") ; } ;
#if ROOT_VERSION_CODE <= 332546
virtual void Add(TObject*) ;
virtual void Append(TObject*) ;
#else
virtual void Add(TObject*,Bool_t) ;
virtual void Append(TObject*,Bool_t) ;
#endif
protected:
friend class RooWorkspace ;
void InternalAppend(TObject* obj) ;
RooWorkspace* _wspace ;
ClassDef(WSDir,1) ;
} ;
private:
friend class CodeRepo ;
static std::list<std::string> _classDeclDirList ;
static std::list<std::string> _classImplDirList ;
static std::string _classFileExportDir ;
static Bool_t _autoClass ;
CodeRepo _classes ;
RooArgSet _allOwnedNodes ;
RooLinkedList _dataList ;
RooLinkedList _views ;
RooLinkedList _snapshots ;
WSDir* _dir ;
RooExpensiveObjectCache _eocache ;
ClassDef(RooWorkspace,4)
} ;
#endif
Last change: Fri Nov 14 16:34:12 2008
Last generated: 2008-11-14 16:34
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.