13#ifndef RooFitHS3_RooJSONFactoryWSTool_h
14#define RooFitHS3_RooJSONFactoryWSTool_h
42 std::vector<DistributionRef> channelConstraints);
80 static bool testValidName(
const std::string &str,
bool forcError);
90 T *
request(
const std::string &objname,
const std::string &requestAuthor)
92 if (T *out = requestImpl<T>(objname)) {
105 return request<T>(node[key].val(), requestAuthor);
108 template <
class T,
class Coll_t>
115 if (!node[seqName].is_seq()) {
120 for (
const auto &elem : node[seqName].
children()) {
121 out.add(*request<T>(elem.val(), requestAuthor));
129 return requestCollection<T, RooArgSet>(node, seqName);
135 return requestCollection<T, RooArgList>(node, seqName);
140 template <
class Obj_t>
147 template <
class Obj_t,
typename... Args_t>
150 return wsImport(Obj_t(
name.c_str(),
name.c_str(), std::forward<Args_t>(args)...));
153 [[noreturn]]
static void error(
const char *s);
154 [[noreturn]]
inline static void error(
const std::string &s) {
error(s.c_str()); }
155 static std::ostream &
warning(
const std::string &s);
158 static std::unique_ptr<RooDataHist>
172 void importFunction(
const std::string &jsonString,
bool importAllDependants);
184 : std::runtime_error(
"object '" +
p +
"' is missing dependency '" +
c +
"' of type '" +
classname +
"'"),
195 template <
typename... Keys_t>
198 return node.
get(
"misc",
"ROOT_internal", keys...);
219 void setAttribute(
const std::string &obj,
const std::string &attrib);
220 bool hasAttribute(
const std::string &obj,
const std::string &attrib);
234 void exportObjects(T
const &args, std::set<std::string> &exportedObjectNames)
262 const std::vector<RooJSONFactoryWSTool::CombinedData> &combined,
263 const std::vector<RooAbsData *> &single);
266 std::map<std::string, std::string>
const *dataComponents);
269 std::vector<RooFit::HS3::DistributionRef> channelConstraints);
276 std::unique_ptr<RooFit::HS3::ToolImportState>
_import;
277 std::unique_ptr<RooFit::HS3::ToolExportState>
_export;
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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)
bool has_child(std::string const &) const
Variable that can be changed from the outside.
< 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.
TObject * obj(RooStringView name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name)
bool import(const RooAbsArg &arg, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
RooCmdArg RecycleConflictNodes(bool flag=true)
RooCmdArg Silence(bool flag=true)
Types that represent an HS3 document.
void setExportedObject(RooJSONFactoryWSTool &tool, HistFactoryDist dist, std::vector< DistributionRef > channelConstraints)
Called by the exporter of a HistFactory distribution, which is then written by the tool.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.
A name that says what it refers to, so that for example a DataRef can't be used as a DomainRef.