ATLAS Offline Software
Loading...
Searching...
No Matches
RootTreeIndexContainer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3 * */
4
5#ifndef ROOTTREEINDEXCONTAINER_H
6#define ROOTTREEINDEXCONTAINER_H 1
7
8#include "RootTreeContainer.h"
9
10#include <cstdint>
11
12// Forward declarations
13class StatusCode;
14class TTree;
15class TBranch;
16
30
32 public:
33 explicit RootTreeIndexContainer(const std::string& name);
36
37 virtual ~RootTreeIndexContainer() override {}
38
40 virtual StatusCode open(DbDatabase&, const std::string&, const DbTypeInfo*, Io::IoFlag) override final;
41
43 virtual uint64_t nextRecordId() override final;
44
46 virtual void useNextRecordId( uint64_t ) override final;
47
49
55 virtual StatusCode loadObject( void** ptr, const DbTypeInfo* tinfo,
56 Token::OID_t& oid) override;
57
59 virtual StatusCode writeObject(ActionList::value_type&) override;
60
61 private:
63 TBranch* m_indexBranch;
64
66
69
71 Long64_t m_index;
72
74 int64_t m_indexBump;
75
78};
79
80#endif
Description: Handle managing a DbDatabaseObj, a generic Database object.
Definition DbDatabase.h:39
Definition of class DbTypeInfo.
Definition DbTypeInfo.h:31
RootTreeContainer(const std::string &name)
virtual StatusCode loadObject(void **ptr, const DbTypeInfo *tinfo, Token::OID_t &oid) override
Find object by object identifier and load it into memory.
virtual uint64_t nextRecordId() override final
Number of entries within the container.
RootTreeIndexContainer(const RootTreeIndexContainer &)=delete
RootTreeIndexContainer & operator=(const RootTreeIndexContainer &)=delete
bool m_firstRead
first object retrieval attempt flag (to rebuild index)
virtual StatusCode writeObject(ActionList::value_type &) override
Commit single entry to container.
Long64_t m_index
Index (64 bit) - using ROOT type that matches the earlier 'long long'.
TBranch * m_indexBranch
Pointer to index branch.
virtual ~RootTreeIndexContainer() override
int64_t m_indexBump
How much to increase nextRecordID to keep index values synced with other containers.
virtual void useNextRecordId(uint64_t) override final
Suggest next Record ID for tbe next object written - for synced indexes.
const uint32_t m_index_multi
Index multiplier (e.g. pid - ppid), fill in c'tor.
virtual StatusCode open(DbDatabase &, const std::string &, const DbTypeInfo *, Io::IoFlag) override final
Open the container.
RootTreeIndexContainer(const std::string &name)
virtual std::string name() const override
Get container name.
std::vector< DbAction > ActionList
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:22
::StatusCode StatusCode
StatusCode definition for legacy code.
#define private
Definition testRead.cxx:27