forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dataset] rename RForest RDataSet root-project#3 (WIP)
- Loading branch information
Showing
27 changed files
with
89 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RColumn.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RColumnElement.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RColumnModel.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RForest.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \file ROOT/RDataSet.hxx | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-04 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -13,8 +13,8 @@ | |
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RForest | ||
#define ROOT7_RForest | ||
#ifndef ROOT7_RDataSet | ||
#define ROOT7_RDataSet | ||
|
||
#include <ROOT/RDataSetModel.hxx> | ||
#include <ROOT/RDataSetUtil.hxx> | ||
|
@@ -28,7 +28,7 @@ | |
namespace ROOT { | ||
namespace Experimental { | ||
|
||
class RForestEntry; | ||
class REntry; | ||
class RForestModel; | ||
|
||
namespace Detail { | ||
|
@@ -134,7 +134,7 @@ public: | |
/// On I/O errors, raises an expection. | ||
void LoadEntry(ForestSize_t index) { LoadEntry(index, fModel->GetDefaultEntry()); } | ||
/// Fills a user provided entry after checking that the entry has been instantiated from the forest model | ||
void LoadEntry(ForestSize_t index, RForestEntry* entry) { | ||
void LoadEntry(ForestSize_t index, REntry* entry) { | ||
for (auto& value : *entry) { | ||
value.GetField()->Read(index, &value); | ||
} | ||
|
@@ -187,7 +187,7 @@ public: | |
void Fill() { Fill(fModel->GetDefaultEntry()); } | ||
/// Multiple entries can have been instantiated from the forest model. This method will perform | ||
/// a light check whether the entry comes from the forest's own model | ||
void Fill(RForestEntry *entry) { | ||
void Fill(REntry *entry) { | ||
for (auto& treeValue : *entry) { | ||
treeValue.GetField()->Append(treeValue); | ||
} | ||
|
@@ -212,15 +212,15 @@ public: | |
class RCollectionForest { | ||
private: | ||
ClusterSize_t fOffset; | ||
std::unique_ptr<RForestEntry> fDefaultEntry; | ||
std::unique_ptr<REntry> fDefaultEntry; | ||
public: | ||
explicit RCollectionForest(std::unique_ptr<RForestEntry> defaultEntry); | ||
explicit RCollectionForest(std::unique_ptr<REntry> defaultEntry); | ||
RCollectionForest(const RCollectionForest&) = delete; | ||
RCollectionForest& operator=(const RCollectionForest&) = delete; | ||
~RCollectionForest() = default; | ||
|
||
void Fill() { Fill(fDefaultEntry.get()); } | ||
void Fill(RForestEntry *entry) { | ||
void Fill(REntry *entry) { | ||
for (auto& treeValue : *entry) { | ||
treeValue.GetField()->Append(treeValue); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RForestDescriptor.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \file ROOT/RDataSetDescriptor.hxx | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-07-19 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -13,8 +13,8 @@ | |
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RForestDescriptor | ||
#define ROOT7_RForestDescriptor | ||
#ifndef ROOT7_RDataSetDescriptor | ||
#define ROOT7_RDataSetDescriptor | ||
|
||
#include <ROOT/RColumnModel.hxx> | ||
#include <ROOT/RDataSetUtil.hxx> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RForestModel.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \file ROOT/RDataSetModel.hxx | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-04 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -13,8 +13,8 @@ | |
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RForestModel | ||
#define ROOT7_RForestModel | ||
#ifndef ROOT7_RDataSetModel | ||
#define ROOT7_RDataSetModel | ||
|
||
#include <ROOT/REntry.hxx> | ||
#include <ROOT/RField.hxx> | ||
|
@@ -47,7 +47,7 @@ class RForestModel { | |
/// Hierarchy of fields consisting of simple types and collections (sub trees) | ||
std::unique_ptr<RFieldRoot> fRootField; | ||
/// Contains field values corresponding to the created top-level fields | ||
std::unique_ptr<RForestEntry> fDefaultEntry; | ||
std::unique_ptr<REntry> fDefaultEntry; | ||
|
||
public: | ||
RForestModel(); | ||
|
@@ -88,8 +88,8 @@ public: | |
std::unique_ptr<RForestModel> collectionModel); | ||
|
||
RFieldRoot* GetRootField() { return fRootField.get(); } | ||
RForestEntry* GetDefaultEntry() { return fDefaultEntry.get(); } | ||
std::unique_ptr<RForestEntry> CreateEntry(); | ||
REntry* GetDefaultEntry() { return fDefaultEntry.get(); } | ||
std::unique_ptr<REntry> CreateEntry(); | ||
}; | ||
|
||
} // namespace Exerimental | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RForestUtil.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \file ROOT/RDataSetUtil.hxx | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-04 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -13,8 +13,8 @@ | |
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RForestUtil | ||
#define ROOT7_RForestUtil | ||
#ifndef ROOT7_RDataSetUtil | ||
#define ROOT7_RDataSetUtil | ||
|
||
#include <cstdint> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RForestView.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \file ROOT/RDataSetView.hxx | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-05 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -13,8 +13,8 @@ | |
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RForestView | ||
#define ROOT7_RForestView | ||
#ifndef ROOT7_RDataSetView | ||
#define ROOT7_RDataSetView | ||
|
||
#include <ROOT/RDataSetUtil.hxx> | ||
#include <ROOT/RField.hxx> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RForestEntry.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \file ROOT/REntry.hxx | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-07-19 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -13,8 +13,8 @@ | |
* For the list of contributors see $ROOTSYS/README/CREDITS. * | ||
*************************************************************************/ | ||
|
||
#ifndef ROOT7_RForestEntry | ||
#define ROOT7_RForestEntry | ||
#ifndef ROOT7_REntry | ||
#define ROOT7_REntry | ||
|
||
#include <ROOT/RField.hxx> | ||
#include <ROOT/RFieldValue.hxx> | ||
|
@@ -31,15 +31,15 @@ namespace Experimental { | |
|
||
// clang-format off | ||
/** | ||
\class ROOT::Experimental::RForestEntry | ||
\class ROOT::Experimental::REntry | ||
\ingroup Forest | ||
\brief The RForestEntry is a collection of values in a forest corresponding to a complete row in the data set | ||
\brief The REntry is a collection of values in a forest corresponding to a complete row in the data set | ||
The entry provides a memory-managed binder for a set of values. Through shared pointers, the memory locations | ||
that are associated to values are managed. | ||
*/ | ||
// clang-format on | ||
class RForestEntry { | ||
class REntry { | ||
std::vector<Detail::RFieldValueBase> fValues; | ||
/// The objects involed in serialization and deserialization might be used long after the entry is gone: | ||
/// hence the shared pointer | ||
|
@@ -48,10 +48,10 @@ class RForestEntry { | |
std::vector<std::size_t> fManagedValues; | ||
|
||
public: | ||
RForestEntry() = default; | ||
RForestEntry(const RForestEntry& other) = delete; | ||
RForestEntry& operator=(const RForestEntry& other) = delete; | ||
~RForestEntry(); | ||
REntry() = default; | ||
REntry(const REntry& other) = delete; | ||
REntry& operator=(const REntry& other) = delete; | ||
~REntry(); | ||
|
||
/// Adds a value whose storage is managed by the entry | ||
void AddValue(const Detail::RFieldValueBase& value); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RField.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -44,7 +44,7 @@ namespace ROOT { | |
namespace Experimental { | ||
|
||
class RCollectionForest; | ||
class RForestEntry; | ||
class REntry; | ||
class RForestModel; | ||
class RFieldCollection; | ||
|
||
|
@@ -235,7 +235,7 @@ public: | |
size_t GetValueSize() const final { return 0; } | ||
|
||
/// Generates managed values for the top-level sub fields | ||
RForestEntry* GenerateEntry(); | ||
REntry* GenerateEntry(); | ||
}; | ||
|
||
/// The field for a class with dictionary | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RFieldValue.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
@@ -35,7 +35,7 @@ class RFieldBase; | |
The data carried by the tree value is used by the computational code and it is supposed to be serialized on Fill | ||
or deserialized into by tree reading. Only fields can generate their corresponding tree values. This class is a mere | ||
wrapper around the memory location, it does not own it. Memory ownership is managed through the RForestEntry. | ||
wrapper around the memory location, it does not own it. Memory ownership is managed through the REntry. | ||
*/ | ||
// clang-format on | ||
class RFieldValueBase { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RPage.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RPagePool.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-09 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RPageStorage.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-07-19 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file ROOT/RPageStorage.hxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-07-19 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// \file RColumn.cxx | ||
/// \ingroup Forest ROOT7 | ||
/// \ingroup DataSet ROOT7 | ||
/// \author Jakob Blomer <[email protected]> | ||
/// \date 2018-10-04 | ||
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback | ||
|
Oops, something went wrong.