67 #include "TTreeCache.h" 108 void checkReleaseVersion(std::vector<ProcessHistory> processHistoryVector,
std::string const&
fileName) {
111 for (
auto const&
ph : processHistoryVector) {
112 for (
auto const& pc :
ph) {
116 <<
"a release (" << pc.releaseVersion() <<
") used in writing the input file, " <<
fileName <<
".\n" 117 <<
"Forward compatibility cannot be supported.\n";
137 return eventAux.
event();
148 std::shared_ptr<InputFile> filePtr,
149 std::shared_ptr<EventSkipperByID> eventSkipperByID,
153 unsigned int nStreams,
154 unsigned int treeCacheSize,
155 int treeMaxVirtualSize,
162 std::shared_ptr<BranchIDListHelper> branchIDListHelper,
164 std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
165 std::vector<BranchID>
const* associationsFromSecondary,
166 std::shared_ptr<DuplicateChecker> duplicateChecker,
167 bool dropDescendants,
169 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
171 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
172 bool bypassVersionCheck,
173 bool labelRawDataLikeMC,
175 bool enablePrefetching,
176 bool enforceGUIDInFileName)
178 logicalFile_(logicalFileName),
179 processConfiguration_(processConfiguration),
180 processHistoryRegistry_(&processHistoryRegistry),
182 eventSkipperByID_(eventSkipperByID),
183 fileFormatVersion_(),
186 indexIntoFile_(*indexIntoFileSharedPtr_),
187 orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
188 indexIntoFileBegin_(indexIntoFile_.begin(
191 indexIntoFileEnd_(indexIntoFileBegin_),
192 indexIntoFileIter_(indexIntoFileBegin_),
195 eventProcessHistoryIDs_(),
196 eventProcessHistoryIter_(eventProcessHistoryIDs_.begin()),
197 savedRunAuxiliary_(),
198 skipAnyEvents_(skipAnyEvents),
199 noRunLumiSort_(noRunLumiSort),
200 noEventSort_(noEventSort),
201 enforceGUIDInFileName_(enforceGUIDInFileName),
202 whyNotFastClonable_(0),
203 hasNewlyDroppedBranch_(),
204 branchListIndexesUnchanged_(
false),
234 branchIDListHelper_(branchIDListHelper),
235 processBlockHelper_(processBlockHelper),
236 fileThinnedAssociationsHelper_(),
237 thinnedAssociationsHelper_(thinnedAssociationsHelper),
239 runHelper_(runHelper),
240 newBranchToOldBranch_(),
241 eventHistoryTree_(nullptr),
242 eventToProcessBlockIndexesBranch_(
248 duplicateChecker_(duplicateChecker),
249 provenanceAdaptor_(),
250 provenanceReaderMaker_(),
251 eventProductProvenanceRetrievers_(),
252 parentageIDLookup_(),
253 daqProvenanceHelper_(),
254 edProductClass_(
TypeWithDict::byName(
"edm::WrapperBase").getClass()),
255 inputType_(inputType) {
266 if (
nullptr == metaDataTree.get()) {
277 fft->SetAddress(&fftPtr);
315 using PsetMap = std::map<ParameterSetID, ParameterSetBlob>;
317 PsetMap* psetMapPtr = &psetMap;
326 if (
nullptr == psetTree.get()) {
331 using IdToBlobs = std::pair<ParameterSetID, ParameterSetBlob>;
333 IdToBlobs* pIdToBlob = &idToBlob;
336 std::unique_ptr<TTreeCache> psetTreeCache =
338 psetTreeCache->SetEnablePrefetching(
false);
339 filePtr_->SetCacheRead(psetTreeCache.get());
340 for (Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
341 psetTree->GetEntry(
i);
342 psetMap.insert(idToBlob);
367 auto branchIDListsAPtr = std::make_unique<BranchIDLists>();
376 std::make_unique<ThinnedAssociationsHelper>();
380 &thinnedAssociationsHelperPtr);
417 for (
auto const& psetEntry : psetMap) {
419 pset.setID(psetEntry.first);
430 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
true);
438 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
false);
450 <<
"Failed to find thinnedAssociationsHelper branch in metaData tree.\n";
454 if (!bypassVersionCheck) {
455 checkReleaseVersion(pHistVector,
file());
458 if (labelRawDataLikeMC) {
463 ProductRegistry::ProductList::iterator it = pList.lower_bound(
finder);
464 if (it != pList.end() && it->first.friendlyClassName() ==
rawData && it->first.moduleLabel() ==
source) {
480 it = pList.lower_bound(
finder);
481 assert(!(it != pList.end() && it->first.friendlyClassName() ==
rawData && it->first.moduleLabel() ==
source));
491 for (
auto const& history : pHistVector) {
529 auto newReg = std::make_unique<ProductRegistry>();
534 for (
auto const& product : prodList) {
537 if (newFriendlyName ==
prod.friendlyClassName()) {
538 newReg->copyProduct(
prod);
542 <<
"Cannot change friendly class name algorithm without more development work\n" 543 <<
"to update BranchIDLists and ThinnedAssociationsHelper. Contact the framework group.\n";
547 newReg->copyProduct(newBD);
553 *newReg, productSelectorRules, dropDescendants, inputType, storedProcessBlockHelper, processBlockHelper);
557 *associationsFromSecondary);
564 for (
auto& product : newReg->productListUpdator()) {
569 for (
auto& product : newReg->productListUpdator()) {
570 product.second.setOnDemand(
true);
587 for (
auto const& product : prodList) {
588 if (product.second.branchType() ==
InProcess) {
589 std::vector<std::string>
const&
processes = storedProcessBlockHelper.processesWithProcessBlockProducts();
596 ++nBranches[product.second.branchType()];
602 t->numberOfBranchesToAdd(nBranches[
i]);
606 for (
auto const& product : prodList) {
609 std::vector<std::string>
const&
processes = storedProcessBlockHelper.processesWithProcessBlockProducts();
634 processBlockTree->trainCache(
"*");
643 std::unique_ptr<TTree> entryDescriptionTree(
645 if (
nullptr == entryDescriptionTree.get()) {
663 if (idBuffer != entryDescriptionBuffer.
id()) {
666 entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.
id(), entryDescriptionBuffer));
673 if (newID != oldID) {
690 if (
nullptr == parentageTree.get()) {
708 if (newID != oldID) {
767 std::vector<TTree*> processBlockTrees;
768 std::vector<std::string> processesWithProcessBlockTrees;
772 processBlockTrees.push_back(processBlockTree->tree());
773 processesWithProcessBlockTrees.push_back(processBlockTree->processName());
783 std::move(processesWithProcessBlockTrees),
793 std::vector<TTree*> processBlockTrees;
794 std::vector<std::string> processesWithProcessBlockTrees;
798 processBlockTrees.push_back(processBlockTree->tree());
799 processesWithProcessBlockTrees.push_back(processBlockTree->processName());
808 std::move(processesWithProcessBlockTrees));
876 eventAux.id().event(),
925 event = eventAux.
event();
952 struct RunItemSortByRun {
953 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
return a.run_ <
b.run_; }
955 struct RunItemSortByRunPhid {
956 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
957 return a.run_ <
b.run_ || (!(
b.run_ <
a.run_) &&
a.phid_ <
b.phid_);
968 firstEventEntry_(
entry),
969 lastEventEntry_(
entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry :
entry + 1) {}
976 struct LumiItemSortByRunLumi {
977 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
978 return a.run_ <
b.run_ || (!(
b.run_ <
a.run_) &&
a.lumi_ <
b.lumi_);
981 struct LumiItemSortByRunLumiPhid {
982 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
987 if (
a.lumi_ <
b.lumi_)
989 if (
b.lumi_ <
a.lumi_)
991 return a.phid_ <
b.phid_;
1006 typedef std::list<LumiItem>
LumiList;
1009 typedef std::set<LuminosityBlockID> RunLumiSet;
1010 RunLumiSet runLumiSet;
1012 typedef std::list<RunItem>
RunList;
1015 typedef std::set<RunNumber_t> RunSet;
1018 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
1019 RunItemSet runItemSet;
1021 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
1036 bool newRun =
false;
1037 bool newLumi =
false;
1048 if (iFirst || prevPhid != reducedPHID || prevRun != evtAux.run()) {
1050 newRun = newLumi =
true;
1051 }
else if (prevLumi != evtAux.luminosityBlock()) {
1054 prevPhid = reducedPHID;
1055 prevRun = evtAux.run();
1056 prevLumi = evtAux.luminosityBlock();
1062 LumiItem& currentLumi =
lumis.back();
1064 ++currentLumi.lastEventEntry_;
1068 RunItem
item(reducedPHID, evtAux.run());
1069 if (runItemSet.insert(
item).second) {
1071 runSet.insert(evtAux.run());
1072 phidMap.insert(std::make_pair(evtAux.run(), reducedPHID));
1082 typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
1085 typedef std::vector<RunItem> RunVector;
1086 RunVector emptyRuns;
1095 if (runSet.insert(runAux->run()).
second) {
1097 emptyRuns.emplace_back(reducedPHID, runAux->run());
1100 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
1107 RunItemSortByRun runItemSortByRun;
1110 RunList::iterator itRuns =
runs.begin(), endRuns =
runs.end();
1111 for (
auto const& emptyRun : emptyRuns) {
1112 for (; itRuns != endRuns; ++itRuns) {
1113 if (runItemSortByRun(emptyRun, *itRuns)) {
1117 runs.insert(itRuns, emptyRun);
1122 typedef std::vector<LumiItem> LumiVector;
1123 LumiVector emptyLumis;
1125 typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
1126 RunLumiMap runLumiMap;
1133 if (runLumiSet.insert(lumiID).second) {
1138 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
1139 assert(iPhidMap != phidMap.end());
1140 emptyLumis.emplace_back(
1150 LumiItemSortByRunLumi lumiItemSortByRunLumi;
1153 LumiList::iterator itLumis =
lumis.begin(), endLumis =
lumis.end();
1154 for (
auto const& emptyLumi : emptyLumis) {
1155 for (; itLumis != endLumis; ++itLumis) {
1156 if (lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1160 lumis.insert(itLumis, emptyLumi);
1165 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1166 RunCountMap runCountMap;
1173 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
1174 if (countMapItem == runCountMap.end()) {
1175 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
1176 assert(countMapItem != runCountMap.end());
1179 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
1180 if (phidItem == phids.end()) {
1181 phids.push_back(
run.phid_);
1182 phidItem = phids.end() - 1;
1184 entries.emplace_back(countMapItem->second,
1187 phidItem - phids.begin(),
1195 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1196 LumiCountMap lumiCountMap;
1199 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1200 assert(runCountMapItem != runCountMap.end());
1201 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1202 if (countMapItem == lumiCountMap.end()) {
1203 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1204 assert(countMapItem != lumiCountMap.end());
1207 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1208 assert(phidItem != phids.end());
1209 entries.emplace_back(runCountMapItem->second,
1210 countMapItem->second,
1212 phidItem - phids.begin(),
1215 lumi.firstEventEntry_,
1216 lumi.lastEventEntry_);
1227 <<
"in the input file.\n";
1231 if (guidFromName !=
fid_.
fid()) {
1233 <<
"GUID " << guidFromName <<
" extracted from file name " <<
file_ 1234 <<
" is inconsistent with the GUID read from the file " <<
fid_.
fid();
1239 if (
runTree().entries() > 0) {
1245 for (
auto& phid : phidVec) {
1259 std::shared_ptr<IndexIntoFile::EventFinder>(std::make_shared<RootFileEventFinder>(
eventTree_)));
1262 bool needEventNumbers =
false;
1263 bool needIndexesForDuplicateChecker =
1265 if (inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1266 needEventNumbers =
true;
1268 bool needEventEntries =
false;
1271 needEventEntries =
true;
1287 treePointer->close();
1288 treePointer =
nullptr;
1320 if (eventToProcessBlockIndexesBranch ==
nullptr) {
1341 bool assertOnFailure) {
1359 if (!eventHistoryBranch) {
1362 eventHistoryBranch->SetAddress(&pHistory);
1365 eventSelectionIDs.swap(
history_->eventSelectionIDs());
1366 branchListIndexes.swap(
history_->branchListIndexes());
1371 assert(eventSelectionIDBranch !=
nullptr);
1375 assert(branchListIndexesBranch !=
nullptr);
1380 for (
auto& esID : eventSelectionIDs) {
1398 auto lumiAuxiliary = std::make_shared<LuminosityBlockAuxiliary>();
1409 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1412 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1417 return lumiAuxiliary;
1421 auto runAuxiliary = std::make_shared<RunAuxiliary>();
1427 RunAux* pRunAux = &runAux;
1432 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1435 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1437 return runAuxiliary;
1448 phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1456 if (
eventSkipperByID_->skipIt(runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event())) {
1463 phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event(),
file_)) {
1537 auto const& evtAux = principal.
aux();
1557 const_cast<EventID&
>(evtAux.id()).setLuminosityBlockNumber(evtAux.oldLuminosityBlock());
1558 evtAux.resetObsoleteInfo();
1563 if (!
fillEventHistory(evtAux, eventSelectionIDs, branchListIndexes, assertOnFailure)) {
1566 runHelper_->overrideRunNumber(evtAux.id(), evtAux.isRealData());
1583 : evtAux.processHistoryID());
1597 runHelper_->overrideRunNumber(runAuxiliary->id());
1598 return runAuxiliary;
1621 runHelper_->overrideRunNumber(runAuxiliary->id());
1622 filePtr_->reportInputRunNumber(runAuxiliary->run());
1641 runAuxiliary->setBeginTime(evtAux.time());
1652 runAuxiliary->setProcessHistoryID(evtAux.processHistoryID());
1657 return runAuxiliary;
1662 std::vector<unsigned int> nEntries;
1665 nEntries.push_back(processBlockTree->entries());
1669 std::make_unique<StoredProcessBlockHelper>();
1723 if (shouldProcessRun) {
1727 assert(entryNumber >= 0);
1728 mergeableRunProductMetadata->
readRun(
1740 return shouldProcessRun;
1743 if (shouldProcessRun) {
1756 return shouldProcessRun;
1771 return std::make_shared<LuminosityBlockAuxiliary>(
1779 runHelper_->overrideRunNumber(lumiAuxiliary->id());
1780 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1787 lumiAuxiliary->setBeginTime(evtAux.time());
1794 return lumiAuxiliary;
1804 return shouldProcessLumi;
1807 if (shouldProcessLumi) {
1824 return shouldProcessLumi;
1871 history_ = std::make_unique<History>();
1880 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
1899 for (
auto& product : pList) {
1905 prod.initBranchName();
1915 prod.setDropped(
true);
1920 if (
prod.present()) {
1921 prod.initFromDictionary();
1928 std::set<BranchID>& branchesToDrop,
1929 std::map<BranchID, BranchID>
const& droppedToKeptAlias)
const {
1930 if (dropDescendants) {
1933 branchesToDrop.insert(
branch.branchID());
1939 bool dropDescendants,
1947 std::map<BranchID, BranchID> droppedToKeptAlias;
1948 for (
auto const& product : prodList) {
1950 if (
prod.branchID() !=
prod.originalBranchID() &&
prod.present()) {
1951 droppedToKeptAlias[
prod.originalBranchID()] =
prod.branchID();
1962 std::set<BranchID> branchesToDrop;
1963 std::vector<BranchDescription const*> associationDescriptions;
1964 for (
auto const& product : prodList) {
1971 associationDescriptions.push_back(&
prod);
1988 std::set<BranchID> keptProductsInEvent;
1989 for (
auto const& product : prodList) {
1991 if (branchesToDrop.find(
prod.branchID()) == branchesToDrop.end() &&
prod.present() &&
1993 keptProductsInEvent.insert(
prod.branchID());
1998 std::map<BranchID, bool> keepAssociation;
2000 associationDescriptions, keptProductsInEvent, keepAssociation);
2002 for (
auto association : associationDescriptions) {
2009 auto temp = std::make_unique<ThinnedAssociationsHelper>();
2011 auto iter = keepAssociation.find(associationBranches.association());
2012 if (iter != keepAssociation.end() && iter->second) {
2013 temp->addAssociation(associationBranches);
2021 std::set<std::string> processesWithKeptProcessBlockProducts;
2022 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
2023 for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
2025 bool drop = branchesToDrop.find(
prod.branchID()) != branchesToDropEnd;
2027 if (!
prod.dropped()) {
2030 LogWarning(
"RootFile") <<
"Branch '" <<
prod.branchName() <<
"' is being dropped from the input\n" 2031 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n" 2032 <<
"that was explicitly dropped.\n";
2045 ProductRegistry::ProductList::iterator icopy = it;
2047 prodList.erase(icopy);
2050 processesWithKeptProcessBlockProducts.insert(
prod.processName());
2061 for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
2064 TClass*
cp =
prod.wrappedType().getClass();
2065 void*
p =
cp->New();
2068 if (edp->isMergeable()) {
2070 ProductRegistry::ProductList::iterator icopy = it;
2072 prodList.erase(icopy);
2083 std::set<std::string>
const& processesWithKeptProcessBlockProducts,
2101 std::vector<unsigned int> nEntries;
2104 nEntries.push_back(processBlockTree->entries());
2108 bool isModified =
false;
2109 std::vector<unsigned int> finalIndexToStoredIndex;
2111 if (firstInputFile) {
2113 storedProcessBlockHelper, processesWithKeptProcessBlockProducts, nEntries, finalIndexToStoredIndex);
2117 processesWithKeptProcessBlockProducts,
2119 finalIndexToStoredIndex,
2127 std::vector<edm::propagate_const<std::unique_ptr<RootTree>>> newProcessBlockTrees;
2129 for (
unsigned int j = 0;
j < nFinalProducts; ++
j) {
2130 unsigned int iStored = finalIndexToStoredIndex[
j];
2144 int treeMaxVirtualSize,
2145 bool enablePrefetching,
2173 return std::make_unique<MakeFullProvenanceReader>();
2175 auto entryDescriptionMap = std::make_unique<EntryDescriptionMap>();
2177 return std::make_unique<MakeOldProvenanceReader>(
std::move(entryDescriptionMap));
2179 return std::make_unique<MakeDummyProvenanceReader>();
2199 std::vector<ParentageID>
const& iParentageIDLookup,
2202 std::set<ProductProvenance>
readProvenance(
unsigned int)
const override;
2207 unsigned int transitionIndex,
2208 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2216 std::shared_ptr<std::recursive_mutex>
mutex_;
2221 std::vector<ParentageID>
const& iParentageIDLookup,
2224 rootTree_(iRootTree),
2225 pProvVector_(&provVector_),
2226 parentageIDLookup_(iParentageIDLookup),
2227 daqProvenanceHelper_(daqProvenanceHelper),
2236 template <
typename R>
2237 void readProvenanceAsyncImpl(
R const* iThis,
2240 unsigned int transitionIndex,
2241 std::atomic<
const std::set<ProductProvenance>*>& writeTo,
2243 SignalType
const*
pre,
2244 SignalType
const*
post) {
2245 if (
nullptr == writeTo.load()) {
2248 auto pWriteTo = &writeTo;
2253 *taskHolder.group(),
2261 serviceToken]()
mutable {
2262 if (
nullptr == pWriteTo->load()) {
2264 std::unique_ptr<const std::set<ProductProvenance>> prov;
2267 pre->emit(*(iContext->getStreamContext()), *iContext);
2269 prov = std::make_unique<const std::set<ProductProvenance>>(iThis->readProvenance(transitionIndex));
2271 post->emit(*(iContext->getStreamContext()), *iContext);
2276 post->emit(*(iContext->getStreamContext()), *iContext);
2279 holder.doneWaiting(std::current_exception());
2282 const std::set<ProductProvenance>* expected =
nullptr;
2284 if (pWriteTo->compare_exchange_strong(expected, prov.get())) {
2288 holder.doneWaiting(std::exception_ptr());
2296 unsigned int transitionIndex,
2297 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2298 readProvenanceAsyncImpl(
this,
2303 moduleCallingContext,
2304 rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2305 rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2310 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2312 me->rootTree_->fillBranchEntry(
2313 me->provBranch_,
me->rootTree_->entryNumberForIndex(transitionIndex),
me->pProvVector_);
2315 std::set<ProductProvenance> retValue;
2326 <<
"ReducedProvenanceReader::ReadProvenance\n" 2327 <<
"The parentage ID index value " << prov.parentageIDIndex_
2328 <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size() - 1 <<
".\n" 2329 <<
"This should never happen.\n" 2330 <<
"Please report this to the framework developers.";
2342 std::set<ProductProvenance>
readProvenance(
unsigned int transitionIndex)
const override;
2347 unsigned int transitionIndex,
2348 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2355 std::shared_ptr<std::recursive_mutex>
mutex_;
2361 rootTree_(rootTree),
2363 pInfoVector_(&infoVector_),
2364 daqProvenanceHelper_(daqProvenanceHelper),
2370 unsigned int transitionIndex,
2371 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2372 readProvenanceAsyncImpl(
this,
2377 moduleCallingContext,
2384 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2388 std::set<ProductProvenance> retValue;
2396 retValue.emplace(
info);
2408 std::set<ProductProvenance>
readProvenance(
unsigned int transitionIndex)
const override;
2413 unsigned int transitionIndex,
2414 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2422 std::shared_ptr<std::recursive_mutex>
mutex_;
2430 rootTree_(rootTree),
2432 pInfoVector_(&infoVector_),
2433 entryDescriptionMap_(theMap),
2434 daqProvenanceHelper_(daqProvenanceHelper),
2440 unsigned int transitionIndex,
2441 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2442 readProvenanceAsyncImpl(
this,
2447 moduleCallingContext,
2448 rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2449 rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2454 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2458 std::set<ProductProvenance> retValue;
2462 Parentage parentage(iter->second.parents());
2467 retValue.emplace(
info.branchID(), parentage.id());
2479 std::set<ProductProvenance>
readProvenance(
unsigned int)
const override;
2482 unsigned int transitionIndex,
2483 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2490 return std::set<ProductProvenance>{};
2494 unsigned int transitionIndex,
2495 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2496 if (
nullptr == writeTo.load()) {
2497 auto emptyProv = std::make_unique<const std::set<ProductProvenance>>();
2498 const std::set<ProductProvenance>* expected =
nullptr;
2499 if (writeTo.compare_exchange_strong(expected, emptyProv.get())) {
2500 emptyProv.release();
2507 return std::make_unique<DummyProvenanceReader>();
2512 return std::make_unique<OldProvenanceReader>(&rootTree, *
entryDescriptionMap_, daqProvenanceHelper);
2517 return std::make_unique<FullProvenanceReader>(&rootTree, daqProvenanceHelper);
2522 return std::make_unique<ReducedProvenanceReader>(&rootTree,
parentageIDLookup_, daqProvenanceHelper);
void initializeFromPrimaryInput(StoredProcessBlockHelper const &storedProcessBlockHelper)
int processHistoryIDIndex() const
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
std::vector< BranchDescription const * > allBranchDescriptions() const
IndexIntoFileItr begin(SortOrder sortOrder) const
void setShouldWriteRun(ShouldWriteRun value)
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
std::string const & processName() const
std::vector< ProcessConfiguration > ProcessConfigurationVector
void setShouldWriteLumi(ShouldWriteLumi value)
StoredProductProvenanceVector provVector_
std::string const & metaDataTreeName()
unsigned int const defaultNonEventLearningEntries
std::string const & fid() const
EntryNumber_t firstEventEntryThisRun()
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
EventToProcessBlockIndexes eventToProcessBlockIndexes_
std::string const & fileIdentifierBranchName()
static constexpr int invalidIndex
std::string const & mergeableRunProductMetadataBranchName()
std::vector< BranchIDList > BranchIDLists
std::string const & processBlockHelperBranchName()
std::shared_ptr< BranchIDLists const > branchIDLists_
roottree::EntryNumber EntryNumber
bool skipEvents(int &offset)
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
TTree const * tree() const
EntryDescriptionID id() const
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
EventNumber_t event() const
bool wasLastEventJustRead() const
ProductProvenanceVector infoVector_
static std::string const source("source")
static Timestamp invalidTimestamp()
ForwardSequence::const_iterator lower_bound_all(ForwardSequence const &s, Datum const &d)
wrappers for std::lower_bound
EventAuxiliary const & aux() const
unsigned int index() const
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
ProductList const & productList() const
TTree const * metaTree() const
EntryNumber const & entryNumber() const
void fillEventNumbers() const
EventAuxiliary fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
std::vector< std::string > const & processesWithProcessBlockProducts() const
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
bool enforceGUIDInFileName_
EntryNumber const & entryNumberForIndex(unsigned int index) const
static PFTauRenderPlugin instance
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
FileFormatVersion fileFormatVersion() const
MakeOldProvenanceReader(std::unique_ptr< EntryDescriptionMap > &&entryDescriptionMap)
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
ProcessHistoryID const & processHistoryID() const
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
std::string const & moduleDescriptionMapBranchName()
DaqProvenanceHelper const * daqProvenanceHelper_
std::map< std::string, std::string > newBranchToOldBranch_
EntryType getEntryType() const
constexpr unsigned int numberOfRunLumiEventProductTrees
std::map< BranchKey, BranchDescription > ProductList
std::string const & newBranchToOldBranch(std::string const &newBranch) const
bool registerProcessHistory(ProcessHistory const &processHistory)
std::shared_ptr< ProductRegistry const > productRegistry() const
bool setEntryAtRun(RunNumber_t run)
std::string_view stemFromPath(std::string_view path)
ProductProvenanceVector * pInfoVector_
edm::propagate_const< ProcessHistoryRegistry * > processHistoryRegistry_
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
edm::propagate_const< std::unique_ptr< DaqProvenanceHelper > > daqProvenanceHelper_
void updateTTreePointers(TTree *ev, TTree *meta, TTree *lumi, TTree *lumiMeta, TTree *run, TTree *runMeta, std::vector< TTree *> processBlockTrees, std::vector< std::string > processesWithProcessBlockTrees)
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
unsigned long long EventNumber_t
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
void dropProcessesAndReorder(StoredProcessBlockHelper &, std::set< std::string > const &processesWithKeptProcessBlockProducts, ProcessBlockHelper const *)
std::string const & processHistoryBranchName()
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
EventAuxiliary eventAuxCache_
EntryDescriptionMap const & entryDescriptionMap_
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
bool initializeFirstProcessBlockEntry()
std::string const & productDependenciesBranchName()
edm::propagate_const< std::unique_ptr< EntryDescriptionMap > > entryDescriptionMap_
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile)
InputSource::ProcessingMode processingMode_
~RootFileEventFinder() override
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const *> const &branchDescriptions)
void markBranchToBeDropped(bool dropDescendants, BranchDescription const &branch, std::set< BranchID > &branchesToDrop, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
bool fillEventHistory(EventAuxiliary &evtAux, EventSelectionIDVector &eventSelectionIDs, BranchListIndexes &branchListIndexes, bool assertOnFailure=true)
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
void stable_sort_all(RandomAccessSequence &s)
wrappers for std::stable_sort
std::shared_ptr< std::recursive_mutex > mutex_
bool initializedFromInput() const
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
StreamID streamID() const
void trainCache(char const *branchNames)
SharedResourcesAcquirer acquirer_
~FullProvenanceReader() override
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
std::string const & parameterSetMapBranchName()
unsigned int LuminosityBlockNumber_t
DelayedReader * rootDelayedReader() const
edm::propagate_const< ProcessBlockHelper * > processBlockHelper_
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
std::shared_ptr< BranchChildren const > branchChildren() const
std::string const & fileFormatVersionBranchName()
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
void advanceToNextLumiOrRun()
MakeReducedProvenanceReader(std::vector< ParentageID > const &parentageIDLookup)
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & productDescriptionBranchName()
edm::propagate_const< TClass * > edProductClass_
FileFormatVersion fileFormatVersion_
unsigned int currentProcessBlockTree_
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
LuminosityBlockNumber_t luminosityBlock() const
void fillEventToProcessBlockIndexes()
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
std::string const & branchIDListBranchName()
void updateFileBlock(FileBlock &)
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > *> &writeTo) const override
void fillProcessBlockPrincipal(std::string const &processName, DelayedReader *reader=nullptr)
TBranch * branchEntryInfoBranch() const
EventID const & id() const
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
edm::propagate_const< RootTree * > rootTree_
void setNumberOfEvents(EntryNumber_t nevents)
U second(std::pair< T, U > const &p)
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
std::string const & processHistoryMapBranchName()
bool dropProcessesAndReorderStored(StoredProcessBlockHelper &storedProcessBlockHelper, std::set< std::string > const &processesToKeep, std::vector< unsigned int > const &nEntries, std::vector< unsigned int > &finalIndexToStoredIndex, std::vector< std::string > const &firstFileFinalProcesses) const
DaqProvenanceHelper const * daqProvenanceHelper_
std::string const logicalFile_
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
void readParentageTree(InputType inputType)
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
edm::propagate_const< std::unique_ptr< StoredMergeableRunProductMetadata > > storedMergeableRunProductMetadata_
BranchID const & mapBranchID(BranchID const &branchID) const
void insertEntryForIndex(unsigned int index)
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
EntryNumber_t entry() const
void setPresenceInProductRegistry(ProductRegistry &, StoredProcessBlockHelper const &)
std::string friendlyName(std::string const &iFullName)
static constexpr RunNumber_t invalidRun
EventNumber_t getEventNumberOfEntry(roottree::EntryNumber entry) const override
std::string const & branchName() const
std::shared_ptr< std::recursive_mutex > mutex_
std::set< ProductProvenance > readProvenance(unsigned int transitionIndex) const override
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
void copyPosition(IndexIntoFileItr const &position)
Copy the position without modifying the pointer to the IndexIntoFile or size.
ShouldWriteRun shouldWriteRun() const
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > *> &writeTo) const override
Long64_t numEntries(TFile *hdl, std::string const &trname)
EntryNumber_t firstEventEntryThisLumi()
edm::propagate_const< RootTree * > rootTree_
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
bool shouldProcessRun() const
SerialTaskQueueChain & serialQueueChain() const
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
bool isEarlierRelease(std::string const &a, std::string const &b)
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
StoredProductProvenanceVector const * pProvVector_
void fillProcessBlockHelper_()
std::string const & parameterSetsTreeName()
std::set< ProductProvenance > readProvenance(unsigned int transitionIndex) const override
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
std::set< ProductProvenance > readProvenance(unsigned int) const override
static ServiceRegistry & instance()
std::string const & entryDescriptionBranchName()
edm::propagate_const< TBranch * > eventToProcessBlockIndexesBranch_
EntryNumber const & entries() const
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
std::vector< std::string > const & processesWithProcessBlockProducts() const
bool empty() const
True if no runs, lumis, or events are in the file.
std::map< ParameterSetID, ParameterSetID > ParameterSetIdConverter
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > *> &writeTo) const override
ProcessHistoryID const & processHistoryID(int i) const
std::shared_ptr< FileBlock > createFileBlock()
std::vector< edm::propagate_const< RootTree * > > treePointers_
unsigned int transitionIndex() const
bool insertMapped(value_type const &v, bool forceUpdate=false)
void updateFriendlyClassName()
std::string const & parentageBranchName()
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
EventAuxiliary const & fillThisEventAuxiliary()
std::string const & eventToProcessBlockIndexesBranchName()
bool selected(BranchDescription const &desc) const
bool nextProcessBlock_(ProcessBlockPrincipal &)
ParentageID const & mapParentageID(ParentageID const &phid) const
std::string const & idToParameterSetBlobsBranchName()
std::vector< BranchID > const & parents() const
Hash< ProcessHistoryType > ProcessHistoryID
LuminosityBlockNumber_t lumi() const
edm::propagate_const< std::unique_ptr< History > > history_
ProcessHistoryVector vector_type
std::vector< ProductProvenance > ProductProvenanceVector
ProcessHistoryID const & processHistoryID() const
std::string const & eventHistoryTreeName()
bool firstFileDropProcessesAndReorderStored(StoredProcessBlockHelper &storedProcessBlockHelper, std::set< std::string > const &processesToKeep, std::vector< unsigned int > const &nEntries, std::vector< unsigned int > &finalIndexToStoredIndex) const
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
IndexIntoFile & indexIntoFile_
SharedResourcesAcquirer acquirer_
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
std::string const & file() const
ProcessHistoryMap collection_type
bool goToEvent(EventID const &eventID)
std::string createGlobalIdentifier(bool binary=false)
std::string getReleaseVersion()
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
std::string const & eventSelectionsBranchName()
std::vector< RunOrLumiEntry > & setRunOrLumiEntries()
void conversion(EventAux const &from, EventAuxiliary &to)
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
std::string const & entryDescriptionIDBranchName()
bool wasFirstEventJustRead() const
static constexpr EntryNumber_t invalidEntry
LuminosityBlockNumber_t peekAheadAtLumi() const
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
std::shared_ptr< ProductRegistry const > productRegistry_
void setIfFastClonable(int remainingEvents, int remainingLumis)
int whyNotFastClonable() const
std::string const & processConfigurationBranchName()
std::vector< EventNumber_t > & unsortedEventNumbers()
bool readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
MergeableRunProductMetadata * mergeableRunProductMetadata()
void fillBranchEntry(TBranch *branch, T *&pbuf)
static constexpr LuminosityBlockNumber_t invalidLumi
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
void setIndex(unsigned int value)
std::string const & parentageTreeName()
void dropOnInputAndReorder(ProductRegistry &, ProductSelectorRules const &, bool dropDescendants, InputType, StoredProcessBlockHelper &, ProcessBlockHelper const *)
std::vector< edm::propagate_const< std::unique_ptr< RootTree > > > processBlockTrees_
bool readRun_(RunPrincipal &runPrincipal)
ProductList & productListUpdator()
void setProcessHistoryID(ProcessHistoryID const &phid)
IndexIntoFile::EntryNumber_t EntryNumber
std::vector< ParentageID > const & parentageIDLookup_
std::shared_ptr< std::recursive_mutex > mutex_
~OldProvenanceReader() override
std::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever(unsigned int iStreamIndex)
std::vector< StoredProductProvenance > StoredProductProvenanceVector
ShouldWriteLumi shouldWriteLumi() const
void readProcessBlock_(ProcessBlockPrincipal &)
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
void doneFileInitialization()
Clears the temporary vector of event numbers to reduce memory usage.
std::string const & eventHistoryBranchName()
edm::propagate_const< RunHelperBase * > runHelper_
bool branchListIndexesUnchanged_
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
edm::propagate_const< TTree * > eventHistoryTree_
void readAllFromSourceAndMergeImmediately(MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
std::vector< EventEntryInfo > * pInfoVector_
unsigned int const defaultNonEventCacheSize
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, std::shared_ptr< InputFile > filePtr, std::shared_ptr< EventSkipperByID > eventSkipperByID, bool skipAnyEvents, int remainingEvents, int remainingLumis, unsigned int nStreams, unsigned int treeCacheSize, int treeMaxVirtualSize, InputSource::ProcessingMode processingMode, RunHelperBase *runHelper, bool noRunLumiSort, bool noEventSort, ProductSelectorRules const &productSelectorRules, InputType inputType, std::shared_ptr< BranchIDListHelper > branchIDListHelper, ProcessBlockHelper *, std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper, std::vector< BranchID > const *associationsFromSecondary, std::shared_ptr< DuplicateChecker > duplicateChecker, bool dropDescendantsOfDroppedProducts, ProcessHistoryRegistry &processHistoryRegistry, std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool bypassVersionCheck, bool labelRawDataLikeMC, bool usingGoToEvent, bool enablePrefetching, bool enforceGUIDInFileName)
static int position[264][3]
bool branchListIndexesUnchanged() const
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
RootTree const & runTree() const
std::tuple< bool, bool > readCurrentEvent(EventPrincipal &cache, bool assertOnFailure=true)
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
std::string const & entryDescriptionTreeName()
void initAssociationsFromSecondary(std::vector< BranchID > const &)
~DummyProvenanceReader() override
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
void makeProcessBlockRootTrees(std::shared_ptr< InputFile > filePtr, int treeMaxVirtualSize, bool enablePrefetching, InputType inputType, StoredProcessBlockHelper const &storedProcessBlockHelper)
edm::propagate_const< TBranch * > provBranch_
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
bool readEvent(EventPrincipal &cache)
std::unique_ptr< WrapperBase > getWrapperBasePtr(void *p, int offset)
std::string const & branchListIndexesBranchName()
std::vector< ParentageID > parentageIDLookup_
LuminosityBlockAuxiliary const & aux() const
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
unsigned int value() const
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
std::vector< ParentageID > const & parentageIDLookup_
ReducedProvenanceReader(RootTree *iRootTree, std::vector< ParentageID > const &iParentageIDLookup, DaqProvenanceHelper const *daqProvenanceHelper)
Log< level::Warning, false > LogWarning
RootFileEventFinder(RootTree &eventTree)
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
std::string const & indexIntoFileBranchName()
bool endOfProcessBlocksReached() const
void validateFile(InputType inputType, bool usingGoToEvent)
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
std::set< ProductProvenance > readProvenance(unsigned int) const override
T first(std::pair< T, U > const &p)
std::unique_ptr< TTreeCache > trainCache(TTree *tree, InputFile &file, unsigned int cacheSize, char const *branchNames)
static ParentageRegistry * instance()
OldProvenanceReader(RootTree *rootTree, EntryDescriptionMap const &theMap, DaqProvenanceHelper const *daqProvenanceHelper)
SharedResourcesAcquirer acquirer_
unsigned int const defaultLearningEntries
void setEventFinder(std::shared_ptr< EventFinder > ptr)
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > *> &writeTo) const override
std::vector< EventEntryInfo > infoVector_
DelayedReader * resetAndGetRootDelayedReader() const
edm::propagate_const< std::unique_ptr< StoredProcessBlockHelper > > storedProcessBlockHelper_
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
ServiceToken presentToken() const
void setIsMergeable(BranchDescription &)
bool insertMapped(value_type const &v)
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
static Registry * instance()
EventNumber_t event() const
bool shouldProcessLumi() const
DaqProvenanceHelper const * daqProvenanceHelper_
void copyProduct(BranchDescription const &productdesc)
void readEventHistoryTree()
void push(oneapi::tbb::task_group &iGroup, T &&iAction)
asynchronously pushes functor iAction into queue
void setEntryNumber(EntryNumber theEntryNumber)
std::string const & thinnedAssociationsHelperBranchName()
std::vector< std::string > const & branchNames() const
void reportOpened(std::string const &inputType)