22 return fTreeValue->Get();
26 std::string_view colName,
27 std::string_view typeName)
36 if (entry == fLastEntry)
39 auto &readerArray = *fTreeArray;
41 const auto readerArraySize = readerArray.GetSize();
48 assert(readerArray.IsContiguous() &&
"std::array storage should always be contiguous");
50 if (readerArraySize > 0) {
66 if (entry == fLastEntry)
69 auto &readerArray = *fTreeArray;
71 const auto readerArraySize = readerArray.GetSize();
78 if (readerArraySize > 0) {
82 assert(
fValueSize > 0 &&
"Could not retrieve size of collection value type.");
85 fStdVector.reserve(readerArraySize *
fValueSize);
86 for (std::size_t i{0}; i < readerArraySize; i++) {
87 auto val = readerArray.At(i);
88 std::copy(val, val +
fValueSize, std::back_inserter(fStdVector));
100 if (entry == fLastEntry)
103 auto &readerArray = *fTreeArray;
105 const auto readerArraySize = readerArray.GetSize();
111 if (readerArray.IsContiguous() && !(fCollectionType == ECollectionType::kRVecBool)) {
112 if (readerArraySize > 0) {
124 if (!fCopyWarningPrinted && !(fCollectionType == ECollectionType::kRVecBool)) {
125 Warning(
"RTreeColumnReader::Get",
126 "Branch %s hangs from a non-split branch. A copy is being performed in order "
127 "to properly read the content.",
128 readerArray.GetBranchName());
129 fCopyWarningPrinted =
true;
132 (void)fCopyWarningPrinted;
134 if (readerArraySize > 0) {
138 assert(
fValueSize > 0 &&
"Could not retrieve size of collection value type.");
142 for (std::size_t i{0}; i < readerArraySize; i++) {
143 auto val = readerArray.At(i);
144 std::copy(val, val +
fValueSize, std::back_inserter(fRVec));
153 fRVec.set_size(readerArraySize);
165 if (fCollectionType == ECollectionType::kStdArray)
166 return ReadStdArray(entry);
168 if (fCollectionType == ECollectionType::kStdVector)
169 return ReadStdVector(entry);
171 return ReadRVec(entry);
175 std::string_view colName,
176 std::string_view valueTypeName,
179 fCollectionType(collType)
186 TTreeReader &
r, std::unique_ptr<ROOT::Detail::RDF::RColumnReaderBase> valueReader, std::string_view maskName,
187 unsigned int maskIndex)
188 : fValueReader{std::move(valueReader)},
190 fMaskIndex{maskIndex}
198 const std::bitset<64>
mask{*fTreeValueMask->Get()};
199 if (
mask.test(fMaskIndex) ==
false)
202 return fValueReader->TryGet<
void>(
event);
#define R__unlikely(expr)
long long Long64_t
Portable signed long integer 8 bytes.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
~RMaskedColumnReader() override
void * GetImpl(Long64_t) override
RMaskedColumnReader(TTreeReader &r, std::unique_ptr< ROOT::Detail::RDF::RColumnReaderBase > valueReader, std::string_view maskName, unsigned int maskIndex)
std::unique_ptr< ROOT::Internal::TTreeReaderOpaqueValue > fTreeValue
void * GetImpl(Long64_t) override
RTreeOpaqueColumnReader(TTreeReader &r, std::string_view colName)
Construct the RTreeColumnReader. Actual initialization is performed lazily by the Init method.
~RTreeOpaqueColumnReader() final
void * GetImpl(Long64_t entry) override
~RTreeUntypedArrayColumnReader() final
void * ReadRVec(Long64_t entry)
RTreeUntypedArrayColumnReader(TTreeReader &r, std::string_view colName, std::string_view valueTypeName, ECollectionType collType)
void * ReadStdArray(Long64_t entry)
void * ReadStdVector(Long64_t entry)
RTreeUntypedValueColumnReader(TTreeReader &r, std::string_view colName, std::string_view typeName)
void * GetImpl(Long64_t) override
~RTreeUntypedValueColumnReader() final
Read a value in a branch without knowledge of its type.
@ kReadError
Problem reading data.
A "std::vector"-like collection of values implementing handy operation to analyse them.
An interface for reading values stored in ROOT columnar datasets.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...