34 for (
auto f : subFields) {
36 f->AcceptVisitor(visitor);
62 SetAvailableSpaceForStrings();
67 fOutput << fFrameSymbol <<
' ';
69 std::string key = fTreePrefix;
70 key +=
"Field " + fFieldNoPrefix + std::to_string(fFieldNo);
78 fOutput << fFrameSymbol << std::endl;
82 for (
auto iField = subFields.begin(); iField != subFields.end(); ) {
91 f->AcceptVisitor(visitor);
102 f->AcceptVisitor(visitor);
111 if (fPrintOptions.fPrintSingleLine)
114 for (
unsigned int i = 0; i < fLevel; ++i)
120 if (fPrintOptions.fPrintName)
130 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
135 iValue->GetField().AcceptVisitor(elemVisitor);
137 if (++iValue == elems.end())
149 fOutput <<
"\"<unsupported type: " << field.
GetTypeName() <<
">\"";
157 if (fValue.GetRef<
bool>())
168 fOutput << fValue.GetRef<
double>();
176 fOutput << fValue.GetRef<
float>();
183 char prev = std::cout.fill();
184 fOutput <<
"0x" << std::setw(2) << std::setfill(
'0') << std::hex << (fValue.GetRef<
unsigned char>() & 0xff);
185 fOutput << std::resetiosflags(std::ios_base::basefield);
186 std::cout.fill(prev);
193 fOutput << fValue.GetRef<
char>();
200 fOutput << fValue.GetRef<std::int8_t>();
207 fOutput << fValue.GetRef<std::int16_t>();
214 fOutput << fValue.GetRef<
int>();
221 fOutput << fValue.GetRef<std::int64_t>();
229 fOutput <<
"\"" << fValue.GetRef<std::string>() <<
"\"";
236 fOutput << static_cast<int>(fValue.GetRef<std::uint8_t>());
243 fOutput << fValue.GetRef<std::uint16_t>();
250 fOutput << fValue.GetRef<std::uint32_t>();
258 fOutput << fValue.GetRef<std::uint64_t>();
266 fOutput << fValue.GetRef<std::uint32_t>();
270 fOutput << fValue.GetRef<std::uint64_t>();
273 R__ASSERT(
false &&
"unsupported cardinality size type");
278 constexpr auto nBitsULong =
sizeof(
unsigned long) * 8;
279 const auto *asULongArray = fValue.GetPtr<
unsigned long>().get();
286 for (std::size_t word = 0; word < (field.
GetN() + nBitsULong - 1) / nBitsULong; ++word) {
287 for (std::size_t
mask = 0; (
mask < nBitsULong) && (i < field.
GetN()); ++
mask, ++i) {
288 bool isSet = (asULongArray[word] & (
static_cast<unsigned long>(1) <<
mask)) != 0;
289 str = std::to_string(isSet) + str;
292 fOutput << str <<
"\"";
297 PrintCollection(field);
302 PrintCollection(field);
311 for (
auto iValue = elems.begin(); iValue != elems.end();) {
312 if (!fPrintOptions.fPrintSingleLine)
313 fOutput << std::endl;
318 iValue->GetField().AcceptVisitor(visitor);
320 if (++iValue == elems.end()) {
321 if (!fPrintOptions.fPrintSingleLine)
322 fOutput << std::endl;
326 if (fPrintOptions.fPrintSingleLine)
341 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
342 if (!fPrintOptions.fPrintSingleLine)
343 fOutput << std::endl;
348 iValue->GetField().AcceptVisitor(visitor);
350 if (++iValue == elems.end()) {
351 if (!fPrintOptions.fPrintSingleLine)
352 fOutput << std::endl;
356 if (fPrintOptions.fPrintSingleLine)
376 elems[0].GetField().AcceptVisitor(visitor);
389 intValue.GetField().AcceptVisitor(visitor);
401 itemValue.GetField().AcceptVisitor(visitor);
406 PrintCollection(field);
411 PrintCollection(field);
416 PrintCollection(field);
421 PrintCollection(field);
429 int strSize{
static_cast<int>(str.size())};
430 if (strSize <= availableSpace)
431 return str + std::string(availableSpace - strSize,
' ');
432 else if (availableSpace < 3)
433 return std::string(availableSpace,
'.');
434 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 for fixed-size arrays that are represented as RVecs in memory.
The generic field for fixed size arrays, which do not need an offset column.
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 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.
A field translates read and write calls from/to underlying columns to/from tree values.
std::string GetFieldName() const
std::vector< RFieldBase * > GetSubFields()
std::string GetTypeName() const
virtual std::vector< RValue > SplitValue(const RValue &value) const
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.
unsigned int fDeepestLevel
void VisitField(const RFieldBase &field) final
void VisitFieldZero(const RFieldZero &field) final
Contains settings for printing and prints a summary of an RField instance.
void VisitField(const RFieldBase &field) final
Prints summary of Field.
void SetDeepestLevel(int d)
std::string fFieldNoPrefix
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 PrintName(const RFieldBase &field)
void VisitNullableField(const RNullableField &field) final
void VisitUInt8Field(const RField< std::uint8_t > &field) final
void VisitBitsetField(const RBitsetField &field) final
void VisitCardinalityField(const RCardinalityField &field) final
void VisitAtomicField(const RAtomicField &field) final
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 VisitField(const RFieldBase &field) final
void VisitProxiedCollectionField(const RProxiedCollectionField &field) final
void VisitInt16Field(const RField< std::int16_t > &field) final
void VisitArrayAsRVecField(const RArrayAsRVecField &field) final
void VisitByteField(const RField< std::byte > &field) final
void PrintCollection(const RFieldBase &field)
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>