File indexing completed on 2025-01-18 10:10:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef ROOT_RFRIENDINFO_H
0019 #define ROOT_RFRIENDINFO_H
0020
0021 #include <string_view>
0022 #include <Rtypes.h> // Long64_t
0023 #include <TVirtualIndex.h>
0024 #include <TTree.h>
0025
0026 #include <limits>
0027 #include <memory>
0028 #include <string>
0029 #include <utility> // std::pair
0030 #include <vector>
0031
0032 class TTree;
0033
0034 namespace ROOT {
0035 namespace TreeUtils {
0036
0037
0038
0039
0040
0041
0042 struct RFriendInfo {
0043
0044
0045
0046
0047 std::vector<std::pair<std::string, std::string>> fFriendNames;
0048
0049
0050
0051
0052 std::vector<std::vector<std::string>> fFriendFileNames;
0053
0054
0055
0056
0057
0058
0059
0060 std::vector<std::vector<std::string>> fFriendChainSubNames;
0061
0062
0063
0064
0065
0066 std::vector<std::vector<Long64_t>> fNEntriesPerTreePerFriend;
0067
0068
0069
0070
0071 std::vector<std::unique_ptr<TVirtualIndex>> fTreeIndexInfos;
0072
0073 RFriendInfo() = default;
0074 RFriendInfo(const RFriendInfo &);
0075 RFriendInfo &operator=(const RFriendInfo &);
0076 RFriendInfo(RFriendInfo &&) = default;
0077 RFriendInfo &operator=(RFriendInfo &&) = default;
0078 RFriendInfo(std::vector<std::pair<std::string, std::string>> friendNames,
0079 std::vector<std::vector<std::string>> friendFileNames,
0080 std::vector<std::vector<std::string>> friendChainSubNames,
0081 std::vector<std::vector<Long64_t>> nEntriesPerTreePerFriend,
0082 std::vector<std::unique_ptr<TVirtualIndex>> treeIndexInfos);
0083
0084 void AddFriend(const std::string &treeName, const std::string &fileNameGlob, const std::string &alias = "",
0085 Long64_t nEntries = TTree::kMaxEntries, TVirtualIndex *indexInfo = nullptr);
0086
0087 void AddFriend(const std::string &treeName, const std::vector<std::string> &fileNameGlobs,
0088 const std::string &alias = "", const std::vector<Long64_t> &nEntriesVec = {},
0089 TVirtualIndex *indexInfo = nullptr);
0090
0091 void AddFriend(const std::vector<std::pair<std::string, std::string>> &treeAndFileNameGlobs,
0092 const std::string &alias = "", const std::vector<Long64_t> &nEntriesVec = {},
0093 TVirtualIndex *indexInfo = nullptr);
0094 };
0095
0096 }
0097 }
0098
0099 #endif