-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
3,412 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef FCCAnalyses_WEAVERUTILS_h | ||
#define FCCAnalyses_WEAVERUTILS_h | ||
|
||
#include <ROOT/RVec.hxx> | ||
|
||
namespace FCCAnalyses { | ||
namespace WeaverUtils { | ||
|
||
/// Compute all weights given a collection of input variables | ||
/// \note This helper should not be used directly in RDataFrame examples | ||
ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>> compute_weights( | ||
const ROOT::VecOps::RVec<ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>>>&); | ||
|
||
/// Setup the ONNXRuntime instance using Weaver-provided parameters | ||
void setup_weaver(const std::string&, const std::string&, const ROOT::VecOps::RVec<std::string>&); | ||
|
||
/// Compute all weights given an unspecified collection of input variables | ||
template <typename... Args> | ||
ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>> get_weights(Args&&... args) { | ||
return compute_weights(std::vector<ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>>>{std::forward<Args>(args)...}); | ||
} | ||
/// Get one specific weight previously computed | ||
ROOT::VecOps::RVec<float> get_weight(const ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>>&, int); | ||
} // namespace WeaverUtils | ||
} // namespace FCCAnalyses | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.