ATLAS Offline Software
Loading...
Searching...
No Matches
RootAuxDynIO.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 ROOTAUXDYN_IO_H
6#define ROOTAUXDYN_IO_H
7
8#include "Gaudi/PluginService.h"
9
11
12namespace SG { class IAuxStoreIO; }
13class TClass;
14class TBranch;
15
16namespace RootAuxDynIO
17{
18
20 {
21 public:
22 AuxDynAttrAccess(TClass& tc);
23 bool hasAuxDynStore() const;
24
25 protected:
26 int auxStoreOffset(TClass &tc);
27 SG::IAuxStoreIO* castIOStore(void *object);
28
30 TClass& m_holderType;
33 };
34
35
40 std::string getKeyFromBranch(TBranch* branch);
41
42
44 {
45 public:
46 using Factory = Gaudi::PluginService::Factory< IFactoryTool*() >;
47
48 virtual std::unique_ptr<IRootAuxDynReader>
49 getBranchAuxDynReader(TTree*, TBranch*) const override final;
50
51 virtual std::unique_ptr<IRootAuxDynWriter>
52 getBranchAuxDynWriter(TTree&, TClass&, int bufferSize, int splitLevel,
53 int offsettab_len, bool do_branch_fill) const override final;
54
55 virtual std::unique_ptr<IRNTupleAuxDynWriter>
56 getNTupleAuxDynWriter(TClass &tc) const override final;
57
58 virtual std::unique_ptr<IRootAuxDynReader>
59 getNTupleAuxDynReader(const std::string& field_name, const std::string& field_type,
60 ROOT::RNTupleReader* reader) const override final;
61
63 virtual bool hasAuxStore(std::string_view fieldname, TClass *tc) const override final;
64
66 virtual bool hasAuxStoreIO(TClass *tc) const override final;
67
72 virtual bool isAuxDynBranch(TBranch *branch) const override final;
73 };
74
75}
76
77#endif
static Double_t tc
SG::IAuxStoreIO * castIOStore(void *object)
int m_ioStoreOffset
AuxStoreIO interface offset in the subclass type (for casting). negative means no inheritance.
TClass & m_holderType
TClass of the type containing the AuxStore with attributes.
virtual bool hasAuxStoreIO(TClass *tc) const override final
check if the type tc has IAuxStoreIO interface
virtual std::unique_ptr< IRNTupleAuxDynWriter > getNTupleAuxDynWriter(TClass &tc) const override final
virtual std::unique_ptr< IRootAuxDynWriter > getBranchAuxDynWriter(TTree &, TClass &, int bufferSize, int splitLevel, int offsettab_len, bool do_branch_fill) const override final
generate TBranchAuxDynWriter tree -> destination tree do_branch_fill -> flag telling to Fill each TBr...
Gaudi::PluginService::Factory< IFactoryTool *() > Factory
virtual bool isAuxDynBranch(TBranch *branch) const override final
Check is a branch holds AuxStore objects.
virtual bool hasAuxStore(std::string_view fieldname, TClass *tc) const override final
check if a field/branch with fieldname and type tc has IAuxStore interface
virtual std::unique_ptr< IRootAuxDynReader > getBranchAuxDynReader(TTree *, TBranch *) const override final
virtual std::unique_ptr< IRootAuxDynReader > getNTupleAuxDynReader(const std::string &field_name, const std::string &field_type, ROOT::RNTupleReader *reader) const override final
Interface providing I/O for a generic auxiliary store.
Definition IAuxStoreIO.h:44
Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple.
std::string getKeyFromBranch(TBranch *branch)
Exctract the Aux object SG Key from the branch name.
Forward declaration.