Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SaltModelOutput.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 
4 This class is used to store the configuration for a ONNX output node.
5 */
6 
7 #ifndef FLAVORTAGDISCRIMINANTS_SALTMODELOUTPUT_H
8 #define FLAVORTAGDISCRIMINANTS_SALTMODELOUTPUT_H
9 
10 #include <onnxruntime_cxx_api.h>
11 #include "nlohmann/json.hpp"
12 #include <string>
13 
14 namespace FlavorTagInference {
15 
17 
18  public:
20 
21  /* constructor for SaltModelVersion::V1 and higher */
22  SaltModelOutput(const std::string& name,
23  ONNXTensorElementDataType type,
24  int rank);
25 
26  /* constructor for SaltModelVersion::V0 */
27  SaltModelOutput(const std::string& name,
28  ONNXTensorElementDataType type,
29  const std::string& name_in_model);
30 
31  const std::string name;
32  const std::string name_in_model;
34 
35  private:
36  OutputType getOutputType(ONNXTensorElementDataType type, int rank) const;
37  const std::string getName(const std::string& name, const std::string& model_name) const;
38 
39 }; // class SaltModelOutput
40 
41 } // namespace FlavorTagInference
42 
43 #endif // FLAVORTAGDISCRIMINANTS_SALTMODELOUTPUT_H
FlavorTagInference::SaltModelOutput::OutputType::VECCHAR
@ VECCHAR
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: AssociationEnums.h:11
FlavorTagInference::SaltModelOutput::SaltModelOutput
SaltModelOutput(const std::string &name, ONNXTensorElementDataType type, int rank)
Definition: SaltModelOutput.cxx:12
FlavorTagInference::SaltModelOutput
Definition: SaltModelOutput.h:16
FlavorTagInference::SaltModelOutput::OutputType::UNKNOWN
@ UNKNOWN
FlavorTagInference::SaltModelOutput::type
const OutputType type
Definition: SaltModelOutput.h:33
FlavorTagInference::SaltModelOutput::name_in_model
const std::string name_in_model
Definition: SaltModelOutput.h:32
FlavorTagInference::SaltModelOutput::name
const std::string name
Definition: SaltModelOutput.h:31
FlavorTagInference::SaltModelOutput::OutputType::FLOAT
@ FLOAT
FlavorTagInference::SaltModelOutput::OutputType
OutputType
Definition: SaltModelOutput.h:19
FlavorTagInference::SaltModelOutput::getName
const std::string getName(const std::string &name, const std::string &model_name) const
Definition: SaltModelOutput.cxx:27
FlavorTagInference::SaltModelOutput::OutputType::VECFLOAT
@ VECFLOAT
FlavorTagInference::SaltModelOutput::getOutputType
OutputType getOutputType(ONNXTensorElementDataType type, int rank) const
Definition: SaltModelOutput.cxx:36