36 for (
auto f : subFields) {
38 f->AcceptVisitor(visitor);
64 SetAvailableSpaceForStrings();
69 fOutput << fFrameSymbol <<
' ';
71 std::string key = fTreePrefix;
72 key +=
"Field " + fFieldNoPrefix + std::to_string(fFieldNo);
76 std::string value = field.
GetName() +
" (" + field.
GetType() +
")";
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)
121 if (fPrintOptions.fPrintName)
122 fOutput <<
"\"" << field.
GetName() <<
"\": ";
132 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
137 iValue->GetField()->AcceptVisitor(elemVisitor);
139 if (++iValue == elems.end())
152 fOutput <<
"\"<unsupported type: " << field.
GetType() <<
">\"";
160 if (*fValue.Get<
bool>())
171 fOutput << *fValue.Get<
double>();
179 fOutput << *fValue.Get<
float>();
187 fOutput << *fValue.Get<
int>();
196 fOutput <<
"\"" << *fValue.Get<std::string>() <<
"\"";
204 fOutput << static_cast<int>(*fValue.Get<std::uint8_t>());
212 fOutput << *fValue.Get<std::uint32_t>();
220 fOutput << *fValue.Get<std::uint64_t>();
226 PrintCollection(field);
236 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
237 if (!fPrintOptions.fPrintSingleLine)
238 fOutput << std::endl;
243 iValue->GetField()->AcceptVisitor(visitor);
245 if (++iValue == elems.end()) {
246 if (!fPrintOptions.fPrintSingleLine)
247 fOutput << std::endl;
251 if (fPrintOptions.fPrintSingleLine)
262 PrintCollection(field);
268 PrintCollection(field);
277 int strSize{
static_cast<int>(str.size())};
278 if (strSize <= availableSpace)
279 return str + std::string(availableSpace - strSize,
' ');
280 else if (availableSpace < 3)
281 return std::string(availableSpace,
'.');
282 return std::string(str, 0, availableSpace - 3) +
"...";
std::string GetName() const
virtual std::vector< RFieldValue > SplitValue(const RFieldValue &value) const
Creates the list of direct child values given a value for this field.
std::string GetType() const
std::vector< const RFieldBase * > GetSubFields() const
The generic field for fixed size arrays, which do not need an offset column.
The field for a class with dictionary.
std::vector< Detail::RFieldValue > SplitValue(const Detail::RFieldValue &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.
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 VisitArrayField(const RArrayField &field) final
void VisitFloatField(const RField< float > &field) final
void VisitStringField(const RField< std::string > &field) final
void PrintName(const Detail::RFieldBase &field)
void VisitUInt8Field(const RField< std::uint8_t > &field) final
void VisitField(const Detail::RFieldBase &field) final
void PrintCollection(const Detail::RFieldBase &field)
void VisitUInt64Field(const RField< std::uint64_t > &field) final
void VisitBoolField(const RField< bool > &field) final
void VisitVectorField(const RVectorField &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 generic field for a (nested) std::vector<Type> except for std::vector<bool>