ATLAS Offline Software
Loading...
Searching...
No Matches
RNTupleAuxDynReader.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 RNTUPLEAUXDYNREADER_H
6#define RNTUPLEAUXDYNREADER_H
7
10#include "RootAuxDynReader.h"
11
12#include "ROOT/RNTupleView.hxx"
13
14#include <map>
15#include <optional>
16#include <string>
17
18class TClass;
19
20namespace RootAuxDynIO
21{
23 {
24 public :
25
26 struct FieldInfo
27 {
29
30 TClass* tclass = 0;
31 TClass* SE_tclass = 0;
32
33 bool isPackedContainer = false;
34 bool needsSE = false;
36
38 std::string attribName;
39 std::string fieldName;
40 std::optional< ROOT::RNTupleView<void> > view;
41 };
42
43
45 RNTupleAuxDynReader(const std::string& field_name, const std::string& field_type, ROOT::RNTupleReader* reader);
46
48 void init(bool standalone);
49
51 virtual void addReaderToObject(void* object, size_t row, std::recursive_mutex* iomtx = nullptr ) override final;
52
54 FieldInfo& getFieldInfo(const SG::auxid_t& auxid, const SG::AuxStoreInternal& store);
55
56 ROOT::RNTupleReader* getNativeReader();
57
58 virtual ~RNTupleAuxDynReader() = default;
59
62 // offset of the AxuStoreHolder base class in the objects read by the Reader
64 bool m_initialized = false;
65 std::string m_key;
66
67 // map auxid -> fieldInfo.
69
70 // not owned
71 ROOT::RNTupleReader* m_ntupleReader;
72 };
73
74
75 inline ROOT::RNTupleReader* RNTupleAuxDynReader::getNativeReader() {
76 return m_ntupleReader;
77 }
78
79} //namespace
80#endif
81
An auxiliary data store that holds data internally.
#define protected
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
void init(bool standalone)
initialize once the mode of the Aux store is known
FieldInfo & getFieldInfo(const SG::auxid_t &auxid, const SG::AuxStoreInternal &store)
get field informatino for auxid
RNTupleAuxDynReader(const std::string &field_name, const std::string &field_type, ROOT::RNTupleReader *reader)
create Reader for Aux attributes of an AuxContainer object stored in a given field
virtual void addReaderToObject(void *object, size_t row, std::recursive_mutex *iomtx=nullptr) override final
attach RNTupleAuxStore to the current Aux container @object
ROOT::RNTupleReader * getNativeReader()
std::map< SG::auxid_t, FieldInfo > m_fieldInfos
STL class.
Selection rules: declare transient members.
Definition DataVector.h:581
Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple.
Forward declaration.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
STL namespace.
std::optional< ROOT::RNTupleView< void > > view