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) {
122 if (readerArraySize > 0) {
126 assert(
fValueSize > 0 &&
"Could not retrieve size of collection value type.");
130 for (std::size_t i{0}; i < readerArraySize; i++) {
131 auto val = readerArray.At(i);
132 std::copy(val, val +
fValueSize, std::back_inserter(fRVec));
141 fRVec.set_size(readerArraySize);
153 if (fCollectionType == ECollectionType::kStdArray)
154 return ReadStdArray(entry);
156 if (fCollectionType == ECollectionType::kStdVector)
157 return ReadStdVector(entry);
159 return ReadRVec(entry);
163 std::string_view colName,
164 std::string_view valueTypeName,
167 fCollectionType(collType)
174 TTreeReader &
r, std::unique_ptr<ROOT::Detail::RDF::RColumnReaderBase> valueReader, std::string_view maskName,
175 unsigned int maskIndex)
176 : fValueReader{std::move(valueReader)},
178 fMaskIndex{maskIndex}
186 const std::bitset<64>
mask{*fTreeValueMask->Get()};
187 if (
mask.test(fMaskIndex) ==
false)
190 return fValueReader->TryGet<
void>(
event);
#define R__unlikely(expr)
long long Long64_t
Portable signed long integer 8 bytes.
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,...