ATLAS Offline Software
Loading...
Searching...
No Matches
TTreeCollectionCursor.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 ROOTCOLLECTION_TTREECOLLECTIONCURSOR_H
6#define ROOTCOLLECTION_TTREECOLLECTIONCURSOR_H
7
8
12
13class Token;
14class TTree;
15class TBranch;
16
17namespace pool {
18 namespace RootCollection {
25 {
26 public:
27
30 const pool::CollectionRowBuffer& collectionRowBuffer,
31 TTree *tree );
32
34 virtual bool next() override;
35
37 virtual const pool::CollectionRowBuffer& currentRow() const override;
38
40 virtual std::size_t size() override;
41
43 virtual bool seek(std::size_t position) override;
44
46 virtual const Token& eventRef() const override;
47
49 virtual void close() override;
50
52
53 protected:
54
56
59
60 static const unsigned int c_maxLengthOfStrings = 5000;
62
63 typedef std::vector< std::pair<TBranch*, std::string*> > AttrBranchVector_t;
65 TBranch* m_tokenBranch;
66
67 std::size_t m_idx;
68 std::size_t m_entries;
69 };
70 }
71}
72
73#endif
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
An implementation used to define the properties of a collection to be constructed and to retrieve the...
A class representing a row of a collection.
An interface used to navigate the result of a query on a collection.
virtual void close() override
Cleanup.
virtual const Token & eventRef() const override
Returns the event reference Token for the current row.
std::vector< std::pair< TBranch *, std::string * > > AttrBranchVector_t
pool::CollectionRowBuffer m_collectionRowBuffer
Row buffer containing Tokens and Attributes.
TTreeCollectionCursor(const pool::CollectionDescription &description, const pool::CollectionRowBuffer &collectionRowBuffer, TTree *tree)
virtual bool next() override
Advances the cursor to the next row.
virtual std::size_t size() override
Return the size of the collection.
virtual bool seek(std::size_t position) override
Seeks the cursor to a given position in the collection.
virtual const pool::CollectionRowBuffer & currentRow() const override
Returns the selected Tokens and Attributes for the current row.
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91
Framework include files.
Definition libname.h:15
TChain * tree