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),
238 processingMode_(processingMode),
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>();
375 std::make_unique<ThinnedAssociationsHelper>();
379 &thinnedAssociationsHelperPtr);
416 for (
auto const& psetEntry : psetMap) {
418 pset.setID(psetEntry.first);
429 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
true);
437 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
false);
449 <<
"Failed to find thinnedAssociationsHelper branch in metaData tree.\n";
453 if (!bypassVersionCheck) {
454 checkReleaseVersion(pHistVector,
file());
457 if (labelRawDataLikeMC) {
461 BranchKey finder(rawData, source,
"",
"");
462 ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
463 if (it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source) {
479 it = pList.lower_bound(finder);
480 assert(!(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source));
490 for (
auto const&
history : pHistVector) {
528 auto newReg = std::make_unique<ProductRegistry>();
533 for (
auto const& product : prodList) {
537 newReg->copyProduct(prod);
541 <<
"Cannot change friendly class name algorithm without more development work\n"
542 <<
"to update BranchIDLists and ThinnedAssociationsHelper. Contact the framework group.\n";
546 newReg->copyProduct(newBD);
552 *newReg, productSelectorRules, dropDescendants, inputType, storedProcessBlockHelper, processBlockHelper);
556 *associationsFromSecondary);
563 for (
auto& product : newReg->productListUpdator()) {
568 for (
auto& product : newReg->productListUpdator()) {
569 product.second.setOnDemand(
true);
586 for (
auto const& product : prodList) {
587 if (product.second.branchType() ==
InProcess) {
588 std::vector<std::string>
const&
processes = storedProcessBlockHelper.processesWithProcessBlockProducts();
589 auto it =
std::find(processes.begin(), processes.end(), product.second.processName());
590 if (it != processes.end()) {
595 ++nBranches[product.second.branchType()];
601 t->numberOfBranchesToAdd(nBranches[i]);
605 for (
auto const& product : prodList) {
608 std::vector<std::string>
const&
processes = storedProcessBlockHelper.processesWithProcessBlockProducts();
610 if (it != processes.end()) {
633 processBlockTree->trainCache(
"*");
642 std::unique_ptr<TTree> entryDescriptionTree(
644 if (
nullptr == entryDescriptionTree.get()) {
662 if (idBuffer != entryDescriptionBuffer.
id()) {
665 entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.
id(), entryDescriptionBuffer));
672 if (newID != oldID) {
689 if (
nullptr == parentageTree.get()) {
707 if (newID != oldID) {
766 std::vector<TTree*> processBlockTrees;
767 std::vector<std::string> processesWithProcessBlockTrees;
771 processBlockTrees.push_back(processBlockTree->tree());
772 processesWithProcessBlockTrees.push_back(processBlockTree->processName());
782 std::move(processesWithProcessBlockTrees),
792 std::vector<TTree*> processBlockTrees;
793 std::vector<std::string> processesWithProcessBlockTrees;
797 processBlockTrees.push_back(processBlockTree->tree());
798 processesWithProcessBlockTrees.push_back(processBlockTree->processName());
807 std::move(processesWithProcessBlockTrees));
875 eventAux.id().event(),
924 event = eventAux.
event();
951 struct RunItemSortByRun {
952 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
return a.run_ < b.run_; }
954 struct RunItemSortByRunPhid {
955 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
956 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
967 firstEventEntry_(entry),
968 lastEventEntry_(entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry : entry + 1) {}
975 struct LumiItemSortByRunLumi {
976 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
977 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
980 struct LumiItemSortByRunLumiPhid {
981 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
986 if (a.lumi_ < b.lumi_)
988 if (b.lumi_ < a.lumi_)
990 return a.phid_ < b.phid_;
1005 typedef std::list<LumiItem> LumiList;
1008 typedef std::set<LuminosityBlockID> RunLumiSet;
1009 RunLumiSet runLumiSet;
1011 typedef std::list<RunItem>
RunList;
1014 typedef std::set<RunNumber_t> RunSet;
1017 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
1018 RunItemSet runItemSet;
1020 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
1035 bool newRun =
false;
1036 bool newLumi =
false;
1047 if (iFirst || prevPhid != reducedPHID || prevRun != evtAux.run()) {
1049 newRun = newLumi =
true;
1050 }
else if (prevLumi != evtAux.luminosityBlock()) {
1053 prevPhid = reducedPHID;
1054 prevRun = evtAux.run();
1055 prevLumi = evtAux.luminosityBlock();
1061 LumiItem& currentLumi = lumis.back();
1063 ++currentLumi.lastEventEntry_;
1067 RunItem
item(reducedPHID, evtAux.run());
1068 if (runItemSet.insert(
item).second) {
1070 runSet.insert(evtAux.run());
1071 phidMap.insert(std::make_pair(evtAux.run(), reducedPHID));
1081 typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
1084 typedef std::vector<RunItem> RunVector;
1085 RunVector emptyRuns;
1094 if (runSet.insert(runAux->run()).
second) {
1096 emptyRuns.emplace_back(reducedPHID, runAux->run());
1099 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
1106 RunItemSortByRun runItemSortByRun;
1109 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
1110 for (
auto const& emptyRun : emptyRuns) {
1111 for (; itRuns != endRuns; ++itRuns) {
1112 if (runItemSortByRun(emptyRun, *itRuns)) {
1116 runs.insert(itRuns, emptyRun);
1121 typedef std::vector<LumiItem> LumiVector;
1122 LumiVector emptyLumis;
1124 typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
1125 RunLumiMap runLumiMap;
1132 if (runLumiSet.insert(lumiID).second) {
1137 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
1138 assert(iPhidMap != phidMap.end());
1139 emptyLumis.emplace_back(
1149 LumiItemSortByRunLumi lumiItemSortByRunLumi;
1152 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
1153 for (
auto const& emptyLumi : emptyLumis) {
1154 for (; itLumis != endLumis; ++itLumis) {
1155 if (lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1159 lumis.insert(itLumis, emptyLumi);
1164 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1165 RunCountMap runCountMap;
1171 for (
auto&
run : runs) {
1172 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
1173 if (countMapItem == runCountMap.end()) {
1174 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
1175 assert(countMapItem != runCountMap.end());
1178 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
1179 if (phidItem == phids.end()) {
1180 phids.push_back(
run.phid_);
1181 phidItem = phids.end() - 1;
1183 entries.emplace_back(countMapItem->second,
1186 phidItem - phids.begin(),
1194 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1195 LumiCountMap lumiCountMap;
1197 for (
auto&
lumi : lumis) {
1198 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1199 assert(runCountMapItem != runCountMap.end());
1200 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1201 if (countMapItem == lumiCountMap.end()) {
1202 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1203 assert(countMapItem != lumiCountMap.end());
1206 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1207 assert(phidItem != phids.end());
1208 entries.emplace_back(runCountMapItem->second,
1209 countMapItem->second,
1211 phidItem - phids.begin(),
1214 lumi.firstEventEntry_,
1215 lumi.lastEventEntry_);
1226 <<
"in the input file.\n";
1230 if (guidFromName !=
fid_.
fid()) {
1232 <<
"GUID " << guidFromName <<
" extracted from file name " <<
file_
1233 <<
" is inconsistent with the GUID read from the file " <<
fid_.
fid();
1238 if (
runTree().entries() > 0) {
1244 for (
auto& phid : phidVec) {
1258 std::shared_ptr<IndexIntoFile::EventFinder>(std::make_shared<RootFileEventFinder>(
eventTree_)));
1261 bool needEventNumbers =
false;
1262 bool needIndexesForDuplicateChecker =
1264 if (inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1265 needEventNumbers =
true;
1267 bool needEventEntries =
false;
1270 needEventEntries =
true;
1286 treePointer->close();
1287 treePointer =
nullptr;
1319 if (eventToProcessBlockIndexesBranch ==
nullptr) {
1340 bool assertOnFailure) {
1358 if (!eventHistoryBranch) {
1361 eventHistoryBranch->SetAddress(&pHistory);
1364 eventSelectionIDs.swap(
history_->eventSelectionIDs());
1365 branchListIndexes.swap(
history_->branchListIndexes());
1370 assert(eventSelectionIDBranch !=
nullptr);
1374 assert(branchListIndexesBranch !=
nullptr);
1379 for (
auto& esID : eventSelectionIDs) {
1397 auto lumiAuxiliary = std::make_shared<LuminosityBlockAuxiliary>();
1408 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1411 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1416 return lumiAuxiliary;
1420 auto runAuxiliary = std::make_shared<RunAuxiliary>();
1426 RunAux* pRunAux = &runAux;
1431 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1434 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1436 return runAuxiliary;
1447 phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1455 if (
eventSkipperByID_->skipIt(runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event())) {
1462 phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event(),
file_)) {
1469 while (offset < 0) {
1536 auto const& evtAux = principal.
aux();
1551 return {
found, succeeded};
1556 const_cast<EventID&
>(evtAux.id()).setLuminosityBlockNumber(evtAux.oldLuminosityBlock());
1557 evtAux.resetObsoleteInfo();
1562 if (!
fillEventHistory(evtAux, eventSelectionIDs, branchListIndexes, assertOnFailure)) {
1565 runHelper_->overrideRunNumber(evtAux.id(), evtAux.isRealData());
1582 : evtAux.processHistoryID());
1588 return {
found, succeeded};
1596 runHelper_->overrideRunNumber(runAuxiliary->id());
1597 return runAuxiliary;
1620 runHelper_->overrideRunNumber(runAuxiliary->id());
1621 filePtr_->reportInputRunNumber(runAuxiliary->run());
1640 runAuxiliary->setBeginTime(evtAux.time());
1651 runAuxiliary->setProcessHistoryID(evtAux.processHistoryID());
1656 return runAuxiliary;
1661 std::vector<unsigned int> nEntries;
1664 nEntries.push_back(processBlockTree->entries());
1668 std::make_unique<StoredProcessBlockHelper>();
1723 assert(entryNumber >= 0);
1724 mergeableRunProductMetadata->
readRun(
1757 return std::make_shared<LuminosityBlockAuxiliary>(
1765 runHelper_->overrideRunNumber(lumiAuxiliary->id());
1766 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1773 lumiAuxiliary->setBeginTime(evtAux.time());
1780 return lumiAuxiliary;
1852 history_ = std::make_unique<History>();
1854 if (!eventHistoryTree_) {
1861 std::vector<std::shared_ptr<IndexIntoFile>>
const& indexesIntoFiles,
1880 for (
auto& product : pList) {
1886 if (it != processes.end()) {
1902 std::set<BranchID>& branchesToDrop,
1903 std::map<BranchID, BranchID>
const& droppedToKeptAlias)
const {
1904 if (dropDescendants) {
1905 branchChildren_->appendToDescendants(branch, branchesToDrop, droppedToKeptAlias);
1907 branchesToDrop.insert(branch.
branchID());
1913 bool dropDescendants,
1921 std::map<BranchID, BranchID> droppedToKeptAlias;
1922 for (
auto const& product : prodList) {
1936 std::set<BranchID> branchesToDrop;
1937 std::vector<BranchDescription const*> associationDescriptions;
1938 for (
auto const& product : prodList) {
1945 associationDescriptions.push_back(&prod);
1949 }
else if (!productSelector.
selected(prod)) {
1962 std::set<BranchID> keptProductsInEvent;
1963 for (
auto const& product : prodList) {
1965 if (branchesToDrop.find(prod.
branchID()) == branchesToDrop.end() && prod.
present() &&
1967 keptProductsInEvent.insert(prod.
branchID());
1972 std::map<BranchID, bool> keepAssociation;
1974 associationDescriptions, keptProductsInEvent, keepAssociation);
1976 for (
auto association : associationDescriptions) {
1983 auto temp = std::make_unique<ThinnedAssociationsHelper>();
1985 auto iter = keepAssociation.find(associationBranches.association());
1986 if (iter != keepAssociation.end() && iter->second) {
1987 temp->addAssociation(associationBranches);
1995 std::set<std::string> processesWithKeptProcessBlockProducts;
1996 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1997 for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1999 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
2004 LogWarning(
"RootFile") <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
2005 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
2006 <<
"that was explicitly dropped.\n";
2011 assert(it != processes.end());
2019 ProductRegistry::ProductList::iterator icopy = it;
2021 prodList.erase(icopy);
2024 processesWithKeptProcessBlockProducts.insert(prod.
processName());
2035 for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
2039 void*
p = cp->New();
2042 if (edp->isMergeable()) {
2044 ProductRegistry::ProductList::iterator icopy = it;
2046 prodList.erase(icopy);
2057 std::set<std::string>
const& processesWithKeptProcessBlockProducts,
2075 std::vector<unsigned int> nEntries;
2078 nEntries.push_back(processBlockTree->entries());
2082 bool isModified =
false;
2083 std::vector<unsigned int> finalIndexToStoredIndex;
2085 if (firstInputFile) {
2087 storedProcessBlockHelper, processesWithKeptProcessBlockProducts, nEntries, finalIndexToStoredIndex);
2091 processesWithKeptProcessBlockProducts,
2093 finalIndexToStoredIndex,
2101 std::vector<edm::propagate_const<std::unique_ptr<RootTree>>> newProcessBlockTrees;
2103 for (
unsigned int j = 0;
j < nFinalProducts; ++
j) {
2104 unsigned int iStored = finalIndexToStoredIndex[
j];
2105 newProcessBlockTrees.push_back(
std::move(processBlockTrees_[iStored]));
2107 processBlockTrees_.swap(newProcessBlockTrees);
2118 int treeMaxVirtualSize,
2119 bool enablePrefetching,
2147 return std::make_unique<MakeFullProvenanceReader>();
2149 auto entryDescriptionMap = std::make_unique<EntryDescriptionMap>();
2151 return std::make_unique<MakeOldProvenanceReader>(
std::move(entryDescriptionMap));
2153 return std::make_unique<MakeDummyProvenanceReader>();
2173 std::vector<ParentageID>
const& iParentageIDLookup,
2176 std::set<ProductProvenance>
readProvenance(
unsigned int)
const override;
2181 unsigned int transitionIndex,
2182 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2190 std::shared_ptr<std::recursive_mutex>
mutex_;
2195 std::vector<ParentageID>
const& iParentageIDLookup,
2198 rootTree_(iRootTree),
2199 pProvVector_(&provVector_),
2200 parentageIDLookup_(iParentageIDLookup),
2201 daqProvenanceHelper_(daqProvenanceHelper),
2210 template <
typename R>
2211 void readProvenanceAsyncImpl(
R const* iThis,
2214 unsigned int transitionIndex,
2215 std::atomic<
const std::set<ProductProvenance>*>& writeTo,
2217 SignalType
const* pre,
2218 SignalType
const* post) {
2219 if (
nullptr == writeTo.load()) {
2222 auto pWriteTo = &writeTo;
2227 *taskHolder.group(),
2235 serviceToken]()
mutable {
2236 if (
nullptr == pWriteTo->load()) {
2238 std::unique_ptr<const std::set<ProductProvenance>> prov;
2241 pre->emit(*(iContext->getStreamContext()), *iContext);
2243 prov = std::make_unique<const std::set<ProductProvenance>>(iThis->readProvenance(transitionIndex));
2245 post->emit(*(iContext->getStreamContext()), *iContext);
2250 post->emit(*(iContext->getStreamContext()), *iContext);
2253 holder.doneWaiting(std::current_exception());
2256 const std::set<ProductProvenance>* expected =
nullptr;
2258 if (pWriteTo->compare_exchange_strong(expected, prov.get())) {
2262 holder.doneWaiting(std::exception_ptr());
2270 unsigned int transitionIndex,
2271 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2272 readProvenanceAsyncImpl(
this,
2277 moduleCallingContext,
2278 rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2279 rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2284 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2289 std::set<ProductProvenance> retValue;
2300 <<
"ReducedProvenanceReader::ReadProvenance\n"
2301 <<
"The parentage ID index value " << prov.parentageIDIndex_
2302 <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size() - 1 <<
".\n"
2303 <<
"This should never happen.\n"
2304 <<
"Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
2316 std::set<ProductProvenance>
readProvenance(
unsigned int transitionIndex)
const override;
2321 unsigned int transitionIndex,
2322 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2329 std::shared_ptr<std::recursive_mutex>
mutex_;
2335 rootTree_(rootTree),
2337 pInfoVector_(&infoVector_),
2338 daqProvenanceHelper_(daqProvenanceHelper),
2344 unsigned int transitionIndex,
2345 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2346 readProvenanceAsyncImpl(
this,
2351 moduleCallingContext,
2358 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2362 std::set<ProductProvenance> retValue;
2370 retValue.emplace(
info);
2382 std::set<ProductProvenance>
readProvenance(
unsigned int transitionIndex)
const override;
2387 unsigned int transitionIndex,
2388 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2396 std::shared_ptr<std::recursive_mutex>
mutex_;
2404 rootTree_(rootTree),
2406 pInfoVector_(&infoVector_),
2407 entryDescriptionMap_(theMap),
2408 daqProvenanceHelper_(daqProvenanceHelper),
2414 unsigned int transitionIndex,
2415 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2416 readProvenanceAsyncImpl(
this,
2421 moduleCallingContext,
2422 rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2423 rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2428 std::lock_guard<std::recursive_mutex> guard(*
mutex_);
2432 std::set<ProductProvenance> retValue;
2436 Parentage parentage(iter->second.parents());
2441 retValue.emplace(
info.branchID(), parentage.id());
2453 std::set<ProductProvenance>
readProvenance(
unsigned int)
const override;
2456 unsigned int transitionIndex,
2457 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const override;
2464 return std::set<ProductProvenance>{};
2468 unsigned int transitionIndex,
2469 std::atomic<
const std::set<ProductProvenance>*>& writeTo)
const {
2470 if (
nullptr == writeTo.load()) {
2471 auto emptyProv = std::make_unique<const std::set<ProductProvenance>>();
2472 const std::set<ProductProvenance>* expected =
nullptr;
2473 if (writeTo.compare_exchange_strong(expected, emptyProv.get())) {
2474 emptyProv.release();
2481 return std::make_unique<DummyProvenanceReader>();
2486 return std::make_unique<OldProvenanceReader>(&rootTree, *
entryDescriptionMap_, daqProvenanceHelper);
2491 return std::make_unique<FullProvenanceReader>(&rootTree, daqProvenanceHelper);
2496 return std::make_unique<ReducedProvenanceReader>(&rootTree,
parentageIDLookup_, daqProvenanceHelper);
void initializeFromPrimaryInput(StoredProcessBlockHelper const &storedProcessBlockHelper)
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
EventNumber_t event() const
list processes
Run mode ##.
std::string const & idToParameterSetBlobsBranchName()
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
std::vector< ProcessConfiguration > ProcessConfigurationVector
std::string const & branchName() const
StoredProductProvenanceVector provVector_
bool selected(BranchDescription const &desc) const
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
unsigned int const defaultNonEventLearningEntries
EntryNumber_t firstEventEntryThisRun()
EventToProcessBlockIndexes eventToProcessBlockIndexes_
static constexpr int invalidIndex
BranchType const & branchType() const
std::string const & parentageTreeName()
std::vector< BranchIDList > BranchIDLists
std::shared_ptr< BranchIDLists const > branchIDLists_
roottree::EntryNumber EntryNumber
std::string const & entryDescriptionBranchName()
bool skipEvents(int &offset)
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
bool initializedFromInput() const
FileFormatVersion fileFormatVersion() const
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
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
bool firstFileDropProcessesAndReorderStored(StoredProcessBlockHelper &storedProcessBlockHelper, std::set< std::string > const &processesToKeep, std::vector< unsigned int > const &nEntries, std::vector< unsigned int > &finalIndexToStoredIndex) const
uint16_t *__restrict__ id
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
bool branchListIndexesUnchanged() const
std::vector< std::string > const & branchNames() const
EventAuxiliary fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
void push(tbb::task_group &iGroup, T &&iAction)
asynchronously pushes functor iAction into queue
bool enforceGUIDInFileName_
static PFTauRenderPlugin instance
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
MakeOldProvenanceReader(std::unique_ptr< EntryDescriptionMap > &&entryDescriptionMap)
std::vector< BranchID > & parentsForUpdate()
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
std::map< std::string, std::string > newBranchToOldBranch_
constexpr unsigned int numberOfRunLumiEventProductTrees
ProcessHistoryID const & processHistoryID() const
bool empty() const
True if no runs, lumis, or events are in the file.
std::map< BranchKey, BranchDescription > ProductList
BranchID const & mapBranchID(BranchID const &branchID) const
EntryType getEntryType() const
bool registerProcessHistory(ProcessHistory const &processHistory)
bool setEntryAtRun(RunNumber_t run)
void readRun_(RunPrincipal &runPrincipal)
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_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
unsigned long long EventNumber_t
EntryNumber const & entries() const
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
LuminosityBlockAuxiliary const & aux() const
std::string const & fileFormatVersionBranchName()
void dropProcessesAndReorder(StoredProcessBlockHelper &, std::set< std::string > const &processesWithKeptProcessBlockProducts, ProcessBlockHelper const *)
IndexIntoFileItr begin(SortOrder sortOrder) const
std::string const & processName() const
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
EventAuxiliary eventAuxCache_
EntryDescriptionMap const & entryDescriptionMap_
std::vector< BranchID > const & parents() const
bool initializeFirstProcessBlockEntry()
std::string const & eventSelectionsBranchName()
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_
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) 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_
EventAuxiliary const & fillThisEventAuxiliary()
LuminosityBlockNumber_t lumi() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
LuminosityBlockNumber_t luminosityBlock() const
void trainCache(char const *branchNames)
SharedResourcesAcquirer acquirer_
~FullProvenanceReader() override
ServiceToken presentToken() const
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
std::shared_ptr< ProductRegistry const > productRegistry() const
unsigned int LuminosityBlockNumber_t
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
edm::propagate_const< ProcessBlockHelper * > processBlockHelper_
TBranch * branchEntryInfoBranch() const
void advanceToNextLumiOrRun()
MakeReducedProvenanceReader(std::vector< ParentageID > const &parentageIDLookup)
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
std::vector< EventSelectionID > EventSelectionIDVector
edm::propagate_const< TClass * > edProductClass_
FileFormatVersion fileFormatVersion_
unsigned int currentProcessBlockTree_
TTree const * metaTree() const
std::string const & parameterSetsTreeName()
void fillEventToProcessBlockIndexes()
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
void updateFileBlock(FileBlock &)
void fillProcessBlockPrincipal(std::string const &processName, DelayedReader *reader=nullptr)
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
edm::propagate_const< RootTree * > rootTree_
void setNumberOfEvents(EntryNumber_t nevents)
ProductList const & productList() const
U second(std::pair< T, U > const &p)
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
TTree const * tree() const
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
DaqProvenanceHelper const * daqProvenanceHelper_
std::string const logicalFile_
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
void readParentageTree(InputType inputType)
std::string const & processHistoryMapBranchName()
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
edm::propagate_const< std::unique_ptr< StoredMergeableRunProductMetadata > > storedMergeableRunProductMetadata_
TClass * getClass() const
std::string const & className() const
bool wasLastEventJustRead() const
void insertEntryForIndex(unsigned int index)
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
DelayedReader * resetAndGetRootDelayedReader() const
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
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 & entryDescriptionTreeName()
std::string const & fid() const
std::shared_ptr< std::recursive_mutex > mutex_
std::string const & mergeableRunProductMetadataBranchName()
RootTree const & runTree() const
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.
std::string const & indexIntoFileBranchName()
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
std::string const & eventHistoryBranchName()
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
Long64_t numEntries(TFile *hdl, std::string const &trname)
EntryNumber_t firstEventEntryThisLumi()
edm::propagate_const< RootTree * > rootTree_
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
int processHistoryIDIndex() const
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
bool isEarlierRelease(std::string const &a, std::string const &b)
StoredProductProvenanceVector const * pProvVector_
int whyNotFastClonable() const
void fillProcessBlockHelper_()
std::set< ProductProvenance > readProvenance(unsigned int transitionIndex) const override
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
StreamID streamID() const
std::set< ProductProvenance > readProvenance(unsigned int) const override
static ServiceRegistry & instance()
edm::propagate_const< TBranch * > eventToProcessBlockIndexesBranch_
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::vector< BranchDescription const * > allBranchDescriptions() const
std::map< ParameterSetID, ParameterSetID > ParameterSetIdConverter
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
std::string const & friendlyClassName() const
std::shared_ptr< FileBlock > createFileBlock()
std::vector< edm::propagate_const< RootTree * > > treePointers_
BranchID const & branchID() const
TypeWithDict const & unwrappedType() const
void setDropped(bool isDropped)
bool insertMapped(value_type const &v, bool forceUpdate=false)
void updateFriendlyClassName()
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
std::string const & metaDataTreeName()
EntryDescriptionID id() const
bool wasFirstEventJustRead() const
bool nextProcessBlock_(ProcessBlockPrincipal &)
bool entryContinues() const
std::string const & parameterSetMapBranchName()
std::string const & eventToProcessBlockIndexesBranchName()
Hash< ProcessHistoryType > ProcessHistoryID
edm::propagate_const< std::unique_ptr< History > > history_
ProcessHistoryVector vector_type
SerialTaskQueueChain & serialQueueChain() const
std::vector< ProductProvenance > ProductProvenanceVector
std::vector< std::string > const & processesWithProcessBlockProducts() const
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
std::string const & processHistoryBranchName()
IndexIntoFile & indexIntoFile_
void updateTTreePointers(TTree *ev, TTree *meta, TTree *lumi, TTree *lumiMeta, TTree *run, TTree *runMeta, std::vector< TTree * > processBlockTrees, std::vector< std::string > processesWithProcessBlockTrees)
SharedResourcesAcquirer acquirer_
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
EntryNumber const & entryNumber() const
ProcessHistoryMap collection_type
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
bool goToEvent(EventID const &eventID)
std::string createGlobalIdentifier(bool binary=false)
std::string getReleaseVersion()
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
DelayedReader * rootDelayedReader() const
std::vector< RunOrLumiEntry > & setRunOrLumiEntries()
EntryNumber const & entryNumberForIndex(unsigned int index) const
void conversion(EventAux const &from, EventAuxiliary &to)
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
unsigned int value() const
std::string const & processName() const
std::vector< std::string > const & processesWithProcessBlockProducts() const
static constexpr EntryNumber_t invalidEntry
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)
std::vector< EventNumber_t > & unsortedEventNumbers()
MergeableRunProductMetadata * mergeableRunProductMetadata()
void fillBranchEntry(TBranch *branch, T *&pbuf)
static constexpr LuminosityBlockNumber_t invalidLumi
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
std::string const & parentageBranchName()
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
void setIndex(unsigned int value)
std::shared_ptr< BranchChildren const > branchChildren() const
void dropOnInputAndReorder(ProductRegistry &, ProductSelectorRules const &, bool dropDescendants, InputType, StoredProcessBlockHelper &, ProcessBlockHelper const *)
std::vector< edm::propagate_const< std::unique_ptr< RootTree > > > processBlockTrees_
LuminosityBlockNumber_t luminosityBlock() const
ProcessHistoryID const & processHistoryID(int i) const
ProductList & productListUpdator()
void setProcessHistoryID(ProcessHistoryID const &phid)
unsigned int transitionIndex() const
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
std::string const & file() const
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
void readProcessBlock_(ProcessBlockPrincipal &)
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
ProcessHistoryID const & processHistoryID() const
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
void doneFileInitialization()
Clears the temporary vector of event numbers to reduce memory usage.
EventID const & id() const
edm::propagate_const< RunHelperBase * > runHelper_
bool branchListIndexesUnchanged_
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
bool endOfProcessBlocksReached() const
edm::propagate_const< TTree * > eventHistoryTree_
void readAllFromSourceAndMergeImmediately(MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
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)
void fillEventNumbers() const
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
static int position[264][3]
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
std::tuple< bool, bool > readCurrentEvent(EventPrincipal &cache, bool assertOnFailure=true)
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
std::string const & productDependenciesBranchName()
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
void initAssociationsFromSecondary(std::vector< BranchID > const &)
std::string const & thinnedAssociationsHelperBranchName()
void setParents(std::vector< BranchID > parents)
std::string const & entryDescriptionIDBranchName()
~DummyProvenanceReader() override
void setWillBeContinued(bool iContinued)
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 & branchIDListBranchName()
BranchID const & originalBranchID() const
std::string const & branchListIndexesBranchName()
std::vector< ParentageID > parentageIDLookup_
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
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
std::string const & eventHistoryTreeName()
RootFileEventFinder(RootTree &eventTree)
ParentageID const & mapParentageID(ParentageID const &phid) const
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
void validateFile(InputType inputType, bool usingGoToEvent)
std::set< ProductProvenance > readProvenance(unsigned int) const override
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
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
std::string const & newBranchToOldBranch(std::string const &newBranch) const
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_
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
unsigned int const defaultLearningEntries
void setEventFinder(std::shared_ptr< EventFinder > ptr)
EntryNumber_t entry() const
std::vector< EventEntryInfo > infoVector_
void markBranchToBeDropped(bool dropDescendants, BranchDescription const &branch, std::set< BranchID > &branchesToDrop, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
EventAuxiliary const & aux() const
edm::propagate_const< std::unique_ptr< StoredProcessBlockHelper > > storedProcessBlockHelper_
LuminosityBlockNumber_t peekAheadAtLumi() const
std::string const & fileIdentifierBranchName()
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
unsigned int index() const
void setIsMergeable(BranchDescription &)
std::string const & processBlockHelperBranchName()
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
EventNumber_t event() const
std::string const & moduleDescriptionMapBranchName()
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()
DaqProvenanceHelper const * daqProvenanceHelper_
TypeWithDict const & wrappedType() const
void copyProduct(BranchDescription const &productdesc)
void readEventHistoryTree()
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
void setEntryNumber(EntryNumber theEntryNumber)
void reportOpened(std::string const &inputType)