Warning, file /include/root/ROOT/RDF/RDatasetSpec.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_RDF_RDATASETSPEC
0012 #define ROOT_RDF_RDATASETSPEC
0013
0014 #include <any>
0015 #include <limits>
0016 #include <string>
0017 #include <utility> // std::pair
0018 #include <vector>
0019
0020 #include <ROOT/RDF/RSample.hxx>
0021 #include <RtypesCore.h> // Long64_t
0022
0023 namespace ROOT::TreeUtils {
0024 struct RFriendInfo;
0025 }
0026
0027 namespace ROOT {
0028 namespace Detail {
0029 namespace RDF {
0030 class RLoopManager;
0031 }
0032 }
0033
0034 namespace RDF {
0035 namespace Experimental {
0036 class RDatasetSpec;
0037 class RSample;
0038 }
0039 }
0040
0041 namespace Internal {
0042 namespace RDF {
0043 std::vector<ROOT::RDF::Experimental::RSample> MoveOutSamples(ROOT::RDF::Experimental::RDatasetSpec &spec);
0044 }
0045 }
0046
0047 namespace RDF {
0048 namespace Experimental {
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065 class RDatasetSpec {
0066
0067 friend class ::ROOT::Detail::RDF::RLoopManager;
0068 friend std::vector<ROOT::RDF::Experimental::RSample> ROOT::Internal::RDF::MoveOutSamples(ROOT::RDF::Experimental::RDatasetSpec &);
0069
0070
0071 public:
0072 struct REntryRange {
0073 Long64_t fBegin{0};
0074 Long64_t fEnd{std::numeric_limits<Long64_t>::max()};
0075 REntryRange();
0076 REntryRange(Long64_t endEntry);
0077 REntryRange(Long64_t startEntry, Long64_t endEntry);
0078 };
0079
0080 private:
0081 std::vector<RSample> fSamples;
0082 std::any fFriendInfo;
0083 REntryRange fEntryRange;
0084 std::vector<RSample> MoveOutSamples();
0085 ROOT::TreeUtils::RFriendInfo &GetFriendInfo();
0086
0087 public:
0088 RDatasetSpec() noexcept;
0089
0090 const std::vector<std::string> GetSampleNames() const;
0091 const std::vector<std::string> GetTreeNames() const;
0092 const std::vector<std::string> GetFileNameGlobs() const;
0093 const std::vector<RMetaData> GetMetaData() const;
0094 const ROOT::TreeUtils::RFriendInfo &GetFriendInfo() const;
0095 Long64_t GetEntryRangeBegin() const;
0096 Long64_t GetEntryRangeEnd() const;
0097
0098 RDatasetSpec &AddSample(RSample sample);
0099
0100 RDatasetSpec &
0101 WithGlobalFriends(const std::string &treeName, const std::string &fileNameGlob, const std::string &alias = "");
0102
0103 RDatasetSpec &WithGlobalFriends(const std::string &treeName, const std::vector<std::string> &fileNameGlobs,
0104 const std::string &alias = "");
0105
0106 RDatasetSpec &WithGlobalFriends(const std::vector<std::pair<std::string, std::string>> &treeAndFileNameGlobs,
0107 const std::string &alias = "");
0108
0109 RDatasetSpec &WithGlobalFriends(const std::vector<std::string> &treeNames,
0110 const std::vector<std::string> &fileNameGlobs, const std::string &alias = "");
0111
0112 RDatasetSpec &WithGlobalRange(const RDatasetSpec::REntryRange &entryRange = {});
0113 };
0114
0115 }
0116 }
0117 }
0118
0119 #endif