ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRecTools
SiClusterizationTool
src
OnnxNNCondAlg.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 SICLUSTERIZATIONTOOL_ONNXNNCONDALG_H
6
#define SICLUSTERIZATIONTOOL_ONNXNNCONDALG_H
7
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
#include "GaudiKernel/ServiceHandle.h"
10
#include "
StoreGate/WriteCondHandleKey.h
"
11
#include "
SiClusterizationTool/OnnxNNCollection.h
"
12
#include "
AthOnnxInterfaces/IOnnxRuntimeSvc.h
"
13
#include <onnxruntime_cxx_api.h>
14
15
namespace
InDet
{
16
17
class
OnnxNNCondAlg
:
public
AthReentrantAlgorithm
{
18
public
:
19
using
AthReentrantAlgorithm
::AthReentrantAlgorithm
;
20
virtual
~OnnxNNCondAlg
() =
default
;
21
22
virtual
StatusCode
initialize
()
override
;
23
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
24
virtual
bool
isReEntrant
()
const override
{
return
false
; }
25
26
private
:
27
std::unique_ptr<Ort::Session>
createSession
(
const
std::string& modelPath)
const
;
28
29
ServiceHandle<AthOnnx::IOnnxRuntimeSvc>
m_onnxSvc
{
30
this
,
"OnnxRuntimeSvc"
,
"AthOnnx::OnnxRuntimeSvc"
,
31
"Handle to the ONNX Runtime service"
};
32
33
SG::WriteCondHandleKey<OnnxNNCollection>
m_writeKey
{
34
this
,
"WriteKey"
,
"PixelClusterNNONNX"
,
35
"Output conditions key for ONNX NN collection"
};
36
37
Gaudi::Property<std::string>
m_numberNetworkPath
{
38
this
,
"NumberNetworkPath"
,
"ITkPixelClusterization/nn-01-01-01/number.onnx"
,
39
"Path to ONNX model for number network"
};
40
41
Gaudi::Property<std::string>
m_posNetwork1Path
{
42
this
,
"PositionNetwork1Path"
,
"ITkPixelClusterization/nn-01-01-01/pos1.onnx"
,
43
"Path to ONNX model for 1-particle position network"
};
44
45
Gaudi::Property<std::string>
m_posNetwork2Path
{
46
this
,
"PositionNetwork2Path"
,
"ITkPixelClusterization/nn-01-01-01/pos2.onnx"
,
47
"Path to ONNX model for 2-particle position network"
};
48
49
Gaudi::Property<std::string>
m_posNetwork3Path
{
50
this
,
"PositionNetwork3Path"
,
"ITkPixelClusterization/nn-01-01-01/pos3.onnx"
,
51
"Path to ONNX model for 3-particle position network"
};
52
53
};
54
55
}
// namespace InDet
56
57
#endif
AthReentrantAlgorithm.h
IOnnxRuntimeSvc.h
OnnxNNCollection.h
WriteCondHandleKey.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
InDet::OnnxNNCondAlg
Definition
OnnxNNCondAlg.h:17
InDet::OnnxNNCondAlg::m_numberNetworkPath
Gaudi::Property< std::string > m_numberNetworkPath
Definition
OnnxNNCondAlg.h:37
InDet::OnnxNNCondAlg::createSession
std::unique_ptr< Ort::Session > createSession(const std::string &modelPath) const
Definition
OnnxNNCondAlg.cxx:31
InDet::OnnxNNCondAlg::m_posNetwork1Path
Gaudi::Property< std::string > m_posNetwork1Path
Definition
OnnxNNCondAlg.h:41
InDet::OnnxNNCondAlg::isReEntrant
virtual bool isReEntrant() const override
Definition
OnnxNNCondAlg.h:24
InDet::OnnxNNCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
OnnxNNCondAlg.cxx:51
InDet::OnnxNNCondAlg::m_writeKey
SG::WriteCondHandleKey< OnnxNNCollection > m_writeKey
Definition
OnnxNNCondAlg.h:33
InDet::OnnxNNCondAlg::~OnnxNNCondAlg
virtual ~OnnxNNCondAlg()=default
InDet::OnnxNNCondAlg::m_posNetwork3Path
Gaudi::Property< std::string > m_posNetwork3Path
Definition
OnnxNNCondAlg.h:49
InDet::OnnxNNCondAlg::initialize
virtual StatusCode initialize() override
Definition
OnnxNNCondAlg.cxx:12
InDet::OnnxNNCondAlg::m_posNetwork2Path
Gaudi::Property< std::string > m_posNetwork2Path
Definition
OnnxNNCondAlg.h:45
InDet::OnnxNNCondAlg::m_onnxSvc
ServiceHandle< AthOnnx::IOnnxRuntimeSvc > m_onnxSvc
Definition
OnnxNNCondAlg.h:29
SG::WriteCondHandleKey
Definition
WriteCondHandleKey.h:22
ServiceHandle
Definition
ClusterMakerTool.h:36
InDet
Primary Vertex Finder.
Definition
VP1ErrorUtils.h:36
Generated on
for ATLAS Offline Software by
1.17.0