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