ATLAS Offline Software
Loading...
Searching...
No Matches
IAthInferenceTool.h
Go to the documentation of this file.
1// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2#ifndef AthInfer_IAthInferenceTool_H
3#define AthInfer_IAthInferenceTool_H
4
5#include "AsgTools/IAsgTool.h"
6
7#include <vector>
8#include <string>
9#include <variant>
10#include <map>
11
12namespace AthInfer {
13
14 using DataVariant = std::variant<std::vector<float>, std::vector<int64_t> >;
15 using InferenceData = std::pair<std::vector<int64_t>, DataVariant>;
16 using InputDataMap = std::map<std::string, InferenceData>;
17 using OutputDataMap = std::map<std::string, InferenceData>;
18
19 // class asg::IAsgTool
20 // Interface class for running inferences in Athena.
21 // @author Xiangyang Ju <xju@cern.ch>
22
23 class IAthInferenceTool : virtual public asg::IAsgTool
24 {
26 public:
27
28 // Run inference with multiple inputs and multiple outputs
29 virtual StatusCode inference(InputDataMap& inputData, OutputDataMap& outputData) const = 0;
30 };
31}
32
33#endif
#define ASG_TOOL_INTERFACE(CLASSNAME)
virtual StatusCode inference(InputDataMap &inputData, OutputDataMap &outputData) const =0
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
std::map< std::string, InferenceData > OutputDataMap
std::variant< std::vector< float >, std::vector< int64_t > > DataVariant
std::map< std::string, InferenceData > InputDataMap
std::pair< std::vector< int64_t >, DataVariant > InferenceData