@@ -2040,18 +2040,6 @@ bool RooJSONFactoryWSTool::importJSONfromString(const std::string &s)
20402040 return importJSON (ss);
20412041}
20422042
2043- /* *
2044- * @brief Import the workspace from a YML string.
2045- *
2046- * @param s The YML string containing the workspace data.
2047- * @return bool Returns true on successful import, false otherwise.
2048- */
2049- bool RooJSONFactoryWSTool::importYMLfromString (const std::string &s)
2050- {
2051- std::stringstream ss (s);
2052- return importYML (ss);
2053- }
2054-
20552043/* *
20562044 * @brief Export the workspace to a JSON string.
20572045 *
@@ -2064,18 +2052,6 @@ std::string RooJSONFactoryWSTool::exportJSONtoString()
20642052 return ss.str ();
20652053}
20662054
2067- /* *
2068- * @brief Export the workspace to a YML string.
2069- *
2070- * @return std::string The YML string representing the exported workspace.
2071- */
2072- std::string RooJSONFactoryWSTool::exportYMLtoString ()
2073- {
2074- std::stringstream ss;
2075- exportYML (ss);
2076- return ss.str ();
2077- }
2078-
20792055/* *
20802056 * @brief Create a new JSON tree with version information.
20812057 *
@@ -2131,35 +2107,6 @@ bool RooJSONFactoryWSTool::exportJSON(std::string const &filename)
21312107 return this ->exportJSON (out);
21322108}
21332109
2134- /* *
2135- * @brief Export the workspace to YML format and write to the output stream.
2136- *
2137- * @param os The output stream to write the YML data to.
2138- * @return bool Returns true on successful export, false otherwise.
2139- */
2140- bool RooJSONFactoryWSTool::exportYML (std::ostream &os)
2141- {
2142- std::unique_ptr<JSONTree> tree = createNewJSONTree ();
2143- JSONNode &n = tree->rootnode ();
2144- this ->exportAllObjects (n);
2145- n.writeYML (os);
2146- return true ;
2147- }
2148-
2149- /* *
2150- * @brief Export the workspace to YML format and write to the specified file.
2151- *
2152- * @param filename The name of the YML file to create and write the data to.
2153- * @return bool Returns true on successful export, false otherwise.
2154- */
2155- bool RooJSONFactoryWSTool::exportYML (std::string const &filename)
2156- {
2157- std::ofstream out (filename.c_str ());
2158- if (!out.is_open ())
2159- RooJSONFactoryWSTool::error (" RooJSONFactoryWSTool() invalid output file '" + filename + " '." );
2160- return this ->exportYML (out);
2161- }
2162-
21632110bool RooJSONFactoryWSTool::hasAttribute (const std::string &obj, const std::string &attrib)
21642111{
21652112 if (!_attributesNode)
@@ -2366,37 +2313,6 @@ bool RooJSONFactoryWSTool::importJSON(std::string const &filename)
23662313 return this ->importJSON (infile);
23672314}
23682315
2369- /* *
2370- * @brief Imports a YML file from the given input stream to the workspace.
2371- *
2372- * @param is The input stream containing the YML data.
2373- * @return bool Returns true on successful import, false otherwise.
2374- */
2375- bool RooJSONFactoryWSTool::importYML (std::istream &is)
2376- {
2377- // import a YML file to the workspace
2378- std::unique_ptr<JSONTree> tree = JSONTree::create (is);
2379- JSONNode const &rootnode = tree->rootnode ();
2380- this ->importAllNodes (rootnode);
2381- importParameterStepWidths (*this ->workspace (), rootnode);
2382- return true ;
2383- }
2384-
2385- /* *
2386- * @brief Imports a YML file from the given filename to the workspace.
2387- *
2388- * @param filename The name of the YML file to import.
2389- * @return bool Returns true on successful import, false otherwise.
2390- */
2391- bool RooJSONFactoryWSTool::importYML (std::string const &filename)
2392- {
2393- // import a YML file to the workspace
2394- std::ifstream infile (filename.c_str ());
2395- if (!infile.is_open ())
2396- RooJSONFactoryWSTool::error (" RooJSONFactoryWSTool() invalid input file '" + filename + " '." );
2397- return this ->importYML (infile);
2398- }
2399-
24002316void RooJSONFactoryWSTool::importJSONElement (const std::string &name, const std::string &jsonString)
24012317{
24022318 // Create the JSON Tree from the string
0 commit comments