ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaRoot
RootAuxDynIO
src
TBranchAuxDynReader.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TBRANCHAUXDYNREADER_H
6
#define TBRANCHAUXDYNREADER_H
7
8
#include "
AthContainers/AuxStoreInternal.h
"
9
#include "
RootAuxDynReader.h
"
10
11
#include <map>
12
#include <string>
13
14
#include "TDataType.h"
15
class
TTree;
16
class
TClass;
17
class
TBranch;
18
19
class
TBranchAuxDynReader
:
public
RootAuxDynReader
20
{
21
public :
22
23
struct
BranchInfo
24
{
25
enum
Status
{
NotInitialized
,
Initialized
,
TypeError
,
NotFound
};
26
27
TBranch*
branch
= 0;
28
TClass*
tclass
= 0;
29
EDataType
edtyp
= kOther_t;
30
31
// to handle type differences
32
bool
needsSE
=
false
;
33
TClass*
SE_tclass
= 0;
34
EDataType
SE_edt
= kOther_t;
35
36
bool
isPackedContainer
=
false
;
37
enum
Status
status
=
NotInitialized
;
38
39
SG::auxid_t
auxid
= 0;
40
std::string
attribName
;
41
42
void
setAddress
(
void
* data);
43
};
44
45
TBranchAuxDynReader
(TTree *
tree
, TBranch *base_branch);
46
47
void
init
(
bool
standalone);
48
49
virtual
void
addReaderToObject
(
void
*
object
,
size_t
ttree_row, std::recursive_mutex* iomtx =
nullptr
) override final;
50
51
BranchInfo
&
getBranchInfo
(
const
SG
::auxid_t& auxid,
const
SG
::AuxStoreInternal& store);
52
53
virtual ~
TBranchAuxDynReader
() = default;
54
55
protected
:
56
std
::
string
m_baseBranchName
;
57
// offset of the AxuStoreHolder base class in the objects read by the Reader
58
int
m_storeHolderOffset
= -1;
59
bool
m_initialized
= false;
60
std
::
string
m_key
;
61
62
TTree*
m_tree
=
nullptr
;
63
// map of attribute name to TBranch* as read from the file
64
std
::
map
<
std
::
string
, TBranch*>
m_branchMap
;
65
// map auxid -> branch info. not sure if it can be different from m_branchMap
66
std
::
map
<
SG
::auxid_t,
BranchInfo
>
m_branchInfos
;
67
68
private
:
69
SG
::auxid_t
initBranch
(
bool
standalone,
const
std
::
string
& attr, TBranch* branch);
70
};
71
72
73
#endif
AuxStoreInternal.h
An auxiliary data store that holds data internally.
RootAuxDynReader.h
RootAuxDynReader
Definition
RootAuxDynReader.h:14
TBranchAuxDynReader::m_baseBranchName
std::string m_baseBranchName
Definition
TBranchAuxDynReader.h:56
TBranchAuxDynReader::TBranchAuxDynReader
TBranchAuxDynReader(TTree *tree, TBranch *base_branch)
Definition
TBranchAuxDynReader.cxx:171
TBranchAuxDynReader::initBranch
SG::auxid_t initBranch(bool standalone, const std::string &attr, TBranch *branch)
Definition
TBranchAuxDynReader.cxx:202
TBranchAuxDynReader::m_branchMap
std::map< std::string, TBranch * > m_branchMap
Definition
TBranchAuxDynReader.h:64
TBranchAuxDynReader::addReaderToObject
virtual void addReaderToObject(void *object, size_t ttree_row, std::recursive_mutex *iomtx=nullptr) override final
Attach specialized AuxStore for reading dynamic attributes.
Definition
TBranchAuxDynReader.cxx:349
TBranchAuxDynReader::getBranchInfo
BranchInfo & getBranchInfo(const SG::auxid_t &auxid, const SG::AuxStoreInternal &store)
Definition
TBranchAuxDynReader.cxx:260
TBranchAuxDynReader::m_branchInfos
std::map< SG::auxid_t, BranchInfo > m_branchInfos
Definition
TBranchAuxDynReader.h:66
TBranchAuxDynReader::m_key
std::string m_key
Definition
TBranchAuxDynReader.h:60
TBranchAuxDynReader::m_initialized
bool m_initialized
Definition
TBranchAuxDynReader.h:59
TBranchAuxDynReader::m_tree
TTree * m_tree
Definition
TBranchAuxDynReader.h:62
TBranchAuxDynReader::init
void init(bool standalone)
Definition
TBranchAuxDynReader.cxx:247
TBranchAuxDynReader::m_storeHolderOffset
int m_storeHolderOffset
Definition
TBranchAuxDynReader.h:58
map
STL class.
const
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition
AuxTypes.h:27
std
STL namespace.
TBranchAuxDynReader::BranchInfo
Definition
TBranchAuxDynReader.h:24
TBranchAuxDynReader::BranchInfo::auxid
SG::auxid_t auxid
Definition
TBranchAuxDynReader.h:39
TBranchAuxDynReader::BranchInfo::setAddress
void setAddress(void *data)
Definition
TBranchAuxDynReader.cxx:143
TBranchAuxDynReader::BranchInfo::attribName
std::string attribName
Definition
TBranchAuxDynReader.h:40
TBranchAuxDynReader::BranchInfo::isPackedContainer
bool isPackedContainer
Definition
TBranchAuxDynReader.h:36
TBranchAuxDynReader::BranchInfo::tclass
TClass * tclass
Definition
TBranchAuxDynReader.h:28
TBranchAuxDynReader::BranchInfo::needsSE
bool needsSE
Definition
TBranchAuxDynReader.h:32
TBranchAuxDynReader::BranchInfo::branch
TBranch * branch
Definition
TBranchAuxDynReader.h:27
TBranchAuxDynReader::BranchInfo::Status
Status
Definition
TBranchAuxDynReader.h:25
TBranchAuxDynReader::BranchInfo::TypeError
@ TypeError
Definition
TBranchAuxDynReader.h:25
TBranchAuxDynReader::BranchInfo::Initialized
@ Initialized
Definition
TBranchAuxDynReader.h:25
TBranchAuxDynReader::BranchInfo::NotInitialized
@ NotInitialized
Definition
TBranchAuxDynReader.h:25
TBranchAuxDynReader::BranchInfo::NotFound
@ NotFound
Definition
TBranchAuxDynReader.h:25
TBranchAuxDynReader::BranchInfo::edtyp
EDataType edtyp
Definition
TBranchAuxDynReader.h:29
TBranchAuxDynReader::BranchInfo::SE_tclass
TClass * SE_tclass
Definition
TBranchAuxDynReader.h:33
TBranchAuxDynReader::BranchInfo::SE_edt
EDataType SE_edt
Definition
TBranchAuxDynReader.h:34
TBranchAuxDynReader::BranchInfo::status
enum Status status
Definition
TBranchAuxDynReader.h:37
protected
#define protected
Definition
testRead.cxx:26
private
#define private
Definition
testRead.cxx:27
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.17.0