ATLAS Offline Software
Loading...
Searching...
No Matches
ISaltModel.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
23namespace FlavorTagInference {
24
26
29 { SaltModelVersion::V0, "v0" },
30 { SaltModelVersion::V1, "v1" },
31 { SaltModelVersion::V2, "v2" },
32 })
33
34 // Inputs: the first element is the input data, the second is the shape
35 using Inputs = std::pair<std::vector<float>, std::vector<int64_t>>;
36 using OutputConfig = std::vector<SaltModelOutput>;
37
39 std::map<std::string, float> singleFloat;
40 std::map<std::string, std::vector<char>> vecChar;
41 std::map<std::string, std::vector<float>> vecFloat;
42 };
43
45 {
46 public:
47 virtual InferenceOutput runInference(std::map<std::string, Inputs>& gnn_inputs) const =0;
49 virtual const OutputConfig& getOutputConfig() const = 0;
51 virtual const std::string& getModelName() const = 0;
52 };
53
54 using ISaltModelPtr = std::shared_ptr<const ISaltModel>;
55
56} // End namespace
57
58#endif
virtual const SaltModelGraphConfig::GraphConfig getGraphConfig() const =0
virtual const std::string & getModelName() const =0
virtual SaltModelVersion getSaltModelVersion() const =0
virtual InferenceOutput runInference(std::map< std::string, Inputs > &gnn_inputs) const =0
virtual const OutputConfig & getOutputConfig() const =0
This file contains "getter" functions used for accessing tagger inputs from the EDM.
std::vector< SaltModelOutput > OutputConfig
Definition ISaltModel.h:36
NLOHMANN_JSON_SERIALIZE_ENUM(SaltModelVersion, { { SaltModelVersion::UNKNOWN, "" }, { SaltModelVersion::V0, "v0" }, { SaltModelVersion::V1, "v1" }, { SaltModelVersion::V2, "v2" }, }) using Inputs
std::pair< std::vector< float >, std::vector< int64_t > > Inputs
std::shared_ptr< const ISaltModel > ISaltModelPtr
Definition ISaltModel.h:54
std::map< std::string, std::vector< char > > vecChar
Definition ISaltModel.h:40
std::map< std::string, float > singleFloat
Definition ISaltModel.h:39
std::map< std::string, std::vector< float > > vecFloat
Definition ISaltModel.h:41