ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExDevice
src
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).
6
#include "
AthenaKernel/CLASS_DEF.h
"
7
8
// VecMem include(s).
9
#include <vecmem/edm/container.hpp>
10
11
namespace
AthExDevice
{
12
14
template
<
typename
BASE>
15
class
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
47
using
DeviceObjectCollection
=
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).
59
CLASS_DEF
(AthExDevice::DeviceObjectCollection::buffer, 1183318154, 1)
60
61
#endif
// ATHEXDEVICE_DEVICECOLLECTION_H
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
AthExDevice::DeviceObject
Interface to the example SoA collection.
Definition
DeviceObjectCollection.h:15
AthExDevice::DeviceObject::eta
const auto & eta() const
Definition
DeviceObjectCollection.h:34
AthExDevice::DeviceObject::indices
const auto & indices() const
Definition
DeviceObjectCollection.h:40
AthExDevice::DeviceObject::DeviceObject
DeviceObject(const DeviceObject &other)=default
Use a default copy constructor.
AthExDevice::DeviceObject::phi
auto & phi()
Definition
DeviceObjectCollection.h:36
AthExDevice::DeviceObject::phi
const auto & phi() const
Definition
DeviceObjectCollection.h:37
AthExDevice::DeviceObject::DeviceObject
DeviceObject(DeviceObject &&other)=default
Use a default move constructor.
AthExDevice::DeviceObject::eta
auto & eta()
Definition
DeviceObjectCollection.h:33
AthExDevice::DeviceObject::indices
auto & indices()
Definition
DeviceObjectCollection.h:39
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition
hcg.cxx:132
AthExDevice
Definition
DeviceObjectCollection.h:11
AthExDevice::DeviceObjectCollection
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).
Definition
DeviceObjectCollection.h:47
Generated on
for ATLAS Offline Software by
1.17.0