Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFieldToken.hxx
Go to the documentation of this file.
1/// \file ROOT/RFieldToken.hxx
2/// \ingroup NTuple
3/// \author Jonas Hahnfeld <jonas.hahnfeld@cern.ch>
4/// \date 2025-03-19
5
6/*************************************************************************
7 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. *
8 * All rights reserved. *
9 * *
10 * For the licensing terms see $ROOTSYS/LICENSE. *
11 * For the list of contributors see $ROOTSYS/README/CREDITS. *
12 *************************************************************************/
13
14#ifndef ROOT_RFieldToken
15#define ROOT_RFieldToken
16
17#include <cstddef> // for std::size_t
18#include <cstdint> // for std::uint64_t
19
20namespace ROOT {
21
22class REntry;
23class RNTupleModel;
24
25namespace Detail {
26class RRawPtrWriteEntry;
27} // namespace Detail
28
29// clang-format off
30/**
31\class ROOT::RFieldToken
32\ingroup NTuple
33\brief A field token identifies a (sub)field in an entry
34
35It can be used for fast indexing in REntry's methods, e.g. REntry::BindValue(). The field token can also be created by the model.
36*/
37// clang-format on
39 friend class REntry;
40 friend class RNTupleModel;
42
43 std::size_t fIndex = 0; ///< The index of the field (top-level or registered subfield)
44 std::uint64_t fSchemaId = std::uint64_t(-1); ///< Safety check to prevent tokens from other models being used
45 RFieldToken(std::size_t index, std::uint64_t schemaId) : fIndex(index), fSchemaId(schemaId) {}
46
47public:
48 RFieldToken() = default; // The default constructed token cannot be used by any entry
49};
50
51} // namespace ROOT
52
53#endif
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
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:47
A field token identifies a (sub)field in an entry.
RFieldToken()=default
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.