ATLAS Offline Software
Loading...
Searching...
No Matches
RootCollectionCursor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ROOTCOLLECTION_ROOTCOLLECTIONCURSOR_H
6#define ROOTCOLLECTION_ROOTCOLLECTIONCURSOR_H
7
8
10
14
15class TTree;
16class TBranch;
17class TEventList;
18
19namespace pool {
20 namespace RootCollection {
27 {
28 public:
29
32 const pool::CollectionRowBuffer& collectionRowBuffer,
33 TTree *tree,
34 const TEventList *evl );
35
36
38 virtual bool next() override;
39
41 virtual const pool::CollectionRowBuffer& currentRow() const override;
42
44 virtual std::size_t size() override;
45
47 virtual bool seek(std::size_t position) override;
48
50 virtual const Token& eventRef() const override;
51
53 virtual void close() override;
54
56
57 protected:
58
59 static const unsigned int c_maxLengthOfStrings = 5000;
60
62
65
66 const TEventList *m_eventList;
67
69
70 typedef std::vector< std::pair<TBranch*, std::string*> > AttrBranchVector_t;
71 typedef std::vector< std::pair<TBranch*, Token*> > TokenBranchVector_t;
72
75
76 std::size_t m_idx;
77 std::size_t m_entries;
79 };
80 }
81}
82
83#endif
84
85
This file contains the class definition for the Token class (migrated from POOL).
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
A class that acts as a buffer to be filled with the event reference and associated metadata values of...
An interface used to navigate the result of a query on a collection.
An interface used to define the properties of a collection to be constructed and to retrieve these pr...
pool::CollectionRowBuffer m_collectionRowBuffer
Row buffer containing Tokens and Attributes.
virtual bool seek(std::size_t position) override
Seeks the cursor to a given position in the collection.
const ICollectionDescription & m_description
virtual const Token & eventRef() const override
Returns the event reference Token for the current row.
virtual std::size_t size() override
Return the size of the collection.
std::vector< std::pair< TBranch *, Token * > > TokenBranchVector_t
virtual const pool::CollectionRowBuffer & currentRow() const override
Returns the selected Tokens and Attributes for the current row.
virtual bool next() override
Advances the cursor to the next row.
virtual void close() override
Cleanup.
std::vector< std::pair< TBranch *, std::string * > > AttrBranchVector_t
RootCollectionCursor(const pool::ICollectionDescription &description, const pool::CollectionRowBuffer &collectionRowBuffer, TTree *tree, const TEventList *evl)
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91
pool namespace
Definition libname.h:15
TChain * tree