Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RFieldToken.hxx
Go to the documentation of this file.
1/// \file ROOT/RFieldToken.hxx
2/// \author Jonas Hahnfeld <jonas.hahnfeld@cern.ch>
3/// \date 2025-03-19
4
5/*************************************************************************
6 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. *
7 * All rights reserved. *
8 * *
9 * For the licensing terms see $ROOTSYS/LICENSE. *
10 * For the list of contributors see $ROOTSYS/README/CREDITS. *
11 *************************************************************************/
12
13#ifndef ROOT_RFieldToken
14#define ROOT_RFieldToken
15
16#include <cstddef> // for std::size_t
17#include <cstdint> // for std::uint64_t
18
19namespace ROOT {
20
21class REntry;
22class RNTupleModel;
23
24namespace Detail {
26} // namespace Detail
27
28// clang-format off
29/**
30\class ROOT::RFieldToken
31\ingroup NTuple
32\brief A field token identifies a (sub)field in an entry
33
34It can be used for fast indexing in REntry's methods, e.g. REntry::BindValue(). The field token can also be created by the model.
35*/
36// clang-format on
38 friend class REntry;
39 friend class RNTupleModel;
41
42 std::size_t fIndex = 0; ///< The index of the field (top-level or registered subfield)
43 std::uint64_t fSchemaId = std::uint64_t(-1); ///< Safety check to prevent tokens from other models being used
44 RFieldToken(std::size_t index, std::uint64_t schemaId) : fIndex(index), fSchemaId(schemaId) {}
45
46public:
47 RFieldToken() = default; // The default constructed token cannot be used by any entry
48};
49
50} // namespace ROOT
51
52#endif
A container of const raw pointers, corresponding to a row in the data set.
The REntry is a collection of values in an RNTuple corresponding to a complete row in the data set.
Definition REntry.hxx:54
friend class RNTupleModel
RFieldToken()=default
friend class REntry
std::size_t fIndex
The index of the field (top-level or registered subfield).
std::uint64_t fSchemaId
Safety check to prevent tokens from other models being used.
RFieldToken(std::size_t index, std::uint64_t schemaId)
The RNTupleModel encapulates the schema of an RNTuple.
Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target ty...
Definition TObject.h:395