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())
151 for (
auto iValue = elems.begin(); iValue != elems.end();) {
152 if (!fPrintOptions.fPrintSingleLine)
153 fOutput << std::endl;
158 iValue->GetField().AcceptVisitor(visitor);
160 if (++iValue == elems.end()) {
161 if (!fPrintOptions.fPrintSingleLine)
162 fOutput << std::endl;
166 if (fPrintOptions.fPrintSingleLine)
178 fOutput <<
"\"<unsupported type: " << field.
GetTypeName() <<
">\"";
186 if (fValue.GetRef<
bool>())
197 fOutput << fValue.GetRef<
double>();
205 fOutput << fValue.GetRef<
float>();
212 char prev = std::cout.fill();
213 fOutput <<
"0x" << std::setw(2) << std::setfill(
'0') << std::hex << (fValue.GetRef<
unsigned char>() & 0xff);
214 fOutput << std::resetiosflags(std::ios_base::basefield);
215 std::cout.fill(prev);
222 fOutput << fValue.GetRef<
char>();
229 fOutput << fValue.GetRef<std::int8_t>();
236 fOutput << fValue.GetRef<std::int16_t>();
243 fOutput << fValue.GetRef<std::int32_t>();
250 fOutput << fValue.GetRef<std::int64_t>();
258 fOutput <<
"\"" << fValue.GetRef<std::string>() <<
"\"";
265 fOutput << static_cast<int>(fValue.GetRef<std::uint8_t>());
272 fOutput << fValue.GetRef<std::uint16_t>();
279 fOutput << fValue.GetRef<std::uint32_t>();
286 fOutput << fValue.GetRef<std::uint64_t>();
294 fOutput << fValue.GetRef<std::uint32_t>();
298 fOutput << fValue.GetRef<std::uint64_t>();
301 R__ASSERT(
false &&
"unsupported cardinality size type");
306 constexpr auto nBitsULong =
sizeof(
unsigned long) * 8;
307 const auto *asULongArray = fValue.GetPtr<
unsigned long>().get();
314 for (std::size_t word = 0; word < (field.
GetN() + nBitsULong - 1) / nBitsULong; ++word) {
315 for (std::size_t
mask = 0; (
mask < nBitsULong) && (i < field.
GetN()); ++
mask, ++i) {
316 bool isSet = (asULongArray[word] & (
static_cast<unsigned long>(1) <<
mask)) != 0;
317 str = std::to_string(isSet) + str;
320 fOutput << str <<
"\"";
325 PrintCollection(field);
330 PrintCollection(field);
337 fOutput <<
"<streamer mode>";
367 elems[0].GetField().AcceptVisitor(visitor);
380 intValue.GetField().AcceptVisitor(visitor);
392 itemValue.GetField().AcceptVisitor(visitor);
397 PrintCollection(field);
402 PrintCollection(field);
407 PrintCollection(field);
412 PrintCollection(field);
420 int strSize{
static_cast<int>(str.size())};
421 if (strSize <= availableSpace)
422 return str + std::string(availableSpace - strSize,
' ');
423 else if (availableSpace < 3)
424 return std::string(availableSpace,
'.');
425 return std::string(str, 0, availableSpace - 3) +
"...";
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
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
Additional classes related to sequence containers.
Template specializations for C++ std::array and C-style arrays.
Template specializations for C++ std::atomic.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
Template specializations for C++ std::bitset.
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.
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::vector< RFieldBase * > GetSubFields()
const std::string & GetFieldName() const
const 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.
Template specializations for C++ std::optional and std::unique_ptr.
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 VisitArrayField(const RArrayField &field) final
void VisitFloatField(const RField< float > &field) final
void VisitInt8Field(const RIntegralField< std::int8_t > &field) final
void VisitRecordField(const RRecordField &field) final
void VisitStringField(const RField< std::string > &field) final
void VisitUInt64Field(const RIntegralField< std::uint64_t > &field) final
void VisitUInt8Field(const RIntegralField< std::uint8_t > &field) final
void VisitUInt16Field(const RIntegralField< std::uint16_t > &field) final
void PrintName(const RFieldBase &field)
void VisitNullableField(const RNullableField &field) final
void VisitBitsetField(const RBitsetField &field) final
void VisitCardinalityField(const RCardinalityField &field) final
void VisitTObjectField(const RField< TObject > &field) final
void VisitAtomicField(const RAtomicField &field) final
void VisitRVecField(const RRVecField &field) final
void VisitUInt32Field(const RIntegralField< std::uint32_t > &field) final
void VisitInt64Field(const RIntegralField< std::int64_t > &field) final
void VisitEnumField(const REnumField &field) final
void VisitBoolField(const RField< bool > &field) final
void VisitInt32Field(const RIntegralField< std::int32_t > &field) final
void VisitField(const RFieldBase &field) final
void VisitInt16Field(const RIntegralField< std::int16_t > &field) final
void VisitProxiedCollectionField(const RProxiedCollectionField &field) final
void VisitArrayAsRVecField(const RArrayAsRVecField &field) final
void VisitByteField(const RField< std::byte > &field) final
void VisitStreamerField(const RStreamerField &field) final
void PrintCollection(const RFieldBase &field)
void VisitVectorField(const RVectorField &field) final
void VisitCharField(const RField< char > &field) final
void VisitClassField(const RClassField &field) final
void PrintRecord(const RFieldBase &field)
The field for a class representing a collection of elements via TVirtualCollectionProxy.
Template specializations for ROOT's RVec.
The field for an untyped record.
The field for a class using ROOT standard streaming.
Template specializations for C++ std::vector.