The RooWorkspace is a persistable container for RooFit projects. A workspace can contain and own variables, p.d.f.s, functions and datasets. All objects that live in the workspace are owned by the workspace. The import() method enforces consistency of objects upon insertion into the workspace (e.g. no duplicate object with the same name are allowed) and makes sure all objects in the workspace are connected to each other. Easy accessor methods like pdf(), var() and data() allow to refer to the contents of the workspace by object name. The entire RooWorkspace can be saved into a ROOT TFile and organises the consistent streaming of its contents without duplication.
If a RooWorkspace contains custom classes, i.e. classes not in the ROOT distribution, portability of workspaces can be enhanced by storing the source code of those classes in the workspace as well. This process is also organized by the workspace through the importClassCode() method.
RooWorkspace() | |
RooWorkspace(const RooWorkspace& other) | |
RooWorkspace(const char* name, const char* title = 0) | |
virtual | ~RooWorkspace() |
void | TObject::AbstractMethod(const char* method) const |
static void | addClassDeclImportDir(const char* dir) |
static void | addClassImplImportDir(const char* dir) |
virtual void | TObject::AppendPad(Option_t* option = "") |
RooAbsArg* | arg(const char* name) |
static void | autoImportClassCode(Bool_t flag) |
virtual void | TObject::Browse(TBrowser* b) |
RooCategory* | cat(const char* name) |
RooAbsCategory* | catfunc(const char* name) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
TIterator* | componentIterator() |
const RooArgSet& | components() const |
virtual void | TNamed::Copy(TObject& named) const |
RooAbsData* | data(const char* name) |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
RooAbsReal* | function(const char* name) |
RooAbsArg* | fundArg(const char* name) |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TNamed::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
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 | importClassCode(const char* pat = "*", Bool_t doReplace = kFALSE) |
Bool_t | importClassCode(TClass* theClass, Bool_t doReplace = kFALSE) |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
Bool_t | join(const RooWorkspace& other) |
Bool_t | loadSnapshot(const char* name) |
virtual void | TNamed::ls(Option_t* option = "") const |
Bool_t | makeDir() |
void | TObject::MayNotUse(const char* method) const |
Bool_t | merge(const RooWorkspace& other) |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
RooWorkspace& | operator=(const RooWorkspace&) |
virtual void | TObject::Paint(Option_t* option = "") |
RooAbsPdf* | pdf(const char* name) |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* opts = 0) const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
Bool_t | saveSnapshot(const char* name, const RooArgSet& params, Bool_t importValues = kFALSE) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
static void | setClassFileExportDir(const char* dir = 0) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
RooRealVar* | var(const char* name) |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
RooArgSet | _allOwnedNodes | List of owned pdfs and components |
static Bool_t | _autoClass | Automatic import of non-distribution class code |
static list<std::string> | _classDeclDirList | |
static string | _classFileExportDir | |
static list<std::string> | _classImplDirList | |
RooWorkspace::CodeRepo | _classes | Repository of embedded class code. This data member _must_ be first |
RooLinkedList | _dataList | List of owned datasets |
RooWorkspace::WSDir* | _dir | ! Transient ROOT directory representation of workspace |
RooExpensiveObjectCache | _eocache | Cache for expensive objects |
RooLinkedList | _snapshots | List of parameter snapshots |
RooLinkedList | _views | List of model views |
Add 'dir' to search path for class declaration (header) files, when attempting to import class code with importClassClode()
Add 'dir' to search path for class implementation (.cxx) files, when attempting to import class code with importClassClode()
Specify the name of the directory in which embedded source code is unpacked and compiled. The specified string may contain one '%s' token which will be substituted by the workspace name
Construct empty workspace with given name and title
Import a RooAbsArg object, e.g. function, p.d.f or variable into the workspace. This import function clones the input argument and will own the clone. If a composite object is offered for import, e.g. a p.d.f with parameters and observables, the complete tree of objects is imported. If any of the _variables_ of a composite object (parameters/observables) are already in the workspace the imported p.d.f. is connected to the already existing variables. If any of the _function_ objects (p.d.f, formulas) to be imported already exists in the workspace an error message is printed and the import of the entire tree of objects is cancelled. Several optional arguments can be provided to modify the import procedure. Accepted arguments RenameConflictNodes(const char* suffix) -- Add suffix to branch node name if name conflicts with existing node in workspace RenameAllNodes(const char* suffix) -- Add suffix to all branch node names including top level node RenameAllVariables(const char* suffix) -- Add suffix to all variables names RenameVariable(const char* inputName, const char* outputName) -- Rename variable as specified upon import. RecycleConflictNodes() -- If any of the function objects to be imported already exist in the name space, connect the imported expression to the already existing nodes. WARNING: use with care! If function definitions do not match, this alters the definition of your function upon import The RenameConflictNodes, RenameNodes and RecycleConflictNodes arguments are mutually exclusive. The RenameVariable argument can be repeated as often as necessary to rename multiple variables. Alternatively, a single RenameVariable argument can be given with two comma separated lists.
Import a dataset (RooDataSet or RooDataHist) into the work space. The workspace will contain a copy of the data The dataset and its variables can be renamed upon insertion with the options below Accepted arguments RenameDataset(const char* suffix) -- Rename dataset upon insertion RenameVariable(const char* inputName, const char* outputName) -- Change names of observables in dataset upon insertion
Save snapshot of values and attributes (including "Constant") of parameters 'params'
If importValues is FALSE, the present values from the object in the workspace are
saved. If importValues is TRUE, the values of the objects passed in the 'params'
argument are saved
Load the values and attributes of the parameters in the snapshot saved with the given name
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found
Retrieve function (RooAbsReal) with given name. Note that all RooAbsPdfs are also RooAbsReals. A null pointer is returned if not found.
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found
Retrieve discrete variable (RooCategory) with given name. A null pointer is returned if not found
Retrieve discrete function (RooAbsCategory) with given name. A null pointer is returned if not found
Return RooAbsArg with given name. A null pointer is returned if none is found.
Return fundamental (i.e. non-derived) RooAbsArg with given name. Fundamental types are e.g. RooRealVar, RooCategory. A null pointer is returned if none is found.
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found
Create transient TDirectory representation of this workspace. This directory will appear as a subdirectory of the directory that contains the workspace and will have the name of the workspace suffixed with "Dir". The TDirectory interface is read-only. Any attempt to insert objects into the workspace directory representation will result in an error message. Note that some ROOT object like TH1 automatically insert themselves into the current directory when constructed. This will give error messages when done in a workspace directory.