ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
APR
RootStorageSvc
src
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
13
class
StatusCode
;
14
class
TTree;
15
class
TBranch;
16
30
31
class
RootTreeIndexContainer
:
public
RootTreeContainer
{
32
public
:
33
explicit
RootTreeIndexContainer
(
const
std::string&
name
);
34
RootTreeIndexContainer
(
const
RootTreeIndexContainer
&) =
delete
;
35
RootTreeIndexContainer
&
operator=
(
const
RootTreeIndexContainer
&) =
delete
;
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
65
uint64_t
m_index_entries
;
66
68
const
uint32_t
m_index_multi
;
69
71
Long64_t
m_index
;
72
74
int64_t
m_indexBump
;
75
77
bool
m_firstRead
;
78
};
79
80
#endif
RootTreeContainer.h
DbDatabase
Description: Handle managing a DbDatabaseObj, a generic Database object.
Definition
DbDatabase.h:39
DbTypeInfo
Definition of class DbTypeInfo.
Definition
DbTypeInfo.h:31
RootTreeContainer::RootTreeContainer
RootTreeContainer(const std::string &name)
RootTreeIndexContainer::m_index_entries
uint64_t m_index_entries
Definition
RootTreeIndexContainer.h:65
RootTreeIndexContainer::loadObject
virtual StatusCode loadObject(void **ptr, const DbTypeInfo *tinfo, Token::OID_t &oid) override
Find object by object identifier and load it into memory.
RootTreeIndexContainer::nextRecordId
virtual uint64_t nextRecordId() override final
Number of entries within the container.
RootTreeIndexContainer::RootTreeIndexContainer
RootTreeIndexContainer(const RootTreeIndexContainer &)=delete
RootTreeIndexContainer::operator=
RootTreeIndexContainer & operator=(const RootTreeIndexContainer &)=delete
RootTreeIndexContainer::m_firstRead
bool m_firstRead
first object retrieval attempt flag (to rebuild index)
Definition
RootTreeIndexContainer.h:77
RootTreeIndexContainer::writeObject
virtual StatusCode writeObject(ActionList::value_type &) override
Commit single entry to container.
RootTreeIndexContainer::m_index
Long64_t m_index
Index (64 bit) - using ROOT type that matches the earlier 'long long'.
Definition
RootTreeIndexContainer.h:71
RootTreeIndexContainer::m_indexBranch
TBranch * m_indexBranch
Pointer to index branch.
Definition
RootTreeIndexContainer.h:63
RootTreeIndexContainer::~RootTreeIndexContainer
virtual ~RootTreeIndexContainer() override
Definition
RootTreeIndexContainer.h:37
RootTreeIndexContainer::m_indexBump
int64_t m_indexBump
How much to increase nextRecordID to keep index values synced with other containers.
Definition
RootTreeIndexContainer.h:74
RootTreeIndexContainer::useNextRecordId
virtual void useNextRecordId(uint64_t) override final
Suggest next Record ID for tbe next object written - for synced indexes.
RootTreeIndexContainer::m_index_multi
const uint32_t m_index_multi
Index multiplier (e.g. pid - ppid), fill in c'tor.
Definition
RootTreeIndexContainer.h:68
RootTreeIndexContainer::open
virtual StatusCode open(DbDatabase &, const std::string &, const DbTypeInfo *, Io::IoFlag) override final
Open the container.
RootTreeIndexContainer::RootTreeIndexContainer
RootTreeIndexContainer(const std::string &name)
TechContainerBase::name
virtual std::string name() const override
Get container name.
Definition
TechContainerBase.h:75
TechContainerBase::ActionList
std::vector< DbAction > ActionList
Definition
TechContainerBase.h:49
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
const
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0