ATLAS Offline Software
Loading...
Searching...
No Matches
METNetSigHandler.h File Reference
#include <string>
#include <onnxruntime_cxx_api.h>
#include <ColumnarMode/ColumnarMode.h>
Include dependency graph for METNetSigHandler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

namespace ADD_CMODE (met)

Function Documentation

◆ ADD_CMODE()

namespace ADD_CMODE ( met )

Definition at line 1 of file METNetSigHandler.h.

24 {
25
26 class METNetSigHandler {
27
28 public:
29
30 // Constructor with parameters
31 METNetSigHandler(const std::string& modelName);
32
33 // Destructor
34 virtual ~METNetSigHandler();
35
36 // Public methods
37 int initialize();
38 int getReqSize() const;
39 std::vector<float> predict(std::vector<float> inputs) const;
40
41 private:
42
43 // Default constructor
44 METNetSigHandler();
45
46 // Class properties
47 std::string m_modelName; // Path to the onnx file
48 std::string m_modelPath; // Output of the path resolver
49
50 // Features of the network structure
51 size_t m_numInputs;
52 size_t m_numOutputs;
53 std::vector<int64_t> m_inputDims;
54 std::vector<int64_t> m_outputDims;
55 std::vector<const char *> m_graphInputNames;
56 std::vector<const char *> m_graphOutputNames;
57
58 // ONNX session objects
59 Ort::Env m_onnxEnv;
60 Ort::SessionOptions m_onnxSessionOptions;
61 Ort::AllocatorWithDefaultOptions m_onnxAllocator;
62 std::unique_ptr<Ort::Session> m_onnxSession;
63 };
64
65}
void initialize()