diff --git a/docs/sphinx_source/correction_manager.rst b/docs/sphinx_source/correction_manager.rst index e912625a..d70034df 100644 --- a/docs/sphinx_source/correction_manager.rst +++ b/docs/sphinx_source/correction_manager.rst @@ -13,12 +13,12 @@ For now, the CorrectionManager supports the following correction files: - correctionlib files of type ``correction::CompoundCorrection`` using the :cpp:func:`correctionManager::CorrectionManager::loadCompoundCorrection` function - json files using the :cpp:func:`correctionManager::CorrectionManager::loadjson` function -A Documentation of all CorrectionManager functions can be found in :ref:`Namespace: Correctionmanager` +A Documentation of all Correction Manager functions can be found in :ref:`Namespace:Correctionmanager` -Requrired Changes +Required Changes ****************** -Using the CorrectionManager slightly changes the signature of CROWN functions. In the following, one simple example is shown, how to use the CorrectionManager in a CROWN executable. +Using the Correction Manager slightly changes the signature of CROWN functions. In the following, one simple example is shown, how to use the Correction Manager in a CROWN executable. Python Producer Old diff --git a/docs/sphinx_source/introduction.rst b/docs/sphinx_source/introduction.rst index d074068e..809a764c 100644 --- a/docs/sphinx_source/introduction.rst +++ b/docs/sphinx_source/introduction.rst @@ -40,7 +40,7 @@ and source the current LCG stack (at the moment we use a nightly build) source init.sh -after this, the framework should be installed, but without any analysis, other than the example analysis. If you want to set up a specific analysis, you can do so by adding the name of the analysis to your ``init.sh`` command. So e.g. to set the `tau` Analysis, you can do so by running +After this, the framework should be installed, but without any analysis, other than the example analysis. If you want to set up a specific analysis, you can do so by adding the name of the analysis to your ``init.sh`` command. So e.g. to set up the `tau` Analysis, you can do so by running .. code-block:: console diff --git a/docs/sphinx_source/kingmaker.rst b/docs/sphinx_source/kingmaker.rst index ab460ed9..885b271a 100644 --- a/docs/sphinx_source/kingmaker.rst +++ b/docs/sphinx_source/kingmaker.rst @@ -1,7 +1,7 @@ Workflow Management ==================== -KingMaker is a workflow management for producing ntuples with the CROWN framework. The workflow management is based on law (https://github.com/riga/law), which uses luigi (https://github.com/spotify/luigi) as the backend. Kingmaker is used to orchestrated the production of ntuples and friend trees for the CROWN framework. The workflow is designed to be flexible and can be adapted to different analyses. Kingmaker takes care of building all required CROWN executables, submitting jobs to a batch systema and writing the output to a remote storage. On top of that, Kingmaker can be used to generate FriendTrees, which can be used to store additional information in the ntuples. A sample manager is provided to manage the samples and keep track of the individual input files that have to be processed. +KingMaker is a workflow management for producing ntuples with the CROWN framework. The workflow management is based on law (https://github.com/riga/law), which uses luigi (https://github.com/spotify/luigi) as the backend. Kingmaker is used to orchestrate the production of ntuples and friend trees for the CROWN framework. The workflow is designed to be flexible and can be adapted to different analyses. Kingmaker takes care of building all required CROWN executables, submitting jobs to a batch system and writing the output to a remote storage. On top of that, Kingmaker can be used to generate FriendTrees, which can be used to store additional information in the ntuples. A sample manager is provided to manage the samples and keep track of the individual input files that have to be processed. .. image:: ../images/kingmaker_sketch.png :width: 900 diff --git a/src/utility/CorrectionMananger.cxx b/src/utility/CorrectionMananger.cxx index 13f79ede..92906f67 100644 --- a/src/utility/CorrectionMananger.cxx +++ b/src/utility/CorrectionMananger.cxx @@ -1,18 +1,18 @@ #include "../../include/utility/CorrectionManager.hxx" #include "../../include/utility/Logger.hxx" +#include #include +#include #include #include -#include -#include /// namespace used for the CorrectionManager namespace correctionManager { /** * @brief Load a correctionlib correction from a file and return it. This * function works for most corrections found in correctionlib files (the default - * type for corrections is correction::Correction) . If the requested Correction - * is already loaded, it will return a pointer to the already loaded Correction. - * If not, the Correction will be loaded and stored in the CorrectionManager. + * type for corrections is correction::Correction) . If the requested correction + * is already loaded, it will return a pointer to the already loaded correction. + * If not, the correction will be loaded and stored in the CorrectionManager. * * @param filePath The path to the correctionlib file * @param corrName The name of the correction to load @@ -24,7 +24,9 @@ CorrectionManager::loadCorrection(const std::string &filePath, auto filePath_it = correction_map.find(filePath); if (filePath_it == correction_map.end()) { Logger::get("CorrectionManager") - ->debug("CorrectionFile {} not loaded yet, adding it...", filePath); + ->debug("CorrectionFile {} not loaded yet, adding it to the " + "CorrectionManager...", + filePath); auto result = correction_map.emplace( filePath, std::unordered_map< @@ -67,7 +69,9 @@ CorrectionManager::loadCompoundCorrection(const std::string &filePath, auto filePath_it = correctionCompound_map.find(filePath); if (filePath_it == correctionCompound_map.end()) { Logger::get("CorrectionManager") - ->debug("CorrectionFile {} not loaded yet, adding it...", filePath); + ->debug("CorrectionFile {} not loaded yet, adding it to the " + "CorrectionManager...", + filePath); auto result = correctionCompound_map.emplace( filePath, std::unordered_map< @@ -96,11 +100,23 @@ CorrectionManager::loadCompoundCorrection(const std::string &filePath, } return corrName_it->second.get(); }; -const nlohmann::json *CorrectionManager::loadjson(const std::string &filePath){ +/** + * @brief Load a json file from a file and return it. This + * function works works for all json files. If the requested + * json file is already loaded, it will return a pointer to the already + * loaded json. If not, the json will be loaded and + * stored in the CorrectionManager. + * + * @param filePath The path to the json file + * @return const nlohmann::json + */ +const nlohmann::json *CorrectionManager::loadjson(const std::string &filePath) { auto json_it = json_map.find(filePath); if (json_it == json_map.end()) { Logger::get("CorrectionManager") - ->debug("Json file {} not loaded yet, adding it...", filePath); + ->debug("Json file {} not loaded yet, adding it to the " + "CorrectionManager...", + filePath); std::ifstream json_file(filePath); auto result = json_map.emplace( filePath, @@ -121,6 +137,4 @@ void CorrectionManager::report() { n_corrections); }; - - } // namespace correctionManager \ No newline at end of file