ATLAS Offline Software
Loading...
Searching...
No Matches
ISaltModel.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef FLAVORTAGINFERENCE_ISALTMODEL_H
6#define FLAVORTAGINFERENCE_ISALTMODEL_H
7
14
17#include "nlohmann/json.hpp"
18#include <memory>
19#include <map>
20#include <vector>
21#include <string>
22#include <cstdint>
23
24namespace FlavorTagInference {
25
27
30 { SaltModelVersion::V0, "v0" },
31 { SaltModelVersion::V1, "v1" },
32 { SaltModelVersion::V2, "v2" },
33 })
34
35 // Inputs: the first element is the input data, the second is the shape
36 using Inputs = std::pair<std::vector<float>, std::vector<int64_t>>;
37 using InputMap = std::map<std::string, Inputs, std::less<>>;
38 using OutputConfig = std::vector<SaltModelOutput>;
39
41 std::map<std::string, float> singleFloat;
42 std::map<std::string, std::vector<char>> vecChar;
43 std::map<std::string, std::vector<float>> vecFloat;
44 };
45
47 {
48 public:
49 virtual InferenceOutput runInference(InputMap& gnn_inputs) const =0;
51 virtual const OutputConfig& getOutputConfig() const = 0;
53 virtual const std::string& getModelName() const = 0;
54 };
55
56 using ISaltModelPtr = std::shared_ptr<const ISaltModel>;
57
58} // End namespace
59
60#endif
virtual const SaltModelGraphConfig::GraphConfig getGraphConfig() const =0
virtual const std::string & getModelName() const =0
virtual SaltModelVersion getSaltModelVersion() const =0
virtual const OutputConfig & getOutputConfig() const =0
virtual InferenceOutput runInference(InputMap &gnn_inputs) const =0
This file contains "getter" functions used for accessing tagger inputs from the EDM.
std::vector< SaltModelOutput > OutputConfig
Definition ISaltModel.h:38
NLOHMANN_JSON_SERIALIZE_ENUM(SaltModelVersion, { { SaltModelVersion::UNKNOWN, "" }, { SaltModelVersion::V0, "v0" }, { SaltModelVersion::V1, "v1" }, { SaltModelVersion::V2, "v2" }, }) using Inputs
std::map< std::string, Inputs, std::less<> > InputMap
Definition ISaltModel.h:37
std::shared_ptr< const ISaltModel > ISaltModelPtr
Definition ISaltModel.h:56
std::map< std::string, std::vector< char > > vecChar
Definition ISaltModel.h:42
std::map< std::string, float > singleFloat
Definition ISaltModel.h:41
std::map< std::string, std::vector< float > > vecFloat
Definition ISaltModel.h:43