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
The BitSpecs that can be read from and written to hex text, looked up by name.
9
10
TOBTextReader and TOBTextWriter both take a BitSpec property and find their
11
entry here, so a TOB type is listed once and becomes usable in both
12
directions at the same time. Adding one is a single line in SpecRegistry.cxx.
13
14
Keeping the layout behind a std::function means neither algorithm is a class
15
template: there is one component per algorithm however many specs exist, and
16
the spec is chosen at configuration time rather than at compile time.
17
*/
18
19
#include "
AthContainers/AuxElement.h
"
20
21
#include <cstddef>
22
#include <functional>
23
#include <map>
24
#include <string>
25
26
namespace
GlobalSim
{
27
28
struct
SpecEntry
{
31
std::size_t
width
{0};
32
34
std::function<std::string(
const
SG::AuxElement
&)>
pack
;
35
39
std::function<void(
SG::AuxElement
&,
const
std::string&)>
unpack
;
40
};
41
43
const
std::map<std::string, SpecEntry>&
specRegistry
();
44
46
std::string
knownSpecNames
();
47
48
}
49
50
#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:23
GlobalSim::knownSpecNames
std::string knownSpecNames()
Comma-separated list of the known names, for error messages.
Definition
SpecRegistry.cxx:49
GlobalSim::specRegistry
const std::map< std::string, SpecEntry > & specRegistry()
The known specs, by name. Built on first use.
Definition
SpecRegistry.cxx:36
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
GlobalSim::SpecEntry
Definition
SpecRegistry.h:28
GlobalSim::SpecEntry::width
std::size_t width
Total width of the packed word, in bits.
Definition
SpecRegistry.h:31
GlobalSim::SpecEntry::unpack
std::function< void(SG::AuxElement &, const std::string &)> unpack
Fill one object from its hex token.
Definition
SpecRegistry.h:39
GlobalSim::SpecEntry::pack
std::function< std::string(const SG::AuxElement &)> pack
Pack one object into its hex token.
Definition
SpecRegistry.h:34
Generated on
for ATLAS Offline Software by
1.17.0