ATLAS Offline Software
Loading...
Searching...
No Matches
DeviceObjectCollection.h
Go to the documentation of this file.
1// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2#ifndef ATHEXDEVICE_DEVICECOLLECTION_H
3#define ATHEXDEVICE_DEVICECOLLECTION_H
4
5// Framework include(s).
7
8// VecMem include(s).
9#include <vecmem/edm/container.hpp>
10
11namespace AthExDevice {
12
14template <typename BASE>
15class DeviceObject : public BASE {
16
17 public:
20
22 using BASE::BASE;
24 DeviceObject(const DeviceObject& other) = default;
26 DeviceObject(DeviceObject&& other) = default;
27
29
32
33 auto& eta() { return BASE::template get<0>(); }
34 const auto& eta() const { return BASE::template get<0>(); }
35
36 auto& phi() { return BASE::template get<1>(); }
37 const auto& phi() const { return BASE::template get<1>(); }
38
39 auto& indices() { return BASE::template get<2>(); }
40 const auto& indices() const { return BASE::template get<2>(); }
41
43
44}; // class DeviceObject
45
48 vecmem::edm::container<DeviceObject,
49 // eta
50 vecmem::edm::type::vector<float>,
51 // phi
52 vecmem::edm::type::vector<float>,
53 // indices
54 vecmem::edm::type::jagged_vector<unsigned int>>;
55
56} // namespace AthExDevice
57
58// CLID definition(s).
59CLASS_DEF(AthExDevice::DeviceObjectCollection::buffer, 1183318154, 1)
60
61#endif // ATHEXDEVICE_DEVICECOLLECTION_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Interface to the example SoA collection.
DeviceObject(const DeviceObject &other)=default
Use a default copy constructor.
DeviceObject(DeviceObject &&other)=default
Use a default move constructor.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132
vecmem::edm::container< DeviceObject, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float >, vecmem::edm::type::jagged_vector< unsigned int > > DeviceObjectCollection
VecMem based SoA container used for the example(s).