ATLAS Offline Software
Loading...
Searching...
No Matches
Utils.cxx File Reference
#include <functional>
#include <regex>
#include <TError.h>
#include "AthContainers/tools/error.h"
#include "xAODRootAccess/tools/Message.h"
#include "xAODRootAccess/tools/Utils.h"
Include dependency graph for Control/xAODRootAccess/Root/Utils.cxx:

Go to the source code of this file.

Namespaces

namespace  xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
namespace  xAOD::Utils

Macros

#define TYPE_CHECK_INSTANTIATE(MACRO)
 Macro instantiating another macro for all usual "primitive" types.
#define GETTYPEINFO_SPECIALIZE(TYPE)
 Macro returning the type info for a given type name.
#define ISPRIMITIVETYPE_SPECIALIZE(TYPE)

Functions

SG::sgkey_t xAOD::Utils::hash (const std::string &name)
 This function provides a hashed version of the key (branch) names used in the xAOD file, similar to how Athena saves hashed numbers in persistent ElementLinks.
std::string xAOD::Utils::dynBranchPrefix (const std::string &key)
 This function is used to figure out what to name dynamic auxiliary branches coming from a container called key.
std::string xAOD::Utils::dynFieldPrefix (const std::string &key)
 This function is used to figure out what to name dynamic auxiliary field coming from a container called key.
const std::type_info & xAOD::Utils::getTypeInfo (EDataType type)
 This function is used when reading a primitive branch from an input file without the user explicitly asking for it.
const std::type_info & xAOD::Utils::getTypeInfo (std::string_view typeName)
 Get the type info of a primitive variable, in an RNTuple.
bool xAOD::Utils::isPrimitiveType (std::string_view typeName)
 Check if the type name describes a primitive type.
char xAOD::Utils::rootType (char typeidType)
 This function is used internally in the code when creating primitive dynamic auxiliary branches.
std::string xAOD::Utils::getTypeName (const std::type_info &ti)
 This function is necessary in order to create type names that ROOT can understand.
std::string xAOD::Utils::getFirstBranchMatch (TTree *tree, const std::string &pre)
 This function is used to search for a branch in a TTree that contains a given substring.

Macro Definition Documentation

◆ GETTYPEINFO_SPECIALIZE

#define GETTYPEINFO_SPECIALIZE ( TYPE)
Value:
if(typeName == #TYPE) { \
return typeid(TYPE); \
}
#define TYPE(CODE, TYP, IOTYP)

Macro returning the type info for a given type name.

Definition at line 260 of file Control/xAODRootAccess/Root/Utils.cxx.

260#define GETTYPEINFO_SPECIALIZE(TYPE) \
261 if(typeName == #TYPE) { \
262 return typeid(TYPE); \
263 }

◆ ISPRIMITIVETYPE_SPECIALIZE

#define ISPRIMITIVETYPE_SPECIALIZE ( TYPE)
Value:
if(typeName == #TYPE) { \
return true; \
}

Definition at line 275 of file Control/xAODRootAccess/Root/Utils.cxx.

275#define ISPRIMITIVETYPE_SPECIALIZE(TYPE) \
276 if(typeName == #TYPE) { \
277 return true; \
278 }

◆ TYPE_CHECK_INSTANTIATE

#define TYPE_CHECK_INSTANTIATE ( MACRO)
Value:
MACRO(std::int8_t) \
MACRO(std::uint8_t) \
MACRO(std::int16_t) \
MACRO(std::uint16_t) \
MACRO(std::int32_t) \
MACRO(std::uint32_t) \
MACRO(std::int64_t) \
MACRO(std::uint64_t) \
MACRO(char) \
MACRO(float) \
MACRO(double) \
MACRO(bool)

Macro instantiating another macro for all usual "primitive" types.

Definition at line 245 of file Control/xAODRootAccess/Root/Utils.cxx.

245#define TYPE_CHECK_INSTANTIATE(MACRO) \
246 MACRO(std::int8_t) \
247 MACRO(std::uint8_t) \
248 MACRO(std::int16_t) \
249 MACRO(std::uint16_t) \
250 MACRO(std::int32_t) \
251 MACRO(std::uint32_t) \
252 MACRO(std::int64_t) \
253 MACRO(std::uint64_t) \
254 MACRO(char) \
255 MACRO(float) \
256 MACRO(double) \
257 MACRO(bool)