1
- // / \file RTreeMapImporter .cxx
2
- // / \ingroup TreeMap ROOT7
1
+ // / \file ROOT/RNTupleTreeMap .cxx
2
+ // / \ingroup NTuple
3
3
// / \author Patryk Tymoteusz Pilichowski <[email protected] >
4
- // / \date 2025-08-21
4
+ // / \date 2025-09-15
5
5
// / \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6
6
// / is welcome!
7
7
13
13
* For the list of contributors see $ROOTSYS/README/CREDITS. *
14
14
*************************************************************************/
15
15
16
- #include < ROOT/RTreeMapPainter.hxx>
17
- #include < ROOT/RNTupleInspector.hxx>
16
+ #include < ROOT/RNTupleTreeMap.hxx>
18
17
#include < ROOT/RColumnElementBase.hxx>
19
18
20
19
#include < queue>
21
20
22
- using namespace ROOT ::Experimental;
23
-
24
- static RTreeMapBase::Node CreateNode (const RNTupleInspector &insp, const ROOT::RFieldDescriptor &fldDesc,
25
- std::uint64_t childrenIdx, std::uint64_t nChildren, ROOT::DescriptorId_t rootId,
26
- size_t rootSize)
21
+ static ROOT::Experimental::RTreeMapBase::Node
22
+ CreateNode (const ROOT::Experimental::RNTupleInspector &insp, const ROOT::RFieldDescriptor &fldDesc,
23
+ std::uint64_t childrenIdx, std::uint64_t nChildren, ROOT::DescriptorId_t rootId, size_t rootSize)
27
24
{
28
25
uint64_t size =
29
26
(rootId != fldDesc.GetId ()) ? insp.GetFieldTreeInspector (fldDesc.GetId ()).GetCompressedSize () : rootSize;
30
27
return {fldDesc.GetFieldName (), " " , size, childrenIdx, nChildren};
31
28
}
32
29
33
- static RTreeMapBase::Node CreateNode (const RNTupleInspector::RColumnInspector &colInsp, std::uint64_t childrenIdx)
30
+ static ROOT::Experimental::RTreeMapBase::Node
31
+ CreateNode (const ROOT::Experimental::RNTupleInspector::RColumnInspector &colInsp, std::uint64_t childrenIdx)
34
32
{
35
33
return {" " , ROOT::Internal::RColumnElementBase::GetColumnTypeName (colInsp.GetType ()), colInsp.GetCompressedSize (),
36
34
childrenIdx, 0 };
37
35
}
38
36
39
- std::unique_ptr<RTreeMapPainter> RTreeMapPainter::ImportRNTuple (const ROOT::Experimental::RNTupleInspector &insp)
37
+ std::unique_ptr<ROOT::Experimental::RTreeMapPainter>
38
+ ROOT::Experimental::CreateTreeMapFromRNTuple (const ROOT::Experimental::RNTupleInspector &insp)
40
39
{
41
- auto treemap = std::make_unique<RTreeMapPainter>();
40
+ auto treemap = std::make_unique<ROOT::Experimental:: RTreeMapPainter>();
42
41
const auto &descriptor = insp.GetDescriptor ();
43
42
const auto rootId = descriptor.GetFieldZero ().GetId ();
44
43
size_t rootSize = 0 ;
@@ -83,8 +82,9 @@ std::unique_ptr<RTreeMapPainter> RTreeMapPainter::ImportRNTuple(const ROOT::Expe
83
82
return treemap;
84
83
}
85
84
86
- std::unique_ptr<RTreeMapPainter> RTreeMapPainter::ImportRNTuple (std::string_view sourceFileName, std::string_view tupleName)
85
+ std::unique_ptr<ROOT::Experimental::RTreeMapPainter>
86
+ ROOT::Experimental::CreateTreeMapFromRNTuple (std::string_view sourceFileName, std::string_view tupleName)
87
87
{
88
- auto insp = RNTupleInspector::Create (tupleName, sourceFileName);
89
- return RTreeMapPainter::ImportRNTuple (*insp);
90
- }
88
+ auto insp = ROOT::Experimental:: RNTupleInspector::Create (tupleName, sourceFileName);
89
+ return CreateTreeMapFromRNTuple (*insp);
90
+ }
0 commit comments