ATLAS Offline Software
Loading...
Searching...
No Matches
TBranchAuxDynReader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TBRANCHAUXDYNREADER_H
6#define TBRANCHAUXDYNREADER_H
7
9#include "RootAuxDynReader.h"
10
11#include <map>
12#include <string>
13
14#include "TDataType.h"
15class TTree;
16class TClass;
17class TBranch;
18
20{
21public :
22
24 {
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;
38
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
57 // offset of the AxuStoreHolder base class in the objects read by the Reader
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
67
69 SG::auxid_t initBranch (bool standalone, const std::string& attr, TBranch* branch);
70};
71
72
73#endif
An auxiliary data store that holds data internally.
#define protected
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
TBranchAuxDynReader(TTree *tree, TBranch *base_branch)
SG::auxid_t initBranch(bool standalone, const std::string &attr, TBranch *branch)
std::map< std::string, TBranch * > m_branchMap
virtual void addReaderToObject(void *object, size_t ttree_row, std::recursive_mutex *iomtx=nullptr) override final
Attach specialized AuxStore for reading dynamic attributes.
BranchInfo & getBranchInfo(const SG::auxid_t &auxid, const SG::AuxStoreInternal &store)
std::map< SG::auxid_t, BranchInfo > m_branchInfos
void init(bool standalone)
STL class.
Forward declaration.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
STL namespace.
TChain * tree
#define private