Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REntry.cxx
Go to the documentation of this file.
1/// \file REntry.cxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2018-10-15
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#include <ROOT/REntry.hxx>
17#include <ROOT/RError.hxx>
18
19#include <algorithm>
20
22{
23 fValues.emplace_back(std::move(value));
24}
25
26void ROOT::Experimental::REntry::CaptureValueUnsafe(std::string_view fieldName, void *where)
27{
28 for (std::size_t i = 0; i < fValues.size(); ++i) {
29 if (fValues[i].GetField()->GetName() != fieldName)
30 continue;
31 fValues[i] = fValues[i].GetField()->BindValue(where);
32 return;
33 }
34 throw RException(R__FAIL("invalid field name: " + std::string(fieldName)));
35}
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
Definition RError.hxx:303
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
Definition RField.hxx:140
void AddValue(Detail::RFieldBase::RValue &&value)
Definition REntry.cxx:21
std::vector< Detail::RFieldBase::RValue > fValues
Corresponds to the top-level fields of the linked model.
Definition REntry.hxx:48
void CaptureValueUnsafe(std::string_view fieldName, void *where)
Definition REntry.cxx:26
Base class for all ROOT issued exceptions.
Definition RError.hxx:78