ATLAS Offline Software
Loading...
Searching...
No Matches
TracccTritonInitializer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12#ifndef TRACCC_TRITON_INITIALIZER_H
13#define TRACCC_TRITON_INITIALIZER_H
14
15#include <cstddef>
16#include <memory>
17#include <string>
18
19class ISvcLocator;
20
21namespace triton { namespace backend { namespace traccc {
22
39public:
43 struct Config {
45 int deviceId = 0;
47 std::size_t nSlots = 1;
49 std::string sequenceName = "TracccDeviceRecoSeq";
51 std::string condSequenceName = "AthCondSeq";
52 std::string streamSvcName = "AthCUDA::PerEventStreamSvc";
55 std::string cellsKey;
56 std::string measurementsKey;
57 std::string clustersKey;
58 std::string tracksKey;
60 };
61
64
67 void initialize(const Config& config);
68
70 void finalize();
71
73 bool isReady() const;
74
76 const Config& config() const;
77
79 int deviceId() const;
80
83 ISvcLocator& serviceLocator() const;
84
88 std::size_t acquireSlot();
89
91
94
95private:
97
98 struct Impl;
99 std::unique_ptr<Impl> m_impl;
100};
101
102}}} // namespace triton::backend::traccc
103
104#endif // TRACCC_TRITON_INITIALIZER_H
static TracccTritonInitializer & instance()
Get the process-wide singleton.
std::size_t acquireSlot()
Claim the next free event-store slot for a Triton model instance.
bool isReady() const
Whether initialize has completed successfully.
ISvcLocator & serviceLocator() const
The service locator of the embedded Athena application (never null once ready).
TracccTritonInitializer(const TracccTritonInitializer &)=delete
const Config & config() const
The construction parameters the application was configured with.
void finalize()
Tear the application down. Safe to call when not initialized.
int deviceId() const
The CUDA device id this instance is pinned to.
TracccTritonInitializer & operator=(const TracccTritonInitializer &)=delete
void initialize()
Construction parameters, normally read from the model config, plus the StoreGate keys initialize() fi...
std::string sequenceName
Name of the AthSequencer holding the per-request device chain.
std::size_t nSlots
Number of event-store slots to create, one per Triton model instance.
std::string condSequenceName
Conditions sequence run before the chain on every request.
int deviceId
CUDA device id this instance is pinned to.