4#ifndef ROOTTREECONTAINER_H
5#define ROOTTREECONTAINER_H 1
54 void*
object =
nullptr;
108 std::string_view desc);
114 const std::string& desc,
117 int branchOffsetTabLen);
123 TBranch*
branch(
const std::string& nam)
const;
133 virtual StatusCode
close()
override;
137 const std::string& nam,
139 Io::IoFlag mod)
override;
143 const std::string& nam)
const override final;
160 virtual uint64_t
size()
override;
Description: Definition of the generic column in a (relational) Database.
Description: Handle managing a DbDatabaseObj, a generic Database object.
Description: Definition an option to be supplied to database objects.
Definition of class DbTypeInfo.
Interface for an AuxDyn Writer - TTree based.
Description: ROOT specific implementation of Database file.
bool m_isDirty
flag set when a branch container was updated (but the branch was not Filled)
bool isBranchContainer() const
is this a container in a TBranch? (regular ones take the whole TTree)
virtual StatusCode writeObject(ActionList::value_type &) override
Commit single entry to container.
DbDatabase m_dbH
Parent Database handle.
bool isDirty() const
return true if this branch container was updated and it's TTree needs to be Filled
virtual StatusCode open(DbDatabase &dbH, const std::string &nam, const DbTypeInfo *info, Io::IoFlag mod) override
Open the container for object access.
virtual ~RootTreeContainer()
virtual StatusCode loadObject(void **ptr, const DbTypeInfo *tinfo, Token::OID_t &oid) override
Find object by object identifier and load it into memory.
StatusCode finishTransAct()
TTree * m_tree
Reference to the root tree object.
void setTreeFillMode(bool mode)
set Tree Filling mode (true/false) for branch containers
virtual StatusCode close() override
Close the container and deallocate resources.
std::vector< BranchDesc > Branches
Definition of the branch container.
void setBranchOffsetTabLen(TBranch *b, int offsettab_len)
Recursively set Offset Table length for a branch and it's subbranches.
const std::string & getName() const
return the name of the container
virtual StatusCode setOption(const DbOption &opt) override
Set options.
StatusCode addBranch(const DbColumn *col, BranchDesc &dsc, std::string_view desc)
Add item branch.
bool m_treeFillMode
if True, branch container will not use Branch->Fill() but will be filled with its Tree by the databas...
TBranch * branch(const std::string &nam) const
Access branch by name.
virtual uint64_t size() override
Number of entries within the container.
Branches m_branches
Branch map.
std::unique_ptr< RootAuxDynIO::IFactoryTool > m_auxDynTool
Factory object from AuxDynIO plugin that creates AuxDyn readers and writers.
virtual StatusCode checkAccess(DbDatabase &dbH, const std::string &nam) const override final
Check if we can access the container for reading with the given type.
bool usingTreeFillMode() const
return true if this branch container is using TTree Filling mode
const DbTypeInfo * m_type
reference to exact type description
virtual StatusCode transAct(Transaction::Action action) override
Execute Transaction action.
TTree * getTTree()
return the TTree in which this container is stored
int m_ioBytes
Number of bytes written/read during last operation. Set to -1 if it failed.
StatusCode addObject(DbDatabase &dbH, const DbColumn *col, BranchDesc &dsc, const std::string &desc, int splitLevel, int bufferSize, int branchOffsetTabLen)
Add BLOB.
RootDatabase * m_rootDb
Root database file reference.
std::string m_branchName
Branch name, if branch is specified by user.
RootTreeContainer(const std::string &name)
void clearDirty()
clear the dirty status (used after containing TTree was Filled)
virtual StatusCode getOption(DbOption &opt) override
Access options.
std::string m_name
Container name.
TechContainerBase(const std::string &name)
virtual std::string name() const override
Get container name.
Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple.
Definiton of a branch descriptor.
std::unique_ptr< RootAuxDynIO::IRootAuxDynWriter > auxdyn_writer
BranchDesc & operator=(BranchDesc const &other)=delete
BranchDesc(BranchDesc &&other)=default
BranchDesc(TClass *cl, TBranch *b, TLeaf *l, void *o, const DbColumn *c)
std::unique_ptr< RootAuxDynIO::IRootAuxDynReader > auxdyn_reader
int aux_iostore_IFoffset
IOStore interface offset for object type in this branch (for casting).
BranchDesc & operator=(BranchDesc &&other)=default
BranchDesc(BranchDesc const &other)=delete