Project
Loading...
Searching...
No Matches
ActsGeometryService.cxx
Go to the documentation of this file.
1// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
18
20#include "Framework/Logger.h"
24
25using namespace o2::framework;
26
27namespace o2::acts
28{
29
30const Acts::TrackingGeometry& ActsGeometryService::getGeometry() const
31{
33}
34
35std::shared_ptr<const Acts::TrackingGeometry> ActsGeometryService::getGeometryShared() const
36{
38}
39
44
45const Acts::GeometryContext& ActsGeometryService::getNominalContext() const
46{
48}
49
54
56{
57 return ServiceSpec{
58 .name = "acts-geometry",
59 .init = [](ServiceRegistryRef, DeviceState&, fair::mq::ProgOptions&) -> ServiceHandle {
60 // Nothing is built here: the TGeo geometry is not available yet at service
61 // init time. The first getGeometry() call, from run(), triggers the build.
62 return ServiceHandle{TypeIdHelpers::uniqueId<ActsGeometryService>(), new ActsGeometryService(),
63 ServiceKind::DeviceGlobal, "acts-geometry"};
64 },
66 .exit = [](ServiceRegistryRef, void* service) {
68 delete reinterpret_cast<ActsGeometryService*>(service); },
69 .kind = ServiceKind::DeviceGlobal};
70}
71
72std::vector<ServiceSpec> defaultServicesWithActsGeometry()
73{
74 auto services = CommonServices::defaultServices();
75 services.push_back(actsGeometryServiceSpec());
76 return services;
77}
78
79} // namespace o2::acts
DPL service exposing the ACTS tracking geometry through the ServiceRegistry.
const SurfaceIndexMap & getIndex() const
const Acts::GeometryContext & getNominalContext() const
const Acts::TrackingGeometry & getGeometry() const
std::shared_ptr< const Acts::TrackingGeometry > getGeometryShared() const
const Acts::GeometryContext & getNominalContext() const
static TrackingGeometryManager & instance()
const Acts::TrackingGeometry & get()
std::shared_ptr< const Acts::TrackingGeometry > getShared()
Builds on first call if not built yet.
o2::framework::ServiceSpec actsGeometryServiceSpec()
std::vector< o2::framework::ServiceSpec > defaultServicesWithActsGeometry()
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
static std::vector< ServiceSpec > defaultServices(std::string extraPlugins="", int numWorkers=0)
Split a string into a vector of strings using : as a separator.
static ServiceConfigureCallback noConfiguration()
Running state information of a given device.
Definition DeviceState.h:34
std::string name
Name of the service.