49 "Consider using RooWorkspace(const char* name, const char* title=nullptr).");
72 bool import(
const char *fileSpec,
76 bool import(
TObject const&
object,
bool replaceExisting=
false) ;
77 bool import(
TObject const&
object,
const char* aliasName,
bool replaceExisting=
false) ;
91 inline const std::map<std::string,RooArgSet>&
sets()
const {
return _namedSets; }
117 const
RooArgSet& components()
const {
return _allOwnedNodes ; }
128 std::list<RooAbsData*> allData()
const ;
129 std::list<RooAbsData*> allEmbeddedData()
const ;
130 std::list<TObject*> allGenericObjects()
const ;
133 bool cd(
const char* path =
nullptr) ;
135 bool writeToFile(
const char* fileName,
bool recreate=
true) ;
142 void useFindsWithHashLookup(
bool flag) {
143 _allOwnedNodes.useHashMapForFind(flag);
154 TIterator* studyIterator() {
return _studyMods.MakeIterator() ; }
155 void clearStudies() ;
160 static void autoImportClassCode(
bool flag) ;
162 static void addClassDeclImportDir(
const char* dir) ;
163 static void addClassImplImportDir(
const char* dir) ;
164 static void setClassFileExportDir(
const char* dir=
nullptr) ;
166 const TUUID& uuid()
const {
return _uuid ; }
170 class CodeRepo :
public TObject {
172 CodeRepo(
RooWorkspace* wspace=
nullptr) : _wspace(wspace), _compiledOK(true) {} ;
175 _wspace(wspace?wspace:other._wspace),
176 _c2fmap(other._c2fmap),
178 _ehmap(other._ehmap),
179 _compiledOK(other._compiledOK) {} ;
181 bool autoImportClass(
TClass* tc,
bool doReplace=
false) ;
182 bool compileClasses() ;
184 bool compiledOK()
const {
return _compiledOK ; }
186 std::string listOfClassNames()
const ;
198 ClassFiles() : _extracted(false) {}
214 std::map<TString,ClassRelInfo> _c2fmap ;
215 std::map<TString,ClassFiles> _fmap ;
216 std::map<TString,ExtraHeader> _ehmap ;
231 ~WSDir()
override { Clear(
"nodelete") ; }
235 void Append(
TObject*,
bool)
override ;
239 void InternalAppend(
TObject* obj) ;
250 bool defineSetInternal(
const char *
name,
const RooArgSet &aset);
252 friend class CodeRepo;
253 static std::list<std::string> _classDeclDirList;
254 static std::list<std::string> _classImplDirList;
255 static std::string _classFileExportDir;
259 static bool _autoClass;
270 std::map<std::string, RooArgSet> _namedSets;
272 WSDir *_dir =
nullptr;
276 std::unique_ptr<RooFactoryWSTool> _factory;
279 std::string _exportNSName;
281 bool _openTrans =
false;
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
#define R__DEPRECATED(MAJOR, MINOR, REASON)
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Common abstract base class for objects that represent a value and a "shape" in RooFit.
A space to attach TBranches.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
Abstract base class for RooStudyManager modules.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Object to represent discrete states.
Named container for two doubles, two integers two object points and three string pointers that can be...
Calculates the sum of the -(log) likelihoods of a set of RooAbsPfs that represent constraint function...
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Variable that can be changed from the outside.
The RooStringView is a wrapper around a C-style string that can also be constructed from a std::strin...
Persistable container for RooFit projects.
const RooArgSet * getSnapshot(const char *name) const
Return the RooArgSet containing a snapshot of variables contained in the workspace.
RooAbsCategory * catfunc(RooStringView name) const
Retrieve discrete function (RooAbsCategory) with given name. A null pointer is returned if not found.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooAbsData * embeddedData(RooStringView name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found.
RooCategory * cat(RooStringView name) const
Retrieve discrete variable (RooCategory) with given name. A null pointer is returned if not found.
bool renameSet(const char *name, const char *newName)
Rename set to a new name.
TIterator * componentIterator() const R__DEPRECATED(6
RooArgSet argSet(RooStringView nameList) const
Return set of RooAbsArgs matching to given list of names.
const RooArgSet * set(RooStringView name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
RooAbsArg * fundArg(RooStringView name) const
Return fundamental (i.e.
~RooWorkspace() override
Workspace destructor.
const std::map< std::string, RooArgSet > & sets() const
bool cancelTransaction()
Cancel an ongoing import transaction.
bool startTransaction()
Open an import transaction operations.
TObject * Clone(const char *newname="") const override
TObject::Clone() needs to be overridden.
bool saveSnapshot(RooStringView, const char *paramNames)
Save snapshot of values and attributes (including "Constant") of given parameters.
void merge(const RooWorkspace &)
RooLinkedList const & getSnapshots() const
bool importClassCode(const char *pat="*", bool doReplace=false)
Import code of all classes in the workspace that have a class name that matches pattern 'pat' and whi...
RooAbsReal * function(RooStringView name) const
Retrieve function (RooAbsReal) with given name. Note that all RooAbsPdfs are also RooAbsReals....
RooAbsArg * arg(RooStringView name) const
Return RooAbsArg with given name. A null pointer is returned if none is found.
RooWorkspace()
Default constructor.
bool removeSet(const char *name)
Remove a named set from the workspace.
bool extendSet(const char *name, const char *newContents)
Define a named set in the work space through a comma separated list of names of objects already in th...
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
bool loadSnapshot(const char *name)
Load the values and attributes of the parameters in the snapshot saved with the given name.
bool defineSet(const char *name, const RooArgSet &aset, bool importMissing=false)
Define a named RooArgSet with given constituents.
TClass instances represent classes, structs and namespaces in the ROOT type system.
A ROOT file is structured in Directories (like a file system).
Iterator abstract base class.
The TNamed class is the base class for all named ROOT classes.
void Print(Option_t *option="") const override
Print TNamed name and title.
Mother of all ROOT objects.
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
int iterate(rng_state_t *X)
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.