35 for (
auto f : subFields) {
37 f->AcceptVisitor(visitor);
63 SetAvailableSpaceForStrings();
68 fOutput << fFrameSymbol <<
' ';
70 std::string key = fTreePrefix;
71 key +=
"Field " + fFieldNoPrefix + std::to_string(fFieldNo);
79 fOutput << fFrameSymbol << std::endl;
83 for (
auto iField = subFields.begin(); iField != subFields.end(); ) {
92 f->AcceptVisitor(visitor);
103 f->AcceptVisitor(visitor);
112 if (fPrintOptions.fPrintSingleLine)
115 for (
unsigned int i = 0; i < fLevel; ++i)
122 if (fPrintOptions.fPrintName)
123 fOutput <<
"\"" << field.
GetName() <<
"\": ";
133 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
138 iValue->GetField()->AcceptVisitor(elemVisitor);
140 if (++iValue == elems.end())
153 fOutput <<
"\"<unsupported type: " << field.
GetType() <<
">\"";
161 if (*fValue.Get<
bool>())
172 fOutput << *fValue.Get<
double>();
180 fOutput << *fValue.Get<
float>();
187 fOutput << *fValue.Get<
char>();
194 fOutput << *fValue.Get<std::int8_t>();
201 fOutput << *fValue.Get<std::int16_t>();
208 fOutput << *fValue.Get<
int>();
215 fOutput << *fValue.Get<std::int64_t>();
223 fOutput <<
"\"" << *fValue.Get<std::string>() <<
"\"";
231 fOutput << static_cast<int>(*fValue.Get<std::uint8_t>());
238 fOutput << *fValue.Get<std::uint16_t>();
245 fOutput << *fValue.Get<std::uint32_t>();
253 fOutput << *fValue.Get<std::uint64_t>();
261 fOutput << *fValue.Get<std::uint32_t>();
265 fOutput << *fValue.Get<std::uint64_t>();
268 R__ASSERT(
false &&
"unsupported cardinality size type");
273 constexpr auto nBitsULong =
sizeof(
unsigned long) * 8;
274 const auto *asULongArray = fValue.Get<
unsigned long>();
281 for (std::size_t word = 0; word < (field.
GetN() + nBitsULong - 1) / nBitsULong; ++word) {
282 for (std::size_t
mask = 0; (
mask < nBitsULong) && (i < field.
GetN()); ++
mask, ++i) {
283 bool isSet = (asULongArray[word] & (
static_cast<unsigned long>(1) <<
mask)) != 0;
284 str = std::to_string(isSet) + str;
287 fOutput << str <<
"\"";
292 PrintCollection(field);
302 for (
auto iValue = elems.begin(); iValue != elems.end();) {
303 if (!fPrintOptions.fPrintSingleLine)
304 fOutput << std::endl;
309 iValue->GetField()->AcceptVisitor(visitor);
311 if (++iValue == elems.end()) {
312 if (!fPrintOptions.fPrintSingleLine)
313 fOutput << std::endl;
317 if (fPrintOptions.fPrintSingleLine)
332 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
333 if (!fPrintOptions.fPrintSingleLine)
334 fOutput << std::endl;
339 iValue->GetField()->AcceptVisitor(visitor);
341 if (++iValue == elems.end()) {
342 if (!fPrintOptions.fPrintSingleLine)
343 fOutput << std::endl;
347 if (fPrintOptions.fPrintSingleLine)
367 elems[0].GetField()->AcceptVisitor(visitor);
375 auto intValue = field.
SplitValue(fValue)[0].GetNonOwningCopy();
380 intValue.GetField()->AcceptVisitor(visitor);
385 PrintCollection(field);
390 PrintCollection(field);
395 PrintCollection(field);
400 PrintCollection(field);
408 int strSize{
static_cast<int>(str.size())};
409 if (strSize <= availableSpace)
410 return str + std::string(availableSpace - strSize,
' ');
411 else if (availableSpace < 3)
412 return std::string(availableSpace,
'.');
413 return std::string(str, 0, availableSpace - 3) +
"...";
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
A field translates read and write calls from/to underlying columns to/from tree values.
std::string GetName() const
std::string GetType() const
virtual std::vector< RValue > SplitValue(const RValue &value) const
Creates the list of direct child values given a value for this field.
std::vector< RFieldBase * > GetSubFields() const
The generic field for fixed size arrays, which do not need an offset column.
The generic field an std::bitset<N>.
std::size_t GetN() const
Get the number of bits in the bitset, i.e. the N in std::bitset<N>
An artificial field that transforms an RNTuple column that contains the offset of collections into co...
const RField< RNTupleCardinality< std::uint32_t > > * As32Bit() const
const RField< RNTupleCardinality< std::uint64_t > > * As64Bit() const
The field for a class with dictionary.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
The field for an unscoped or scoped enum with dictionary.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
The container field for an ntuple model, which itself has no physical representation.
Classes with dictionaries that can be inspected by TClass.
The field for values that may or may not be present in an entry.
Visitor used for a pre-processing run to collect information needed by another visitor class.
void VisitField(const Detail::RFieldBase &field) final
unsigned int fDeepestLevel
void VisitFieldZero(const RFieldZero &field) final
Contains settings for printing and prints a summary of an RField instance.
void SetDeepestLevel(int d)
std::string fFieldNoPrefix
void VisitField(const Detail::RFieldBase &field) final
Prints summary of Field.
void VisitFieldZero(const RFieldZero &fieldZero) final
Renders a JSON value corresponding to the field.
void VisitVectorBoolField(const RField< std::vector< bool > > &field) final
void VisitDoubleField(const RField< double > &field) final
void VisitUInt16Field(const RField< std::uint16_t > &field) final
void VisitArrayField(const RArrayField &field) final
void VisitFloatField(const RField< float > &field) final
void VisitRecordField(const RRecordField &field) final
void VisitStringField(const RField< std::string > &field) final
void VisitInt8Field(const RField< std::int8_t > &field) final
void VisitNullableField(const RNullableField &field) final
void PrintName(const Detail::RFieldBase &field)
void VisitUInt8Field(const RField< std::uint8_t > &field) final
void VisitBitsetField(const RBitsetField &field) final
void VisitCardinalityField(const RCardinalityField &field) final
void VisitField(const Detail::RFieldBase &field) final
void PrintCollection(const Detail::RFieldBase &field)
void VisitRVecField(const RRVecField &field) final
void VisitUInt64Field(const RField< std::uint64_t > &field) final
void VisitEnumField(const REnumField &field) final
void VisitBoolField(const RField< bool > &field) final
void VisitProxiedCollectionField(const RProxiedCollectionField &field) final
void VisitInt16Field(const RField< std::int16_t > &field) final
void VisitVectorField(const RVectorField &field) final
void VisitCharField(const RField< char > &field) final
void VisitInt64Field(const RField< std::int64_t > &field) final
void VisitClassField(const RClassField &field) final
void VisitIntField(const RField< int > &field) final
void VisitUInt32Field(const RField< std::uint32_t > &field) final
The field for a class representing a collection of elements via TVirtualCollectionProxy.
The type-erased field for a RVec<Type>
The field for an untyped record.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
The generic field for a (nested) std::vector<Type> except for std::vector<bool>