Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Control/xAODRootAccess/xAODRootAccess/tools/Utils.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef XAODROOTACCESS_TOOLS_UTILS_H
8 #define XAODROOTACCESS_TOOLS_UTILS_H
9 
10 // Framework include(s).
11 #include "CxxUtils/sgkey_t.h"
12 
13 // ROOT include(s):
14 #include <TDataType.h>
15 #include <TTree.h>
16 
17 // System include(s):
18 #include <string>
19 #include <string_view>
20 #include <typeinfo>
21 #include <stdexcept>
22 extern "C" {
23 #include <stdint.h>
24 }
25 
26 namespace xAOD {
27 
28  namespace Utils {
29 
31  SG::sgkey_t hash( const std::string& key );
32 
35  std::string dynBranchPrefix( const std::string& key );
36 
39  std::string dynFieldPrefix( const std::string& key );
40 
42  const std::type_info& getTypeInfo( EDataType type );
43 
45  const std::type_info& getTypeInfo( std::string_view typeName );
46 
48  bool isPrimitiveType( std::string_view typeName );
49 
51  char rootType( char typeidType );
52 
54  std::string getTypeName( const std::type_info& ti );
55 
57  std::string getFirstBranchMatch( TTree* tree, const std::string& pre );
58 
59  } // namespace Utils
60 
61 } // namespace xAOD
62 
63 #endif // XAODROOTACCESS_TOOLS_UTILS_H
tree
TChain * tree
Definition: tile_monitor.h:30
xAOD::Utils::dynFieldPrefix
std::string dynFieldPrefix(const std::string &key)
This function is used to figure out what to name dynamic auxiliary field coming from a container call...
Definition: Control/xAODRootAccess/Root/Utils.cxx:170
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::Utils::isPrimitiveType
bool isPrimitiveType(std::string_view typeName)
Check if the type name describes a primitive type.
Definition: Control/xAODRootAccess/Root/Utils.cxx:278
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAOD::Utils::dynBranchPrefix
std::string dynBranchPrefix(const std::string &key)
This function is used to figure out what to name dynamic auxiliary branches coming from a container c...
Definition: Control/xAODRootAccess/Root/Utils.cxx:144
xAOD::Utils::getTypeName
std::string getTypeName(const std::type_info &ti)
This function is necessary in order to create type names that ROOT can understand.
Definition: Control/xAODRootAccess/Root/Utils.cxx:352
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
xAOD::Utils::getTypeInfo
const std::type_info & getTypeInfo(EDataType type)
This function is used when reading a primitive branch from an input file without the user explicitly ...
Definition: Control/xAODRootAccess/Root/Utils.cxx:194
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
xAOD::Utils::getFirstBranchMatch
std::string getFirstBranchMatch(TTree *tree, const std::string &pre)
This function is used to search for a branch in a TTree that contains a given substring.
Definition: Control/xAODRootAccess/Root/Utils.cxx:392
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
Utils
Definition: CaloCellSelectorUtils.cxx:10
xAOD::Utils::hash
SG::sgkey_t hash(const std::string &name)
This function provides a hashed version of the key (branch) names used in the xAOD file,...
Definition: Control/xAODRootAccess/Root/Utils.cxx:125
xAOD::Utils::rootType
char rootType(char typeidType)
This function is used internally in the code when creating primitive dynamic auxiliary branches.
Definition: Control/xAODRootAccess/Root/Utils.cxx:293
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37