11#pragma once
22
3- /* Copyright 2021-2023 Franz Poeschel
3+ /* Copyright 2021-2024 Franz Poeschel
44 *
5- * This file is part of PIConGPU .
5+ * This file is part of openPMD-api .
66 *
7- * PIConGPU is free software: you can redistribute it and/or modify
8- * it under the terms of the GNU General Public License as published by
7+ * openPMD-api is free software: you can redistribute it and/or modify
8+ * it under the terms of of either the GNU General Public License or
9+ * the GNU Lesser General Public License as published by
910 * the Free Software Foundation, either version 3 of the License, or
1011 * (at your option) any later version.
1112 *
12- * PIConGPU is distributed in the hope that it will be useful,
13+ * openPMD-api is distributed in the hope that it will be useful,
1314 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15- * GNU General Public License for more details.
15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+ * GNU General Public License and the GNU Lesser General Public License
17+ * for more details.
1618 *
1719 * You should have received a copy of the GNU General Public License
18- * along with PIConGPU .
20+ * and the GNU Lesser General Public License along with openPMD-api .
1921 * If not, see <http://www.gnu.org/licenses/>.
2022 */
2123
@@ -57,15 +59,14 @@ class MatcherPerBackend
5759 *
5860 * This constructor will parse the given config.
5961 * It will distinguish between ordinary openPMD JSON configurations
60- * and extended configurations as defined by PIConGPU.
61- * If an ordinary JSON configuration was detected, given regex
62- * patterns will be matched against "" (the empty string).
62+ * and dataset-specific configurations.
6363 *
64+ * @param backendName The backend's JSON key.
6465 * @param config The JSON configuration for one backend.
6566 * E.g. for ADIOS2, this will be the sub-object/array found
6667 * under config["adios2"]["dataset"].
6768 */
68- MatcherPerBackend (std::string backendName_in , TracingJSON config);
69+ MatcherPerBackend (std::string backendName , TracingJSON config);
6970
7071 std::string backendName;
7172
@@ -78,8 +79,7 @@ class MatcherPerBackend
7879 auto get (std::string const &datasetPath) const -> nlohmann::json const &;
7980};
8081/* *
81- * @brief Class to handle extended JSON configurations as used by
82- * the openPMD plugin.
82+ * @brief Class to handle default and dataset-specific JSON configurations.
8383 *
8484 * This class handles parsing of the extended JSON patterns as well as
8585 * selection of one JSON configuration by regex.
@@ -100,22 +100,18 @@ class JsonMatcher
100100 explicit JsonMatcher ();
101101
102102 /* *
103- * @brief Initialize JSON matcher from command line arguments .
103+ * @brief Initialize JSON matcher from a parsed JSON config .
104104 *
105- * This constructor will parse the given config, after reading it
106- * from a file if needed. In this case, the constructor is
107- * MPI-collective.
108- * It will distinguish between ordinary openPMD JSON configurations
109- * and extended configurations as defined by PIConGPU.
110- * If an ordinary JSON configuration was detected, given regex
111- * patterns will be matched against "" (the empty string).
105+ * Will go through the backends' configurations (keys defined by
106+ * `backendKeys` in JSON_internal.hpp) and check for dataset-specific
107+ * configurations. It will then construct:
108+ *
109+ * 1. A default configuration.
110+ * 2. Matchers for retrieving dataset-specific configurations.
112111 *
113- * @param config The JSON configuration, exactly as in
114- * --openPMD.json.
115- * @param comm MPI communicator for collective file reading,
116- * if needed.
112+ * @param config The parsed JSON configuration as specified by the user.
117113 */
118- JsonMatcher (openPMD::json::TracingJSON);
114+ JsonMatcher (openPMD::json::TracingJSON config );
119115
120116 /* *
121117 * @brief Get the JSON config associated with a regex pattern.
0 commit comments