ATLAS Offline Software
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-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: Utils.h 601421 2014-06-12 11:44:08Z krasznaa $
8 #ifndef XAODROOTACCESS_TOOLS_UTILS_H
9 #define XAODROOTACCESS_TOOLS_UTILS_H
10 
11 // System include(s):
12 #include <string>
13 #include <typeinfo>
14 extern "C" {
15 # include <stdint.h>
16 }
17 
18 // ROOT include(s):
19 #include <TDataType.h>
20 #include <TTree.h>
21 
22 #include "CxxUtils/sgkey_t.h"
23 
24 namespace xAOD {
25 
26  namespace Utils {
27 
29  SG::sgkey_t hash( const std::string& key );
30 
32  std::string dynBranchPrefix( const std::string& key );
33 
35  const std::type_info& getTypeInfo( EDataType type );
36 
38  char rootType( char typeidType );
39 
41  std::string getTypeName( const std::type_info& ti );
42 
44  std::string getFirstBranchMatch( TTree* tree, const std::string& pre );
45 
46  } // namespace Utils
47 
48 } // namespace xAOD
49 
50 #endif // XAODROOTACCESS_TOOLS_UTILS_H
tree
TChain * tree
Definition: tile_monitor.h:30
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
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:285
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:169
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)
Search for branches, returns search term on no result.
Definition: Control/xAODRootAccess/Root/Utils.cxx:318
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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:226
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37