FCCAnalyses
Loading...
Searching...
No Matches
WeaverUtils.h
Go to the documentation of this file.
1#ifndef FCCAnalyses_WEAVERUTILS_h
2#define FCCAnalyses_WEAVERUTILS_h
3
4#include <ROOT/RVec.hxx>
5
6namespace FCCAnalyses {
7 namespace WeaverUtils {
8
11 ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>> compute_weights(
12 const ROOT::VecOps::RVec<ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>>>&);
13
15 void setup_weaver(const std::string&, const std::string&, const ROOT::VecOps::RVec<std::string>&);
16
18 template <typename... Args>
19 ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>> get_weights(Args&&... args) {
20 return compute_weights(std::vector<ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>>>{std::forward<Args>(args)...});
21 }
23 ROOT::VecOps::RVec<float> get_weight(const ROOT::VecOps::RVec<ROOT::VecOps::RVec<float>>&, int);
24 } // namespace WeaverUtils
25} // namespace FCCAnalyses
26
27#endif
ROOT::VecOps::RVec< ROOT::VecOps::RVec< float > > compute_weights(const ROOT::VecOps::RVec< ROOT::VecOps::RVec< ROOT::VecOps::RVec< float > > > &)
Compute all weights given a collection of input variables.
Definition WeaverUtils.cc:16
ROOT::VecOps::RVec< ROOT::VecOps::RVec< float > > get_weights(Args &&... args)
Compute all weights given an unspecified collection of input variables.
Definition WeaverUtils.h:19
void setup_weaver(const std::string &, const std::string &, const ROOT::VecOps::RVec< std::string > &)
Setup the ONNXRuntime instance using Weaver-provided parameters.
ROOT::VecOps::RVec< float > get_weight(const ROOT::VecOps::RVec< ROOT::VecOps::RVec< float > > &, int)
Get one specific weight previously computed.
Definition WeaverUtils.cc:43
FCC analyzers collection.
Definition Algorithms.h:15