4#ifndef RingerSelectorTools_tools_onnx_RingerSelector_h
5#define RingerSelectorTools_tools_onnx_RingerSelector_h
9#include "GaudiKernel/StatusCode.h"
10#include "GaudiKernel/ServiceHandle.h"
15#include <onnxruntime_cxx_api.h>
19#include "GaudiKernel/SystemOfUnits.h"
71 template <
typename T>
bool strtof(
const std::string& input, T& f);
73 template <
typename T> std::vector<T>
GetValues (
const std::string& input, TEnv& env);
75 std::vector<std::string>
GetPaths(
const std::string& input, TEnv& env);
77 std::string
GetBasePath(
const std::string &path)
const;
Service used for managing global objects used by Onnx Runtime.
std::vector< T > GetValues(const std::string &input, TEnv &env)
Get the list of values inside of tenv.
StatusCode read_from(const std::string &, AthOnnx::IOnnxRuntimeSvc *)
read tunings from configuration file
bool accept(const xAOD::TrigRingerRings *, float discr, float mu) const
Accept method.
float predict(const xAOD::TrigRingerRings *, const xAOD::TrigElectron *) const
Calculation of model output.
RingerSelector(const std::string &name)
Standard constructor.
std::vector< std::string > GetPaths(const std::string &input, TEnv &env)
Get the list of paths inside of tenv.
std::vector< Ringer::onnx::Model > m_models
hold all onnx sessions
std::vector< Ringer::onnx::Threshold > m_thresholds
hold all thresholds definitions
bool strtof(const std::string &input, T &f)
parse tenv string into list with type T
std::vector< std::vector< float > > prepare_inputs(unsigned barcode, const xAOD::TrigRingerRings *, const xAOD::TrigElectron *) const
prepare all inputs
std::string GetBasePath(const std::string &path) const
Get basepath from calib path.
~RingerSelector()=default
Standard destructor.
Class mimicking the AthMessaging class from the offline software.
Namespace dedicated for Ringer utilities.
TrigRingerRings_v2 TrigRingerRings
Define the latest version of the TrigRingerRings class.
TrigElectron_v1 TrigElectron
Declare the latest version of the class.