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();
78 value +=
" (" + field.
GetType() +
")";
80 fOutput << fFrameSymbol << std::endl;
84 for (
auto iField = subFields.begin(); iField != subFields.end(); ) {
93 f->AcceptVisitor(visitor);
104 f->AcceptVisitor(visitor);
113 if (fPrintOptions.fPrintSingleLine)
116 for (
unsigned int i = 0; i < fLevel; ++i)
123 if (fPrintOptions.fPrintName)
124 fOutput <<
"\"" << field.
GetName() <<
"\": ";
134 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
139 iValue->GetField()->AcceptVisitor(elemVisitor);
141 if (++iValue == elems.end())
154 fOutput <<
"\"<unsupported type: " << field.
GetType() <<
">\"";
162 if (*fValue.Get<
bool>())
173 fOutput << *fValue.Get<
double>();
181 fOutput << *fValue.Get<
float>();
188 fOutput << *fValue.Get<
char>();
195 fOutput << *fValue.Get<std::int8_t>();
202 fOutput << *fValue.Get<std::int16_t>();
209 fOutput << *fValue.Get<
int>();
216 fOutput << *fValue.Get<std::int64_t>();
224 fOutput <<
"\"" << *fValue.Get<std::string>() <<
"\"";
232 fOutput << static_cast<int>(*fValue.Get<std::uint8_t>());
239 fOutput << *fValue.Get<std::uint16_t>();
246 fOutput << *fValue.Get<std::uint32_t>();
254 fOutput << *fValue.Get<std::uint64_t>();
260 PrintCollection(field);
270 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
271 if (!fPrintOptions.fPrintSingleLine)
272 fOutput << std::endl;
277 iValue->GetField()->AcceptVisitor(visitor);
279 if (++iValue == elems.end()) {
280 if (!fPrintOptions.fPrintSingleLine)
281 fOutput << std::endl;
285 if (fPrintOptions.fPrintSingleLine)
300 for (
auto iValue = elems.begin(); iValue != elems.end(); ) {
301 if (!fPrintOptions.fPrintSingleLine)
302 fOutput << std::endl;
307 iValue->GetField()->AcceptVisitor(visitor);
309 if (++iValue == elems.end()) {
310 if (!fPrintOptions.fPrintSingleLine)
311 fOutput << std::endl;
315 if (fPrintOptions.fPrintSingleLine)
326 PrintCollection(field);
332 PrintCollection(field);
341 int strSize{
static_cast<int>(str.size())};
342 if (strSize <= availableSpace)
343 return str + std::string(availableSpace - strSize,
' ');
344 else if (availableSpace < 3)
345 return std::string(availableSpace,
'.');
346 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< 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 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 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 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 an untyped record.
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 generic field for a (nested) std::vector<Type> except for std::vector<bool>