ATLAS Offline Software
RNTCollectionCursor.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 RNTCOLLECTIONCURSOR_H
6 #define RNTCOLLECTIONCURSOR_H
7 
8 
10 
14 
17 
18 #include <memory>
19 #include <map>
20 
21 namespace ROOT::Experimental {
22  class RNTupleReader;
23  class REntry;
24 }
25 
26 namespace pool {
27  namespace RootCollection {
28 
31 
39  virtual public IPositionSeek,
40  virtual public implements<ICollectionSize>
41  {
42  public:
43 
46  const pool::CollectionRowBuffer& collectionRowBuffer,
48 
49 
51  virtual bool next() override;
52 
54  virtual const pool::CollectionRowBuffer& currentRow() const override;
55 
57  virtual bool seek(long long int position) override;
58 
60  virtual int size() override;
61 
63  virtual const Token& eventRef() const override;
64 
66  virtual void close() override;
67 
69 
70  protected:
71 
73 
75 
77  std::unique_ptr< REntry > m_RNTEntry;
78 
81 
83  std::vector< std::pair< Token*, std::string > > m_tokens;
84 
85  int m_idx;
86  bool m_dummyRef;
87  };
88  }
89 }
90 
91 #endif
pool::RootCollection::RNTCollectionCursor::next
virtual bool next() override
Advances the cursor to the next row of the query result set.
pool::RootCollection::RNTCollectionCursor::RNTCollectionCursor
RNTCollectionCursor(const pool::ICollectionDescription &description, const pool::CollectionRowBuffer &collectionRowBuffer, RNTupleReader *reader)
ICollectionCursor.h
pool
pool namespace
Definition: libname.h:15
pool::RootCollection::RNTupleReader
ROOT::Experimental::RNTupleReader RNTupleReader
Definition: RNTCollection.h:38
pool::RootCollection::RNTCollectionCursor::m_RNTEntry
std::unique_ptr< REntry > m_RNTEntry
RNtuple row with Field addresses set to collectionRowBuffer attributes.
Definition: RNTCollectionCursor.h:77
pool::RootCollection::RNTCollectionCursor::eventRef
virtual const Token & eventRef() const override
Returns the event reference Token for the current row.
ICollectionSize.h
Abstract interface for finding the size of an event collection.
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
CollectionRowBuffer.h
pool::RootCollection::RNTCollectionCursor::m_RNTReader
RNTupleReader * m_RNTReader
Definition: RNTCollectionCursor.h:74
RNTupleReader
ROOT::Experimental::RNTupleReader RNTupleReader
Definition: RNTCollectionSchemaEditor.h:21
pool::RootCollection::RNTCollectionCursor::~RNTCollectionCursor
virtual ~RNTCollectionCursor()
IPositionSeek.h
Abstract interface for seeking within an event stream.
pool::RootCollection::RNTCollectionCursor::seek
virtual bool seek(long long int position) override
Seeks the cursor to a given position in the collection.
pool::ICollectionCursor
Definition: ICollectionCursor.h:21
pool::CollectionRowBuffer
Definition: CollectionRowBuffer.h:31
pool::RootCollection::RNTCollectionCursor::m_description
const ICollectionDescription & m_description
Definition: RNTCollectionCursor.h:72
pool::RootCollection::RNTCollectionCursor
Definition: RNTCollectionCursor.h:41
pool::RootCollection::RNTCollectionCursor::m_idx
int m_idx
Definition: RNTCollectionCursor.h:85
pool::RootCollection::RNTCollectionCursor::m_collectionRowBuffer
pool::CollectionRowBuffer m_collectionRowBuffer
Row buffer containing Tokens and Attributes selected by query.
Definition: RNTCollectionCursor.h:80
pool::RootCollection::RNTCollectionCursor::currentRow
virtual const pool::CollectionRowBuffer & currentRow() const override
Returns the selected Tokens and Attributes for the current row of the query result set.
pool::IPositionSeek
Abstract interface for seeking inside a collection.
Definition: IPositionSeek.h:26
RootStorageSvc::REntry
ROOT::Experimental::REntry REntry
Definition: RNTupleWriterHelper.h:25
ROOT::Experimental
Definition: RNTCollection.h:28
collisions.reader
reader
read the goodrunslist xml file(s)
Definition: collisions.py:22
ICollectionDescription.h
Token.h
This file contains the class definition for the Token class (migrated from POOL).
pool::RootCollection::RNTCollectionCursor::close
virtual void close() override
Cleanup.
pool::RootCollection::RNTCollectionCursor::m_tokens
std::vector< std::pair< Token *, std::string > > m_tokens
"Token rowBuffer" for reading Tokens as strings and converting them later
Definition: RNTCollectionCursor.h:83
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
pool::RootCollection::RNTCollectionCursor::m_dummyRef
bool m_dummyRef
Definition: RNTCollectionCursor.h:86
pool::RootCollection::RNTCollectionCursor::size
virtual int size() override
Return the size of the collection.