Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RDatasetSpec.hxx
Go to the documentation of this file.
1/// \cond HIDDEN_SYMBOLS
2// Author: Vincenzo Eduardo Padulano CERN/UPV, Ivan Kabadzhov CERN 06/2022
3
4/*************************************************************************
5 * Copyright (C) 1995-2022, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_RDF_RDATASETSPEC
13#define ROOT_RDF_RDATASETSPEC
14
15#include <limits>
16#include <string>
17#include <utility> // std::pair
18#include <vector>
19
20#include <ROOT/InternalTreeUtils.hxx> // ROOT::Internal::TreeUtils::RFriendInfo
21#include <RtypesCore.h> // Long64_t
22
23namespace ROOT {
24
25namespace Detail {
26namespace RDF {
27class RLoopManager;
28} // namespace RDF
29} // namespace Detail
30
31namespace Internal {
32
33namespace RDF {
34
35class RDatasetSpec {
36
38
39public:
40 struct REntryRange {
41 Long64_t fBegin{0};
42 Long64_t fEnd{std::numeric_limits<Long64_t>::max()};
43 REntryRange();
44 REntryRange(Long64_t endEntry);
45 REntryRange(Long64_t beginEntry, Long64_t endEntry);
46 };
47
48private:
49 /**
50 * A list of names of trees.
51 * This list should go in lockstep with fFileNameGlobs, only in case this dataset is a TChain where each file
52 * contains its own tree with a different name from the global name of the dataset.
53 * Otherwise, fTreeNames contains 1 treename, that is common for all file globs.
54 */
55 std::vector<std::string> fTreeNames;
56 /**
57 * A list of file names.
58 * They can contain the globbing characters supported by TChain. See TChain::Add for more information.
59 */
60 std::vector<std::string> fFileNameGlobs;
61 REntryRange fEntryRange; ///< Begin (inclusive) and end (exclusive) entry for the dataset processing
62 ROOT::Internal::TreeUtils::RFriendInfo fFriendInfo; ///< List of friends
63
64public:
65 RDatasetSpec(const std::string &treeName, const std::string &fileNameGlob, const REntryRange &entryRange = {});
66
67 RDatasetSpec(const std::string &treeName, const std::vector<std::string> &fileNameGlobs,
68 const REntryRange &entryRange = {});
69
70 RDatasetSpec(const std::vector<std::pair<std::string, std::string>> &treeAndFileNameGlobs,
71 const REntryRange &entryRange = {});
72
73 void AddFriend(const std::string &treeName, const std::string &fileNameGlob, const std::string &alias = "");
74
75 void
76 AddFriend(const std::string &treeName, const std::vector<std::string> &fileNameGlobs, const std::string &alias = "");
77
78 void AddFriend(const std::vector<std::pair<std::string, std::string>> &treeAndFileNameGlobs,
79 const std::string &alias = "");
80};
81
82} // namespace RDF
83} // namespace Internal
84} // namespace ROOT
85
86#endif // ROOT_RDF_RDATASETSPEC
87/// \endcond
long long Long64_t
Definition RtypesCore.h:80
The head node of a RDF computation graph.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Information about friend trees of a certain TTree or TChain object.