ATLAS Offline Software
Loading...
Searching...
No Matches
RootTreeIndexContainer.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 POOL_ROOTTREEINDEXCONTAINER_H
6#define POOL_ROOTTREEINDEXCONTAINER_H 1
7
8#include "RootTreeContainer.h"
9
10#include <cstdint>
11
12// Forward declarations
13class TTree;
14class TBranch;
15
16namespace pool {
32
34 public:
35 explicit RootTreeIndexContainer(const std::string& name);
38
39 virtual ~RootTreeIndexContainer() override {}
40
42 virtual DbStatus open(DbDatabase&, const std::string&, const DbTypeInfo*, DbAccessMode) override final;
43
45 virtual uint64_t nextRecordId() override final;
46
48 virtual void useNextRecordId( uint64_t ) override final;
49
51
57 virtual DbStatus loadObject( void** ptr, ShapeH shape,
58 Token::OID_t& oid) override;
59
62
63 private:
65 TBranch* m_indexBranch;
66
68
71
73 Long64_t m_index;
74
76 int64_t m_indexBump;
77
80 };
81}
82#endif //POOL_ROOTTREEINDEXCONTAINER_H
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
virtual std::string name() const override
Get container name.
std::vector< DbAction > ActionList
Description: Handle managing a DbDatabaseObj, a generic Database object.
Definition DbDatabase.h:53
This class is highly inspired by the error code distribution system as it is used in DEC/VMS or MS/WN...
Definition DbStatus.h:64
Definition of class DbTypeInfo.
Definition DbTypeInfo.h:47
RootTreeContainer(const std::string &name)
bool m_firstRead
first object retrieval attempt flag (to rebuild index)
TBranch * m_indexBranch
Pointer to index branch.
Long64_t m_index
Index (64 bit) - using ROOT type that matches the earlier 'long long'.
RootTreeIndexContainer(const std::string &name)
RootTreeIndexContainer(const RootTreeIndexContainer &)=delete
virtual DbStatus open(DbDatabase &, const std::string &, const DbTypeInfo *, DbAccessMode) override final
Open the container.
const uint32_t m_index_multi
Index multiplier (e.g. pid - ppid), fill in c'tor.
virtual uint64_t nextRecordId() override final
Number of entries within the container.
RootTreeIndexContainer & operator=(const RootTreeIndexContainer &)=delete
virtual DbStatus writeObject(ActionList::value_type &) override
Commit single entry to container.
virtual DbStatus loadObject(void **ptr, ShapeH shape, Token::OID_t &oid) override
Find object by object identifier and load it into memory.
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.
pool namespace
Definition libname.h:15
const class Shape * ShapeH
#define private