5 #include "TBranchElement.h" 13 #include "canvas_root_io/Streamers/ProductIDStreamer.h" 14 #include "canvas_root_io/Streamers/RefCoreStreamer.h" 15 #include "cetlib/crc32.h" 23 RootDelayedReader::RootDelayedReader(
26 std::vector<input::EntryNumber>
const& entrySet,
28 cet::exempt_ptr<RootInputTree> tree,
29 int64_t
const saveMemoryObjectThreshold,
30 cet::exempt_ptr<RootInputFile> primaryFile,
31 cet::exempt_ptr<BranchIDLists const> bidLists,
34 bool const compactSubRunRanges)
35 : fileFormatVersion_{version}
50 cet::exempt_ptr<EDProductGetterFinder const> groupFinder)
65 assert(br !=
nullptr);
69 TClass* cl{TClass::GetClass(ty.
typeInfo())};
71 auto get_product = [
this, cl, br](
auto entry) {
72 tree_->setEntryNumber(entry);
73 unique_ptr<EDProduct> p{
static_cast<EDProduct*
>(cl->New())};
79 br->DropBaskets(
"all");
98 configureProductIDStreamer();
99 configureRefCoreStreamer();
110 result->getRangeSetID(),
115 auto p = get_product(*it);
116 auto const id = p->getRangeSetID();
121 mergedRangeSet = newRS;
124 result->combine(p.get());
125 mergedRangeSet.
merge(newRS);
133 "RootDelayedReader::getProduct_"}
134 <<
"\nThe following ranges corresponding to the product:\n" 136 <<
"\ncannot be aggregated\n" 137 << mergedRangeSet <<
" and\n" 138 << newRS <<
"\nPlease contact artists@fnal.gov.\n";
145 configureProductIDStreamer();
146 configureRefCoreStreamer();
164 assert(!(
static_cast<decltype(sfnm.size())
>(idx) > sfnm.size()));
169 if (
static_cast<decltype(sfnm.size())
>(idx) == sfnm.size()) {
180 if (!sf[idx]->readEventForSecondaryFile(
eventID_)) {
195 assert(
false &&
"RootDelayedReader encountered an unknown BranchType!");
RunID const & runID() const
SubRunID const & subRunID() const
int64_t saveMemoryObjectThreshold_
std::unique_ptr< EDProduct > getProduct_(BranchKey const &, TypeID const &, RangeSet &) const override
RangeSet resolveRangeSet(RangeSetInfo const &rs)
RangeSet & merge(RangeSet const &other)
int openNextSecondaryFile_(int idx) override
std::enable_if_t< detail::are_handles< T, U >::value, bool > disjoint_ranges(T const &a, U const &b)
std::type_info const & typeInfo() const
std::vector< input::EntryNumber > const entrySet_
static RangeSet forRun(RunID)
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
static RangeSet forSubRun(SubRunID)
bool const compactSubRunRanges_
cet::exempt_ptr< RootInputFile > primaryFile_
cet::exempt_ptr< EDProductGetterFinder const > groupFinder_
cet::exempt_ptr< RootInputTree > tree_
std::enable_if_t< detail::are_handles< T, U >::value, bool > overlapping_ranges(T const &a, U const &b)
std::enable_if_t< detail::are_handles< T, U >::value, bool > same_ranges(T const &a, U const &b)
input::BranchMap const & branches_
cet::exempt_ptr< BranchIDLists const > branchIDLists_
void setGroupFinder_(cet::exempt_ptr< EDProductGetterFinder const >) override
FileFormatVersion fileFormatVersion_