13#ifndef RooFitHS3_RooJSONFactoryWSTool_h
14#define RooFitHS3_RooJSONFactoryWSTool_h
57 static bool testValidName(
const std::string &str,
bool forcError);
68 T *
request(
const std::string &objname,
const std::string &requestAuthor)
83 return request<T>(node[key].val(), requestAuthor);
86 template <
class T,
class Coll_t>
93 if (!node[seqName].is_seq()) {
98 for (
const auto &elem : node[seqName].children()) {
99 out.add(*
request<T>(elem.val(), requestAuthor));
118 template <
class Obj_t>
122 return *
static_cast<Obj_t *
>(
_workspace.obj(obj.GetName()));
125 template <
class Obj_t,
typename... Args_t>
128 return wsImport(Obj_t(
name.c_str(),
name.c_str(), std::forward<Args_t>(args)...));
131 [[noreturn]]
static void error(
const char *s);
132 [[noreturn]]
inline static void error(
const std::string &s) {
error(s.c_str()); }
133 static std::ostream &
warning(
const std::string &s);
136 static std::unique_ptr<RooDataHist>
140 bool importYML(std::string
const &filename);
144 bool exportYML(std::string
const &fileName);
156 void importFunction(
const std::string &jsonString,
bool importAllDependants);
175 const char *
what() const noexcept
override {
return _message.c_str(); }
178 template <
typename... Keys_t>
181 return node.
get(
"misc",
"ROOT_internal", keys...);
200 void setAttribute(
const std::string &obj,
const std::string &attrib);
201 bool hasAttribute(
const std::string &obj,
const std::string &attrib);
203 void setStringAttribute(
const std::string &obj,
const std::string &attrib,
const std::string &value);
212 void exportObjects(T
const &args, std::set<std::string> &exportedObjectNames)
238 const std::vector<RooJSONFactoryWSTool::CombinedData> &combined,
239 const std::vector<RooAbsData *> &single);
242 std::string
const &analysisName,
243 std::map<std::string, std::string>
const *dataComponents);
253 std::unique_ptr<RooFit::JSONIO::Detail::Domains>
_domains;
Common abstract base class for objects that represent a value and a "shape" in RooFit.
A space to attach TBranches.
Abstract container object that can hold multiple RooAbsArg objects.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
void sort(bool reverse=false)
Sort collection using std::sort and name comparison.
Abstract base class for binned and unbinned datasets.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
JSONNode & get(std::string const &key)
virtual bool has_child(std::string const &) const =0
< A class that holds configuration information for a model using a workspace as a store
The RooStringView is a wrapper around a C-style string that can also be constructed from a std::strin...
Persistable container for RooFit projects.
RooCmdArg RecycleConflictNodes(bool flag=true)
RooCmdArg Silence(bool flag=true)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.