ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
src
SpecRegistry.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef GLOBALSIM_SPECREGISTRY_H
5
#define GLOBALSIM_SPECREGISTRY_H
6
7
/*
8
Turns the name of a BitSpec into the pair of functions that pack and unpack
9
it. TOBTextReader and TOBTextWriter both take the name as a property and ask
10
for it here, so a TOB type becomes usable in both directions at once.
11
12
Which specs exist is not stated in this package's C++ any more. A spec becomes
13
usable by being listed in GlobalSimulation/selection.xml, which is also what
14
the dictionary is generated from; the functions are then built from the type
15
name through the ROOT interpreter the first time that name is asked for, and
16
kept. Adding a TOB type touches the header that defines it and the two files
17
next to it, and nothing here.
18
19
Keeping the layout behind a std::function means neither algorithm is a class
20
template: there is one component per algorithm however many specs exist, and
21
the spec is chosen at configuration time rather than at compile time.
22
*/
23
24
#include "
AthContainers/AuxElement.h
"
25
26
#include <cstddef>
27
#include <functional>
28
#include <string>
29
30
namespace
GlobalSim
{
31
32
struct
SpecEntry
{
35
std::size_t
width
{0};
36
38
std::function<std::string(
const
SG::AuxElement
&)>
pack
;
39
43
std::function<void(
SG::AuxElement
&,
const
std::string&)>
unpack
;
44
};
45
53
const
SpecEntry
*
specEntry
(
const
std::string& name, std::string&
error
);
54
56
std::string
knownSpecNames
();
57
58
}
59
60
#endif
// GLOBALSIM_SPECREGISTRY_H
AuxElement.h
Base class for elements of a container that can have aux data.
GlobalSim
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.
Definition
BitSpec.h:24
GlobalSim::specEntry
const SpecEntry * specEntry(const std::string &name, std::string &error)
The entry for one spec, or nullptr if there is not one.
Definition
SpecRegistry.cxx:135
GlobalSim::knownSpecNames
std::string knownSpecNames()
Comma-separated list of the names in the dictionary, for error messages.
Definition
SpecRegistry.cxx:161
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
error
Definition
IImpactPoint3dEstimator.h:72
GlobalSim::SpecEntry
Definition
SpecRegistry.h:32
GlobalSim::SpecEntry::width
std::size_t width
Total width of the packed word, in bits.
Definition
SpecRegistry.h:35
GlobalSim::SpecEntry::unpack
std::function< void(SG::AuxElement &, const std::string &)> unpack
Fill one object from its hex token.
Definition
SpecRegistry.h:43
GlobalSim::SpecEntry::pack
std::function< std::string(const SG::AuxElement &)> pack
Pack one object into its hex token.
Definition
SpecRegistry.h:38
Generated on
for ATLAS Offline Software by
1.17.0