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);
418 for (
auto const& psetEntry : psetMap) {
420 pset.setID(psetEntry.first);
430 exception.addContext(
"Creating ParameterSets from file");
441 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
true);
449 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
false);
461 <<
"Failed to find thinnedAssociationsHelper branch in metaData tree.\n";
465 if (!bypassVersionCheck) {
466 checkReleaseVersion(pHistVector,
file());
469 if (labelRawDataLikeMC) {
474 ProductRegistry::ProductList::iterator it = pList.lower_bound(
finder);
475 if (it != pList.end() && it->first.friendlyClassName() ==
rawData && it->first.moduleLabel() ==
source) {
491 it = pList.lower_bound(
finder);
492 assert(!(it != pList.end() && it->first.friendlyClassName() ==
rawData && it->first.moduleLabel() ==
source));
502 for (
auto const& history : pHistVector) {
540 auto newReg = std::make_unique<ProductRegistry>();
545 for (
auto const& product : prodList) {
548 if (newFriendlyName ==
prod.friendlyClassName()) {
549 newReg->copyProduct(
prod);
553 <<
"Cannot change friendly class name algorithm without more development work\n" 554 <<
"to update BranchIDLists and ThinnedAssociationsHelper. Contact the framework group.\n";
558 newReg->copyProduct(newBD);
564 *newReg, productSelectorRules, dropDescendants, inputType, storedProcessBlockHelper, processBlockHelper);
568 *associationsFromSecondary);
575 for (
auto& product : newReg->productListUpdator()) {
580 for (
auto& product : newReg->productListUpdator()) {
581 product.second.setOnDemand(
true);
598 for (
auto const& product : prodList) {
599 if (product.second.branchType() ==
InProcess) {
600 std::vector<std::string>
const&
processes = storedProcessBlockHelper.processesWithProcessBlockProducts();
607 ++nBranches[product.second.branchType()];
613 t->numberOfBranchesToAdd(nBranches[
i]);
617 for (
auto const& product : prodList) {
620 std::vector<std::string>
const&
processes = storedProcessBlockHelper.processesWithProcessBlockProducts();
645 processBlockTree->trainCache(
"*");
654 std::unique_ptr<TTree> entryDescriptionTree(
656 if (
nullptr == entryDescriptionTree.get()) {
674 if (idBuffer != entryDescriptionBuffer.
id()) {
677 entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.
id(), entryDescriptionBuffer));
684 if (newID != oldID) {
701 if (
nullptr == parentageTree.get()) {
719 if (newID != oldID) {
778 std::vector<TTree*> processBlockTrees;
779 std::vector<std::string> processesWithProcessBlockTrees;
783 processBlockTrees.push_back(processBlockTree->tree());
784 processesWithProcessBlockTrees.push_back(processBlockTree->processName());
794 std::move(processesWithProcessBlockTrees),
804 std::vector<TTree*> processBlockTrees;
805 std::vector<std::string> processesWithProcessBlockTrees;
809 processBlockTrees.push_back(processBlockTree->tree());
810 processesWithProcessBlockTrees.push_back(processBlockTree->processName());
819 std::move(processesWithProcessBlockTrees));
887 eventAux.id().event(),
936 event = eventAux.
event();
963 struct RunItemSortByRun {
964 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
return a.run_ <
b.run_; }
966 struct RunItemSortByRunPhid {
967 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
968 return a.run_ <
b.run_ || (!(
b.run_ <
a.run_) &&
a.phid_ <
b.phid_);
979 firstEventEntry_(
entry),
980 lastEventEntry_(
entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry :
entry + 1) {}
987 struct LumiItemSortByRunLumi {
988 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
989 return a.run_ <
b.run_ || (!(
b.run_ <
a.run_) &&
a.lumi_ <
b.lumi_);
992 struct LumiItemSortByRunLumiPhid {
993 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
998 if (
a.lumi_ <
b.lumi_)
1000 if (
b.lumi_ <
a.lumi_)
1002 return a.phid_ <
b.phid_;
1017 typedef std::list<LumiItem>
LumiList;
1020 typedef std::set<LuminosityBlockID> RunLumiSet;
1021 RunLumiSet runLumiSet;
1023 typedef std::list<RunItem>
RunList;
1026 typedef std::set<RunNumber_t> RunSet;
1029 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
1030 RunItemSet runItemSet;
1032 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
1047 bool newRun =
false;
1048 bool newLumi =
false;
1059 if (iFirst || prevPhid != reducedPHID || prevRun != evtAux.run()) {
1061 newRun = newLumi =
true;
1062 }
else if (prevLumi != evtAux.luminosityBlock()) {
1065 prevPhid = reducedPHID;
1066 prevRun = evtAux.run();
1067 prevLumi = evtAux.luminosityBlock();
1073 LumiItem& currentLumi =
lumis.back();
1075 ++currentLumi.lastEventEntry_;
1079 RunItem
item(reducedPHID, evtAux.run());
1080 if (runItemSet.insert(
item).second) {
1082 runSet.insert(evtAux.run());
1083 phidMap.insert(std::make_pair(evtAux.run(), reducedPHID));
1093 typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
1096 typedef std::vector<RunItem> RunVector;
1097 RunVector emptyRuns;
1106 if (runSet.insert(runAux->run()).
second) {
1108 emptyRuns.emplace_back(reducedPHID, runAux->run());
1111 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
1118 RunItemSortByRun runItemSortByRun;
1121 RunList::iterator itRuns =
runs.begin(), endRuns =
runs.end();
1122 for (
auto const& emptyRun : emptyRuns) {
1123 for (; itRuns != endRuns; ++itRuns) {
1124 if (runItemSortByRun(emptyRun, *itRuns)) {
1128 runs.insert(itRuns, emptyRun);
1133 typedef std::vector<LumiItem> LumiVector;
1134 LumiVector emptyLumis;
1136 typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
1137 RunLumiMap runLumiMap;
1144 if (runLumiSet.insert(lumiID).second) {
1149 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
1150 assert(iPhidMap != phidMap.end());
1151 emptyLumis.emplace_back(
1161 LumiItemSortByRunLumi lumiItemSortByRunLumi;
1164 LumiList::iterator itLumis =
lumis.begin(), endLumis =
lumis.end();
1165 for (
auto const& emptyLumi : emptyLumis) {
1166 for (; itLumis != endLumis; ++itLumis) {
1167 if (lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1171 lumis.insert(itLumis, emptyLumi);
1176 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1177 RunCountMap runCountMap;
1184 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
1185 if (countMapItem == runCountMap.end()) {
1186 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
1187 assert(countMapItem != runCountMap.end());
1190 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
1191 if (phidItem == phids.end()) {
1192 phids.push_back(
run.phid_);
1193 phidItem = phids.end() - 1;
1195 entries.emplace_back(countMapItem->second,
1198 phidItem - phids.begin(),
1206 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1207 LumiCountMap lumiCountMap;
1210 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1211 assert(runCountMapItem != runCountMap.end());
1212 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1213 if (countMapItem == lumiCountMap.end()) {
1214 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1215 assert(countMapItem != lumiCountMap.end());
1218 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1219 assert(phidItem != phids.end());
1220 entries.emplace_back(runCountMapItem->second,
1221 countMapItem->second,
1223 phidItem - phids.begin(),
1226 lumi.firstEventEntry_,
1227 lumi.lastEventEntry_);
1238 <<
"in the input file.\n";
1242 if (guidFromName !=
fid_.
fid()) {
1244 <<
"GUID " << guidFromName <<
" extracted from file name " <<
file_ 1245 <<
" is inconsistent with the GUID read from the file " <<
fid_.
fid();
1250 if (
runTree().entries() > 0) {
1256 for (
auto& phid : phidVec) {
1270 std::shared_ptr<IndexIntoFile::EventFinder>(std::make_shared<RootFileEventFinder>(
eventTree_)));
1273 bool needEventNumbers =
false;
1274 bool needIndexesForDuplicateChecker =
1276 if (inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1277 needEventNumbers =
true;
1279 bool needEventEntries =
false;
1282 needEventEntries =
true;
1298 treePointer->close();
1299 treePointer =
nullptr;
1331 if (eventToProcessBlockIndexesBranch ==
nullptr) {
1352 bool assertOnFailure) {
1370 if (!eventHistoryBranch) {
1373 eventHistoryBranch->SetAddress(&pHistory);
1376 eventSelectionIDs.swap(
history_->eventSelectionIDs());
1377 branchListIndexes.swap(
history_->branchListIndexes());
1382 assert(eventSelectionIDBranch !=
nullptr);
1386 assert(branchListIndexesBranch !=
nullptr);
1391 for (
auto& esID : eventSelectionIDs) {
1409 auto lumiAuxiliary = std::make_shared<LuminosityBlockAuxiliary>();
1420 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1423 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1428 return lumiAuxiliary;
1432 auto runAuxiliary = std::make_shared<RunAuxiliary>();
1438 RunAux* pRunAux = &runAux;
1443 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1446 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1448 return runAuxiliary;
1459 phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1467 if (
eventSkipperByID_->skipIt(runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event())) {
1474 phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event(),
file_)) {
1548 auto const& evtAux = principal.
aux();
1568 const_cast<EventID&
>(evtAux.id()).setLuminosityBlockNumber(evtAux.oldLuminosityBlock());
1569 evtAux.resetObsoleteInfo();
1574 if (!
fillEventHistory(evtAux, eventSelectionIDs, branchListIndexes, assertOnFailure)) {
1577 runHelper_->overrideRunNumber(evtAux.id(), evtAux.isRealData());
1594 : evtAux.processHistoryID());
1608 runHelper_->overrideRunNumber(runAuxiliary->id());
1609 return runAuxiliary;
1632 runHelper_->overrideRunNumber(runAuxiliary->id());
1633 filePtr_->reportInputRunNumber(runAuxiliary->run());
1652 runAuxiliary->setBeginTime(evtAux.time());
1663 runAuxiliary->setProcessHistoryID(evtAux.processHistoryID());
1668 return runAuxiliary;
1673 std::vector<unsigned int> nEntries;
1676 nEntries.push_back(processBlockTree->entries());
1680 std::make_unique<StoredProcessBlockHelper>();
1734 if (shouldProcessRun) {
1738 assert(entryNumber >= 0);
1739 mergeableRunProductMetadata->
readRun(
1751 return shouldProcessRun;
1754 if (shouldProcessRun) {
1767 return shouldProcessRun;
1782 return std::make_shared<LuminosityBlockAuxiliary>(
1790 runHelper_->overrideRunNumber(lumiAuxiliary->id());
1791 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1798 lumiAuxiliary->setBeginTime(evtAux.time());
1805 return lumiAuxiliary;
1815 return shouldProcessLumi;
1818 if (shouldProcessLumi) {
1835 return shouldProcessLumi;
1882 history_ = std::make_unique<History>();
1891 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
1910 for (
auto& product : pList) {
1922 prod.setDropped(
true);
1932 std::set<BranchID>& branchesToDrop,
1933 std::map<BranchID, BranchID>
const& droppedToKeptAlias)
const {
1934 if (dropDescendants) {
1937 branchesToDrop.insert(
branch.branchID());
1943 bool dropDescendants,
1951 std::map<BranchID, BranchID> droppedToKeptAlias;
1952 for (
auto const& product : prodList) {
1954 if (
prod.branchID() !=
prod.originalBranchID() &&
prod.present()) {
1955 droppedToKeptAlias[
prod.originalBranchID()] =
prod.branchID();
1966 std::set<BranchID> branchesToDrop;
1967 std::vector<BranchDescription const*> associationDescriptions;
1968 for (
auto const& product : prodList) {
1975 associationDescriptions.push_back(&
prod);
1992 std::set<BranchID> keptProductsInEvent;
1993 for (
auto const& product : prodList) {
1995 if (branchesToDrop.find(
prod.branchID()) == branchesToDrop.end() &&
prod.present() &&
1997 keptProductsInEvent.insert(
prod.branchID());
2002 std::map<BranchID, bool> keepAssociation;
2004 associationDescriptions, keptProductsInEvent, keepAssociation);
2006 for (
auto association : associationDescriptions) {
2013 auto temp = std::make_unique<ThinnedAssociationsHelper>();
2015 auto iter = keepAssociation.find(associationBranches.association());
2016 if (iter != keepAssociation.end() && iter->second) {
2017 temp->addAssociation(associationBranches);
2025 std::set<std::string> processesWithKeptProcessBlockProducts;
2026 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
2027 for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
2029 bool drop = branchesToDrop.find(
prod.branchID()) != branchesToDropEnd;
2031 if (!
prod.dropped()) {
2034 LogWarning(
"RootFile") <<
"Branch '" <<
prod.branchName() <<
"' is being dropped from the input\n" 2035 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n" 2036 <<
"that was explicitly dropped.\n";
2049 ProductRegistry::ProductList::iterator icopy = it;
2051 prodList.erase(icopy);
2054 processesWithKeptProcessBlockProducts.insert(
prod.processName());
2065 for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
2068 TClass*
cp =
prod.wrappedType().getClass();
2069 void*
p =
cp->New();
2072 if (edp->isMergeable()) {
2074 ProductRegistry::ProductList::iterator icopy = it;
2076 prodList.erase(icopy);
2087 std::set<std::string>
const& processesWithKeptProcessBlockProducts,
2105 std::vector<unsigned int> nEntries;
2108 nEntries.push_back(processBlockTree->entries());
2112 bool isModified =
false;
2113 std::vector<unsigned int> finalIndexToStoredIndex;
2115 if (firstInputFile) {
2117 storedProcessBlockHelper, processesWithKeptProcessBlockProducts, nEntries, finalIndexToStoredIndex);
2121 processesWithKeptProcessBlockProducts,
2123 finalIndexToStoredIndex,
2131 std::vector<edm::propagate_const<std::unique_ptr<RootTree>>> newProcessBlockTrees;
2133 for (
unsigned int j = 0;
j < nFinalProducts; ++
j) {
2134 unsigned int iStored = finalIndexToStoredIndex[
j];
2148 int treeMaxVirtualSize,
2149 bool enablePrefetching,
2177 return std::make_unique<MakeFullProvenanceReader>();
2179 auto entryDescriptionMap = std::make_unique<EntryDescriptionMap>();
2181 return std::make_unique<MakeOldProvenanceReader>(
std::move(entryDescriptionMap));
2183 return std::make_unique<MakeDummyProvenanceReader>();
2203 std::vector<ParentageID>
const& iParentageIDLookup,
2206 std::set<ProductProvenance>
readProvenance(
unsigned int)
const override;
2211 unsigned int transitionIndex,
2212 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2220 std::shared_ptr<std::recursive_mutex>
mutex_;
2225 std::vector<ParentageID>
const& iParentageIDLookup,
2228 rootTree_(iRootTree),
2229 pProvVector_(&provVector_),
2230 parentageIDLookup_(iParentageIDLookup),
2231 daqProvenanceHelper_(daqProvenanceHelper),
2240 template <
typename R>
2241 void readProvenanceAsyncImpl(
R const* iThis,
2244 unsigned int transitionIndex,
2245 std::atomic<
const std::set<ProductProvenance>*>& writeTo,
2247 SignalType
const* pre,
2248 SignalType
const* post) {
2249 if (
nullptr == writeTo.load()) {
2252 auto pWriteTo = &writeTo;
2257 *taskHolder.group(),
2265 serviceToken]()
mutable {
2266 if (
nullptr == pWriteTo->load()) {
2268 std::unique_ptr<const std::set<ProductProvenance>> prov;
2271 pre->emit(*(iContext->getStreamContext()), *iContext);
2273 prov = std::make_unique<const std::set<ProductProvenance>>(iThis->readProvenance(transitionIndex));
2275 post->emit(*(iContext->getStreamContext()), *iContext);
2280 post->emit(*(iContext->getStreamContext()), *iContext);
2283 holder.doneWaiting(std::current_exception());
2286 const std::set<ProductProvenance>* expected =
nullptr;
2288 if (pWriteTo->compare_exchange_strong(expected, prov.get())) {
2292 holder.doneWaiting(std::exception_ptr());
2300 unsigned int transitionIndex,
2301 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2302 readProvenanceAsyncImpl(
this,
2307 moduleCallingContext,
2308 rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2309 rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2314 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2316 me->rootTree_->fillBranchEntry(
2317 me->provBranch_,
me->rootTree_->entryNumberForIndex(transitionIndex),
me->pProvVector_);
2319 std::set<ProductProvenance> retValue;
2330 <<
"ReducedProvenanceReader::ReadProvenance\n" 2331 <<
"The parentage ID index value " << prov.parentageIDIndex_
2332 <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size() - 1 <<
".\n" 2333 <<
"This should never happen.\n" 2334 <<
"Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
2346 std::set<ProductProvenance>
readProvenance(
unsigned int transitionIndex)
const override;
2351 unsigned int transitionIndex,
2352 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2359 std::shared_ptr<std::recursive_mutex>
mutex_;
2365 rootTree_(rootTree),
2367 pInfoVector_(&infoVector_),
2368 daqProvenanceHelper_(daqProvenanceHelper),
2374 unsigned int transitionIndex,
2375 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2376 readProvenanceAsyncImpl(
this,
2381 moduleCallingContext,
2388 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2392 std::set<ProductProvenance> retValue;
2400 retValue.emplace(
info);
2412 std::set<ProductProvenance>
readProvenance(
unsigned int transitionIndex)
const override;
2417 unsigned int transitionIndex,
2418 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2426 std::shared_ptr<std::recursive_mutex>
mutex_;
2434 rootTree_(rootTree),
2436 pInfoVector_(&infoVector_),
2437 entryDescriptionMap_(theMap),
2438 daqProvenanceHelper_(daqProvenanceHelper),
2444 unsigned int transitionIndex,
2445 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2446 readProvenanceAsyncImpl(
this,
2451 moduleCallingContext,
2452 rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2453 rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2458 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2462 std::set<ProductProvenance> retValue;
2466 Parentage parentage(iter->second.parents());
2471 retValue.emplace(
info.branchID(), parentage.id());
2483 std::set<ProductProvenance>
readProvenance(
unsigned int)
const override;
2486 unsigned int transitionIndex,
2487 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2494 return std::set<ProductProvenance>{};
2498 unsigned int transitionIndex,
2499 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2500 if (
nullptr == writeTo.load()) {
2501 auto emptyProv = std::make_unique<const std::set<ProductProvenance>>();
2502 const std::set<ProductProvenance>* expected =
nullptr;
2503 if (writeTo.compare_exchange_strong(expected, emptyProv.get())) {
2504 emptyProv.release();
2511 return std::make_unique<DummyProvenanceReader>();
2516 return std::make_unique<OldProvenanceReader>(&rootTree, *
entryDescriptionMap_, daqProvenanceHelper);
2521 return std::make_unique<FullProvenanceReader>(&rootTree, daqProvenanceHelper);
2526 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)
Code categoryCode() const
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
std::string message() 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)