@@ -39,6 +39,9 @@ class RooJSONFactoryWSTool {
3939public:
4040 static constexpr bool useListsInsteadOfDicts = true ;
4141 static bool allowExportInvalidNames;
42+ static bool allowSanitizeNames;
43+ static RooWorkspace sanitizeWS (const RooWorkspace &ws);
44+ static RooWorkspace cleanWS (const RooWorkspace &ws, bool onlyModelConfig = false );
4245
4346 struct CombinedData {
4447 std::string name;
@@ -52,11 +55,14 @@ class RooJSONFactoryWSTool {
5255 static std::string name (const RooFit::Detail::JSONNode &n);
5356 static bool isValidName (const std::string &str);
5457 static bool testValidName (const std::string &str, bool forcError);
58+ static std::string sanitizeName (const std::string str);
59+ static void rebuildModelConfigInWorkspace (RooStats::ModelConfig *mc, RooWorkspace &ws);
5560
5661 static RooFit::Detail::JSONNode &appendNamedChild (RooFit::Detail::JSONNode &node, std::string const &name);
5762 static RooFit::Detail::JSONNode const *findNamedChild (RooFit::Detail::JSONNode const &node, std::string const &name);
5863
5964 static void fillSeq (RooFit::Detail::JSONNode &node, RooAbsCollection const &coll, size_t nMax = -1 );
65+ static void fillSeqSanitizedName (RooFit::Detail::JSONNode &node, RooAbsCollection const &coll, size_t nMax = -1 );
6066
6167 template <class T >
6268 T *request (const std::string &objname, const std::string &requestAuthor)
@@ -199,7 +205,6 @@ class RooJSONFactoryWSTool {
199205private:
200206 template <class T >
201207 T *requestImpl (const std::string &objname);
202-
203208 void exportObject (RooAbsArg const &func, std::set<std::string> &exportedObjectNames);
204209
205210 // To export multiple objects sorted alphabetically
@@ -230,7 +235,8 @@ class RooJSONFactoryWSTool {
230235 void exportAllObjects (RooFit::Detail::JSONNode &n);
231236
232237 void exportModelConfig (RooFit::Detail::JSONNode &rootnode, RooStats::ModelConfig const &mc,
233- const std::vector<RooJSONFactoryWSTool::CombinedData> &d);
238+ const std::vector<RooJSONFactoryWSTool::CombinedData> &combined,
239+ const std::vector<RooAbsData *> &single);
234240
235241 void exportSingleModelConfig (RooFit::Detail::JSONNode &rootnode, RooStats::ModelConfig const &mc,
236242 std::string const &analysisName,
0 commit comments