ATLAS Offline Software
RootTreeIndexContainer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2023 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
13 class TTree;
14 class TBranch;
15 
16 namespace pool {
34  public:
37 
40 
43 
45  virtual DbStatus open(DbDatabase&, const std::string&, const DbTypeInfo*, DbAccessMode) override final;
46 
48  virtual uint64_t nextRecordId() override final;
49 
51  virtual void useNextRecordId( uint64_t ) override final;
52 
54 
60  virtual DbStatus loadObject( void** ptr, ShapeH shape,
61  Token::OID_t& oid) override;
62 
65 
66  private:
68  TBranch* m_indexBranch;
69 
71 
74 
76  Long64_t m_index;
77 
79  int64_t m_indexBump;
80 
83  };
84 }
85 #endif //POOL_ROOTTREEINDEXCONTAINER_H
pool::DbAccessMode
int DbAccessMode
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:47
pool::DbStatus
Definition: DbStatus.h:67
pool::RootTreeIndexContainer::useNextRecordId
virtual void useNextRecordId(uint64_t) override final
Suggest next Record ID for tbe next object written - for synced indexes.
pool::RootTreeIndexContainer::open
virtual DbStatus open(DbDatabase &, const std::string &, const DbTypeInfo *, DbAccessMode) override final
Open the container.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
pool::RootTreeIndexContainer::writeObject
virtual DbStatus writeObject(ActionList::value_type &) override
Commit single entry to container.
RootTreeContainer.h
pool
pool namespace
Definition: libname.h:15
pool::RootTreeIndexContainer::m_index_entries
uint64_t m_index_entries
Definition: RootTreeIndexContainer.h:70
pool::RootTreeIndexContainer::nextRecordId
virtual uint64_t nextRecordId() override final
Number of entries within the container.
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
pool::RootTreeIndexContainer::m_index_multi
const uint32_t m_index_multi
Index multiplier (e.g. pid - ppid), fill in c'tor.
Definition: RootTreeIndexContainer.h:73
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
pool::RootTreeIndexContainer::m_firstRead
bool m_firstRead
first object retrieval attempt flag (to rebuild index)
Definition: RootTreeIndexContainer.h:82
pool::ShapeH
const class Shape * ShapeH
Definition: DbContainerObj.h:27
pool::RootTreeIndexContainer::operator=
RootTreeIndexContainer & operator=(const RootTreeIndexContainer &)=delete
pool::RootTreeIndexContainer
Definition: RootTreeIndexContainer.h:33
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
pool::RootTreeIndexContainer::m_indexBranch
TBranch * m_indexBranch
Pointer to index branch.
Definition: RootTreeIndexContainer.h:68
pool::RootTreeContainer
Definition: RootTreeContainer.h:60
pool::DbContainerImp::ActionList
std::vector< DbAction > ActionList
Definition: DbContainerImp.h:63
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
pool::RootTreeIndexContainer::m_indexBump
int64_t m_indexBump
How much to increase nextRecordID to keep index values synced with other containers.
Definition: RootTreeIndexContainer.h:79
pool::RootTreeIndexContainer::m_index
Long64_t m_index
Index (64 bit) - using ROOT type that matches the earlier 'long long'.
Definition: RootTreeIndexContainer.h:76
pool::RootTreeIndexContainer::loadObject
virtual DbStatus loadObject(void **ptr, ShapeH shape, Token::OID_t &oid) override
Find object by object identifier and load it into memory.
pool::RootTreeIndexContainer::RootTreeIndexContainer
RootTreeIndexContainer()
Standard constructor.
pool::DbDatabase
Definition: DbDatabase.h:53
value_type
Definition: EDM_MasterSearch.h:11
pool::RootTreeIndexContainer::RootTreeIndexContainer
RootTreeIndexContainer(const RootTreeIndexContainer &)=delete
pool::DbTypeInfo
Definition: DbTypeInfo.h:47
pool::RootTreeIndexContainer::~RootTreeIndexContainer
virtual ~RootTreeIndexContainer()
Standard destructor.
Definition: RootTreeIndexContainer.h:42