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, Bool_t doCINTExport) | |
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) |
Bool_t | addStudy(RooAbsStudy& study) |
RooArgSet | allCatFunctions() const |
RooArgSet | allCats() const |
list<RooAbsData*> | allData() const |
list<RooAbsData*> | allEmbeddedData() const |
RooArgSet | allFunctions() const |
list<TObject*> | allGenericObjects() const |
RooArgSet | allPdfs() const |
RooArgSet | allResolutionModels() const |
RooArgSet | allVars() const |
virtual void | TObject::AppendPad(Option_t* option = "") |
RooAbsArg* | arg(const char* name) const |
RooArgSet | argSet(const char* nameList) const |
static void | autoImportClassCode(Bool_t flag) |
virtual void | TObject::Browse(TBrowser* b) |
Bool_t | cancelTransaction() |
RooCategory* | cat(const char* name) const |
RooAbsCategory* | catfunc(const char* name) const |
Bool_t | cd(const char* path = 0) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
void | clearStudies() |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
Bool_t | commitTransaction() |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
TIterator* | componentIterator() const |
const RooArgSet& | components() const |
virtual void | TNamed::Copy(TObject& named) const |
RooAbsData* | data(const char* name) const |
Bool_t | defineSet(const char* name, const char* contentList) |
Bool_t | defineSet(const char* name, const RooArgSet& aset, Bool_t importMissing = kFALSE) |
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 |
RooAbsData* | embeddedData(const char* name) const |
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) |
RooExpensiveObjectCache& | expensiveObjectCache() |
void | exportToCint(const char* namespaceName = 0) |
Bool_t | extendSet(const char* name, const char* newContents) |
RooFactoryWSTool& | factory() |
RooAbsArg* | factory(const char* expr) |
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) const |
RooAbsArg* | fundArg(const char* name) const |
TObject* | genobj(const char* name) const |
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 |
const RooArgSet* | getSnapshot(const char* name) 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(TObject& object, Bool_t replaceExisting = kFALSE) |
Bool_t | import(TObject& object, const char* aliasName, Bool_t replaceExisting = kFALSE) |
Bool_t | import(const RooAbsArg& arg, const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg(), const RooCmdArg& arg9 = RooCmdArg()) |
Bool_t | import(const RooArgSet& args, const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg(), const RooCmdArg& arg9 = RooCmdArg()) |
Bool_t | import(RooAbsData& data, const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg(), const RooCmdArg& arg9 = RooCmdArg()) |
Bool_t | import(const char* fileSpec, const RooCmdArg& arg1 = RooCmdArg(), const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg(), const RooCmdArg& arg9 = 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 | loadSnapshot(const char* name) |
virtual void | TNamed::ls(Option_t* option = "") const |
Bool_t | makeDir() |
void | TObject::MayNotUse(const char* method) const |
void | merge(const RooWorkspace&) |
virtual Bool_t | TObject::Notify() |
TObject* | obj(const char* name) const |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
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) const |
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) |
Bool_t | removeSet(const char* name) |
Bool_t | renameSet(const char* name, const char* newName) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
Bool_t | saveSnapshot(const char* name, const char* paramNames) |
Bool_t | saveSnapshot(const char* name, const RooArgSet& params, Bool_t importValues = kFALSE) |
const RooArgSet* | set(const char* name) |
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&) |
virtual Int_t | TNamed::Sizeof() const |
Bool_t | startTransaction() |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
TIterator* | studyIterator() |
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() |
const TUUID& | uuid() const |
RooRealVar* | var(const char* name) const |
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 |
Bool_t | writeToFile(const char* fileName, Bool_t recreate = kTRUE) |
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 |
Bool_t | _doExport | ! Export contents of workspace to CINT? |
RooLinkedList | _embeddedDataList | List of owned datasets that are embedded in pdfs |
RooExpensiveObjectCache | _eocache | Cache for expensive objects |
string | _exportNSName | ! Name of CINT namespace to which contents are exported |
RooFactoryWSTool* | _factory | ! Factory tool associated with workspace |
RooLinkedList | _genObjects | List of generic objects |
map<std::string,RooArgSet> | _namedSets | Map of named RooArgSets |
Bool_t | _openTrans | ! Is there a transaction open? |
RooArgSet | _sandboxNodes | ! Sandbox for incoming objects in a transaction |
RooLinkedList | _snapshots | List of parameter snapshots |
RooLinkedList | _studyMods | List if StudyManager modules |
TUUID | _uuid | Unique workspace ID |
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
Construct empty workspace with given name and option to export reference to all workspace contents to a CINT namespace with the same name
Import a RooAbsArg or RooAbsData set from a workspace in a file. Filespec should be constructed as "filename:wspacename:objectname" The arguments will be passed on to the relevant RooAbsArg& or RooAbsData& import call
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 RenameAllVariablesExcept(const char* suffix, const char* exceptionList) -- Add suffix to all variables names, except ones listed 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 Silence() -- Do not issue any info message 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 Rename(const char* suffix) -- Rename dataset upon insertion RenameVariable(const char* inputName, const char* outputName) -- Change names of observables in dataset upon insertion
Define a named RooArgSet with given constituents. If importMissing is true, any constituents of aset that are not in the workspace will be imported, otherwise an error is returned for missing components
Define a named set in the work space through a comma separated list of names of objects already in the workspace
Define a named set in the work space through a comma separated list of names of objects already in the workspace
Cancel an ongoing import transaction. All objects imported since startTransaction() will be removed and the transaction will be terminated. Return kTRUE if cancel operation succeeds, return kFALSE if there was no open transaction
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
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
Return the RooArgSet containgin a snapshot of variables contained in the workspace Note that the variables of the objects in the snapshots are _copies_ of the variables in the workspace. To load the values of a snapshot in the workspace variables use loadSnapshot() instead
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 set of RooAbsArgs matching to given list of names
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
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.
Import a clone of a generic TObject into workspace generic object container. The imported object will be stored under the given alias name rather than its own name. Imported object can be retrieved its alias name through the obj() method. The object is cloned upon importation and the input argument does not need to live beyond the import call This method is mostly useful for importing objects that do not have a settable name such as TMatrix Returns kTRUE if an error has occurred.
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name)
Save this current workspace into given file
Stream an object of class RooWorkspace. This is a standard ROOT streamer for the I/O part. This custom function exists to detach all external client links from the payload prior to writing the payload so that these client links are not persisted. (Client links occur if external function objects use objects contained in the workspace as input) After the actual writing, these client links are restored.
Activate export of workspace symbols to CINT in a namespace with given name. If no name is given the namespace will have the same name as the workspace