![]() |
|
|||
File indexing completed on 2025-09-16 09:08:32
0001 /// \file ROOT/RFieldToken.hxx 0002 /// \ingroup NTuple 0003 /// \author Jonas Hahnfeld <jonas.hahnfeld@cern.ch> 0004 /// \date 2025-03-19 0005 0006 /************************************************************************* 0007 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. * 0008 * All rights reserved. * 0009 * * 0010 * For the licensing terms see $ROOTSYS/LICENSE. * 0011 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0012 *************************************************************************/ 0013 0014 #ifndef ROOT_RFieldToken 0015 #define ROOT_RFieldToken 0016 0017 #include <cstddef> // for std::size_t 0018 #include <cstdint> // for std::uint64_t 0019 0020 namespace ROOT { 0021 0022 class REntry; 0023 class RNTupleModel; 0024 0025 namespace Experimental { 0026 namespace Detail { 0027 class RRawPtrWriteEntry; 0028 } // namespace Detail 0029 } // namespace Experimental 0030 0031 // clang-format off 0032 /** 0033 \class ROOT::RFieldToken 0034 \ingroup NTuple 0035 \brief A field token identifies a (sub)field in an entry 0036 0037 It can be used for fast indexing in REntry's methods, e.g. REntry::BindValue(). The field token can also be created by the model. 0038 */ 0039 // clang-format on 0040 class RFieldToken { 0041 friend class REntry; 0042 friend class RNTupleModel; 0043 friend class Experimental::Detail::RRawPtrWriteEntry; 0044 0045 std::size_t fIndex = 0; ///< The index of the field (top-level or registered subfield) 0046 std::uint64_t fSchemaId = std::uint64_t(-1); ///< Safety check to prevent tokens from other models being used 0047 RFieldToken(std::size_t index, std::uint64_t schemaId) : fIndex(index), fSchemaId(schemaId) {} 0048 0049 public: 0050 RFieldToken() = default; // The default constructed token cannot be used by any entry 0051 }; 0052 0053 } // namespace ROOT 0054 0055 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |