ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
GlobalSimulation
Object.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 GLOBALSIM_OBJECT_H
6
#define GLOBALSIM_OBJECT_H
7
8
#include "
AthContainers/AuxElement.h
"
9
#include "
xAODCore/tools/PrintHelpers.h
"
10
11
namespace
GlobalSim
{
12
13
template
<
typename
Spec>
14
class
Object
:
public
Spec::ObjectAcc {
15
public
:
16
static
constexpr
Spec
spec
{};
// allows access to the BitSpec with obj.spec. syntax
17
18
19
explicit
Object
(
const
SG::AuxElement
&obj) : Spec::ObjectAcc(obj) {
20
21
}
22
23
explicit
Object
() :
Object
([]() ->
const
SG
::AuxElement & {
24
auto
out = (
new
SG::AuxElement
);
25
out->makePrivateStore();
26
return
*out;
27
}()) {
28
// should remove this constructor in time ...
29
}
30
31
// ------------------------------------------------------------------------
32
// Complete packed representation.
33
// ------------------------------------------------------------------------
34
35
Spec::bitset_type
bits
()
const
{
36
return
Spec::packFields(Spec::fields, Spec::ObjectAcc::m_obj);
37
}
38
39
void
operator=
(
const
Spec::bitset_type &
bits
) {
40
std::apply([&](
const
auto
*... field) {
41
(field->decodeAndAssignFrom(
bits
,
const_cast<
SG::AuxElement
&
>
(Spec::ObjectAcc::m_obj)), ...);
42
},
43
Spec::fields);
44
}
45
46
public
:
47
const
SG::AuxElement
*
objectPtr
()
const
{
48
return
&this->Spec::ObjectAcc::m_obj;
49
}
50
51
void
dump
()
const
{
52
xAOD::dump
(*
objectPtr
());
53
}
54
55
56
};
57
58
}
59
60
#endif
AuxElement.h
Base class for elements of a container that can have aux data.
PrintHelpers.h
GlobalSim::Object::Object
Object()
Definition
Object.h:23
GlobalSim::Object::objectPtr
const SG::AuxElement * objectPtr() const
Definition
Object.h:47
GlobalSim::Object::dump
void dump() const
Definition
Object.h:51
GlobalSim::Object::spec
static constexpr Spec spec
Definition
Object.h:16
GlobalSim::Object::Object
Object(const SG::AuxElement &obj)
Definition
Object.h:19
GlobalSim::Object::operator=
void operator=(const Spec::bitset_type &bits)
Definition
Object.h:39
GlobalSim::Object::bits
Spec::bitset_type bits() const
Definition
Object.h:35
const
GlobalSim
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.
Definition
BitSpec.h:23
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
xAOD::dump
void dump(const SG::AuxElement &obj)
Helper function for dumping xAOD objects on the screen in PyROOT.
Definition
PrintHelpers.cxx:203
Generated on
for ATLAS Offline Software by
1.17.0