53 #include "TTreeCache.h"
87 if(inxBegin == inxEnd)
return 0;
88 int defaultOffset = (inxBegin.
run() != 0 ? 0 : 1);
89 int offset = (forcedRunNumber != 0U ? forcedRunNumber - inxBegin.
run() : defaultOffset);
92 <<
"The value of the 'setRunNumber' parameter must not be\n"
93 <<
"less than the first run number in the first input file.\n"
94 <<
"'setRunNumber' was " << forcedRunNumber <<
", while the first run was "
95 << forcedRunNumber - offset <<
".\n";
101 checkReleaseVersion(std::vector<ProcessHistory> processHistoryVector,
std::string const&
fileName) {
103 releaseversion::DecomposedReleaseVersion currentRelease(releaseVersion);
104 for(
auto const& ph : processHistoryVector) {
105 for(
auto const& pc : ph) {
109 <<
"a release (" << pc.releaseVersion() <<
") used in writing the input file, " << fileName <<
".\n"
110 <<
"Forward compatibility cannot be supported.\n";
130 return eventAux.
event();
141 std::shared_ptr<InputFile> filePtr,
142 std::shared_ptr<EventSkipperByID> eventSkipperByID,
146 unsigned int nStreams,
147 unsigned int treeCacheSize,
148 int treeMaxVirtualSize,
154 std::shared_ptr<BranchIDListHelper> branchIDListHelper,
155 std::shared_ptr<DuplicateChecker> duplicateChecker,
156 bool dropDescendants,
158 std::vector<std::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
159 std::vector<std::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
160 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
161 bool bypassVersionCheck,
162 bool labelRawDataLikeMC,
164 bool enablePrefetching) :
166 logicalFile_(logicalFileName),
167 processConfiguration_(processConfiguration),
168 processHistoryRegistry_(&processHistoryRegistry),
170 eventSkipperByID_(eventSkipperByID),
171 fileFormatVersion_(),
174 indexIntoFile_(*indexIntoFileSharedPtr_),
175 orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
177 indexIntoFileEnd_(indexIntoFileBegin_),
178 indexIntoFileIter_(indexIntoFileBegin_),
179 eventProcessHistoryIDs_(),
180 eventProcessHistoryIter_(eventProcessHistoryIDs_.
begin()),
181 savedRunAuxiliary_(),
182 skipAnyEvents_(skipAnyEvents),
183 noEventSort_(noEventSort),
184 whyNotFastClonable_(0),
185 hasNewlyDroppedBranch_(),
186 branchListIndexesUnchanged_(
false),
195 branchIDListHelper_(branchIDListHelper),
196 processingMode_(processingMode),
198 newBranchToOldBranch_(),
200 eventSelectionIDs_(),
201 branchListIndexes_(),
204 duplicateChecker_(duplicateChecker),
205 provenanceAdaptor_(),
206 provenanceReaderMaker_(),
207 eventProductProvenanceRetrievers_(),
208 parentageIDLookup_(),
209 daqProvenanceHelper_(),
210 edProductClass_(gROOT->GetClass(
"edm::WrapperBase")) {
221 if(
nullptr == metaDataTree.get()) {
223 <<
" in the input file.\n";
232 fft->SetAddress(&fftPtr);
253 typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
255 PsetMap *psetMapPtr = &psetMap;
264 if(
nullptr == psetTree.get()) {
266 <<
" in the input file.\n";
269 typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
271 IdToBlobs* pIdToBlob = &idToBlob;
275 psetTreeCache->SetEnablePrefetching(
false);
276 filePtr_->SetCacheRead(psetTreeCache.get());
277 for(Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
278 psetTree->GetEntry(
i);
279 psetMap.insert(idToBlob);
304 std::unique_ptr<BranchIDLists> branchIDListsAPtr(
new BranchIDLists);
343 for(
auto const& psetEntry : psetMap) {
345 pset.
setID(psetEntry.first);
355 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
true));
362 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
false));
367 <<
"Failed to find branchIDLists branch in metaData tree.\n";
372 if(!bypassVersionCheck) {
373 checkReleaseVersion(pHistVector,
file());
376 if(labelRawDataLikeMC) {
380 BranchKey finder(rawData, source,
"",
"");
381 ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
382 if(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source) {
397 it = pList.lower_bound(finder);
398 assert(!(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source));
408 for(
auto const& history : pHistVector) {
439 for(
auto& product : pList) {
450 for(
auto const& product : prodList) {
454 newReg->copyProduct(prod);
458 <<
"Cannot change friendly class name algorithm without more development work\n"
459 <<
"to update BranchIDLists. Contact the framework group.\n";
463 newReg->copyProduct(newBD);
467 dropOnInput(*newReg, productSelectorRules, dropDescendants, inputType);
475 for(
auto const& product : prodList) {
505 if(
nullptr == entryDescriptionTree.get()) {
507 <<
" in the input file.\n";
523 if(idBuffer != entryDescriptionBuffer.
id()) {
526 entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.
id(),entryDescriptionBuffer));
551 if(
nullptr == parentageTree.get()) {
553 <<
" in the input file.\n";
636 std::unique_ptr<FileBlock>
805 phid_(phid), run_(run) {}
809 struct RunItemSortByRun {
810 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
811 return a.run_ < b.run_;
814 struct RunItemSortByRunPhid {
815 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
816 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
822 phid_(phid), run_(run), lumi_(lumi), firstEventEntry_(entry),
823 lastEventEntry_(entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry : entry + 1) {}
830 struct LumiItemSortByRunLumi {
831 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
832 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
835 struct LumiItemSortByRunLumiPhid {
836 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
837 if(a.run_ < b.run_)
return true;
838 if(b.run_ < a.run_)
return false;
839 if(a.lumi_ < b.lumi_)
return true;
840 if(b.lumi_ < a.lumi_)
return false;
841 return a.phid_ < b.phid_;
857 typedef std::list<LumiItem> LumiList;
860 typedef std::set<LuminosityBlockID> RunLumiSet;
861 RunLumiSet runLumiSet;
863 typedef std::list<RunItem>
RunList;
866 typedef std::set<RunNumber_t> RunSet;
869 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
870 RunItemSet runItemSet;
872 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
886 bool newLumi =
false;
897 if(iFirst || prevPhid != reducedPHID || prevRun !=
eventAux().
run()) {
899 newRun = newLumi =
true;
900 }
else if(prevLumi !=
eventAux().luminosityBlock()) {
903 prevPhid = reducedPHID;
907 lumis.emplace_back(reducedPHID,
911 LumiItem& currentLumi = lumis.back();
913 ++currentLumi.lastEventEntry_;
918 if(runItemSet.insert(item).second) {
919 runs.push_back(std::move(item));
921 phidMap.insert(std::make_pair(
eventAux().
run(), reducedPHID));
932 typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
935 typedef std::vector<RunItem> RunVector;
945 if(runSet.insert(runAux->run()).
second) {
947 emptyRuns.emplace_back(reducedPHID, runAux->run());
950 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
957 RunItemSortByRun runItemSortByRun;
960 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
961 for(
auto const& emptyRun : emptyRuns) {
962 for(; itRuns != endRuns; ++itRuns) {
963 if(runItemSortByRun(emptyRun, *itRuns)) {
967 runs.insert(itRuns, emptyRun);
972 typedef std::vector<LumiItem> LumiVector;
973 LumiVector emptyLumis;
975 typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
976 RunLumiMap runLumiMap;
983 if(runLumiSet.insert(lumiID).second) {
988 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
989 assert(iPhidMap != phidMap.end());
999 LumiItemSortByRunLumi lumiItemSortByRunLumi;
1002 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
1003 for(
auto const& emptyLumi : emptyLumis) {
1004 for(; itLumis != endLumis; ++itLumis) {
1005 if(lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1009 lumis.insert(itLumis, emptyLumi);
1014 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1015 RunCountMap runCountMap;
1017 assert(phids.empty());
1019 assert(entries.empty());
1021 for(
auto&
run : runs) {
1022 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
1023 if(countMapItem == runCountMap.end()) {
1024 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
1025 assert(countMapItem != runCountMap.end());
1028 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
1029 if(phidItem == phids.end()) {
1030 phids.push_back(
run.phid_);
1031 phidItem = phids.end() - 1;
1033 entries.emplace_back(
1034 countMapItem->second,
1037 phidItem - phids.begin(),
1045 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1046 LumiCountMap lumiCountMap;
1048 for(
auto&
lumi : lumis) {
1049 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1050 assert(runCountMapItem != runCountMap.end());
1051 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1052 if(countMapItem == lumiCountMap.end()) {
1053 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1054 assert(countMapItem != lumiCountMap.end());
1057 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1058 assert(phidItem != phids.end());
1059 entries.emplace_back(
1060 runCountMapItem->second,
1061 countMapItem->second,
1063 phidItem - phids.begin(),
1066 lumi.firstEventEntry_,
1067 lumi.lastEventEntry_);
1079 "'Events' tree is corrupted or not present\n" <<
"in the input file.\n";
1089 for(
auto& phid : phidVec) {
1106 bool needEventNumbers =
false;
1108 if(inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1109 needEventNumbers =
true;
1111 bool needEventEntries =
false;
1114 needEventEntries =
true;
1138 treePointer->close();
1139 treePointer =
nullptr;
1194 if(!eventHistoryBranch) {
1196 <<
"Failed to find history branch in event history tree.\n";
1198 eventHistoryBranch->SetAddress(&pHistory);
1207 assert(eventSelectionIDBranch !=
nullptr);
1211 assert(branchListIndexesBranch !=
nullptr);
1230 std::shared_ptr<LuminosityBlockAuxiliary>
1232 auto lumiAuxiliary = std::make_shared<LuminosityBlockAuxiliary>();
1243 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1246 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1251 return lumiAuxiliary;
1254 std::shared_ptr<RunAuxiliary>
1256 auto runAuxiliary = std::make_shared<RunAuxiliary>();
1262 RunAux *pRunAux = &runAux;
1267 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1270 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1272 return runAuxiliary;
1433 std::shared_ptr<RunAuxiliary>
1457 filePtr_->reportInputRunNumber(runAuxiliary->run());
1486 runAuxiliary->setProcessHistoryID(
eventAux().processHistoryID());
1494 return runAuxiliary;
1514 std::shared_ptr<LuminosityBlockAuxiliary>
1535 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1549 return lumiAuxiliary;
1628 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
1646 <<
"Failed to find the event history tree.\n";
1653 std::vector<std::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
1654 std::vector<std::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile) {
1661 currentIndexIntoFile);
1675 std::set<BranchID> branchesToDrop;
1676 for(
auto const& product : prodList) {
1678 if(!productSelector.
selected(prod)) {
1679 if(dropDescendants) {
1682 branchesToDrop.insert(prod.
branchID());
1688 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1689 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1691 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
1693 if(productSelector.
selected(prod)) {
1695 <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
1696 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
1697 <<
"that was explicitly dropped.\n";
1701 ProductRegistry::ProductList::iterator icopy = it;
1703 prodList.erase(icopy);
1712 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1716 void*
p = cp->New();
1719 if(edp->isMergeable()) {
1721 ProductRegistry::ProductList::iterator icopy = it;
1723 prodList.erase(icopy);
1733 std::unique_ptr<MakeProvenanceReader>
1750 std::shared_ptr<ProductProvenanceRetriever>
1778 std::vector<ParentageID>
const& iParentageIDLookup,
1781 rootTree_(iRootTree),
1782 pProvVector_(&provVector_),
1783 parentageIDLookup_(iParentageIDLookup),
1784 daqProvenanceHelper_(daqProvenanceHelper),
1808 <<
"ReducedProvenanceReader::ReadProvenance\n"
1809 <<
"The parentage ID index value " << prov.parentageIDIndex_ <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size()-1 <<
".\n"
1810 <<
"This should never happen.\n"
1811 <<
"Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
1833 rootTree_(rootTree),
1835 pInfoVector_(&infoVector_),
1836 daqProvenanceHelper_(daqProvenanceHelper),
1875 rootTree_(rootTree),
1877 pInfoVector_(&infoVector_),
1878 entryDescriptionMap_(theMap),
1879 daqProvenanceHelper_(daqProvenanceHelper),
1894 Parentage parentage(iter->second.parents());
1924 std::unique_ptr<ProvenanceReaderBase>
1929 std::unique_ptr<ProvenanceReaderBase>
1934 std::unique_ptr<ProvenanceReaderBase>
1936 return std::unique_ptr<ProvenanceReaderBase>(
new FullProvenanceReader(&rootTree, daqProvenanceHelper));
1939 std::unique_ptr<ProvenanceReaderBase>
void dropOnInput(ProductRegistry ®, ProductSelectorRules const &rules, bool dropDescendants, InputType inputType)
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
virtual void readProvenance(ProductProvenanceRetriever const &provRetriever, unsigned int) const override
void setID(ParameterSetID const &id)
EventNumber_t event() const
std::string const & idToParameterSetBlobsBranchName()
std::unique_ptr< ProvenanceAdaptor > provenanceAdaptor_
std::vector< ProcessConfiguration > ProcessConfigurationVector
void setEventFinder(std::shared_ptr< EventFinder > ptr) const
std::string const & branchName() const
StoredProductProvenanceVector provVector_
bool selected(BranchDescription const &desc) const
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, RunNumber_t const &forcedRunNumber, bool noEventSort, ProductSelectorRules const &productSelectorRules, InputType inputType, std::shared_ptr< BranchIDListHelper > branchIDListHelper, 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)
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
unsigned int const defaultNonEventLearningEntries
std::unique_ptr< History > history_
void doneFileInitialization() const
Clears the temporary vector of event numbers to reduce memory usage.
static int const invalidIndex
BranchType const & branchType() const
std::string const & parentageTreeName()
static LuminosityBlockID firstValidLuminosityBlock()
std::vector< BranchIDList > BranchIDLists
std::shared_ptr< BranchIDLists const > branchIDLists_
std::string const & entryDescriptionBranchName()
bool skipEvents(int &offset)
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
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
bool branchListIndexesUnchanged() const
std::vector< std::string > const & branchNames() const
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
StoredProductProvenanceVector * pProvVector_
unsigned int EventNumber_t
static PFTauRenderPlugin instance
MakeOldProvenanceReader(std::unique_ptr< EntryDescriptionMap > &&entryDescriptionMap)
std::vector< BranchID > & parentsForUpdate()
DaqProvenanceHelper const * daqProvenanceHelper_
std::map< std::string, std::string > newBranchToOldBranch_
EntryNumber_t firstEventEntryThisRun() 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)
ProductProvenanceVector * pInfoVector_
Timestamp const & time() const
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
std::unique_ptr< MakeProvenanceReader > provenanceReaderMaker_
EntryNumber const & entries() const
void setRefCoreStreamer(bool resetAll=false)
std::string const & fileFormatVersionBranchName()
IndexIntoFileItr begin(SortOrder sortOrder) const
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
EntryDescriptionMap const & entryDescriptionMap_
std::vector< BranchID > const & parents() const
std::string const & eventSelectionsBranchName()
InputSource::ProcessingMode processingMode_
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
void stable_sort_all(RandomAccessSequence &s)
wrappers for std::stable_sort
static RunID firstValidRun()
LuminosityBlockNumber_t lumi() const
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
std::unique_ptr< FileBlock > createFileBlock() const
LuminosityBlockNumber_t luminosityBlock() const
void trainCache(char const *branchNames)
bool readCurrentEvent(EventPrincipal &cache)
virtual void readProvenance(ProductProvenanceRetriever const &provRetriever, unsigned int) const override
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
std::shared_ptr< ProductRegistry const > productRegistry() const
unsigned int LuminosityBlockNumber_t
virtual ~OldProvenanceReader()
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
TBranch * branchEntryInfoBranch() const
static int position[TOTALCHAMBERS][3]
void advanceToNextLumiOrRun()
void readImmediate() const
bool fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
MakeReducedProvenanceReader(std::vector< ParentageID > const &parentageIDLookup)
virtual ~DummyProvenanceReader()
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
std::vector< EventSelectionID > EventSelectionIDVector
LuminosityBlockNumber_t luminosityBlock() const
FileFormatVersion fileFormatVersion_
TTree const * metaTree() const
std::string const & parameterSetsTreeName()
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
ProductList const & productList() const
U second(std::pair< T, U > const &p)
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
virtual void readProvenance(ProductProvenanceRetriever const &provRetriever, unsigned int transitionIndex) const override
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
TTree const * tree() const
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
virtual void readProvenance(ProductProvenanceRetriever const &provRetriever, unsigned int transitionIndex) const override
void setParents(std::vector< BranchID > const &parents)
DaqProvenanceHelper const * daqProvenanceHelper_
std::string const logicalFile_
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
std::string moduleName(Provenance const &provenance)
void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
void readParentageTree(InputType inputType)
std::string const & processHistoryMapBranchName()
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
std::string const & className() const
std::unique_ptr< EntryDescriptionMap > entryDescriptionMap_
bool wasLastEventJustRead() const
void insertEntryForIndex(unsigned int index)
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
std::string friendlyName(std::string const &iFullName)
static RunNumber_t const invalidRun
std::string const & entryDescriptionTreeName()
std::string const & fid() const
RootTree const & runTree() const
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
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)
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
EventAuxiliary const & eventAux() const
EventSelectionIDVector eventSelectionIDs_
int processHistoryIDIndex() const
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
bool isEarlierRelease(std::string const &a, std::string const &b)
int whyNotFastClonable() const
StreamID streamID() const
BranchType branchType() const
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
std::vector< std::shared_ptr< ProductProvenanceRetriever > > eventProductProvenanceRetrievers_
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
BranchID const & branchID() const
void updateFriendlyClassName()
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
BranchListIndexes branchListIndexes_
std::string const & metaDataTreeName()
LuminosityBlockNumber_t oldLuminosityBlock() const
EntryDescriptionID id() const
unsigned int offset(bool)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
IndexIntoFile::EntryNumber_t EntryNumber
bool wasFirstEventJustRead() const
std::string const & parameterSetMapBranchName()
Hash< ProcessHistoryType > ProcessHistoryID
ProcessHistoryVector vector_type
std::vector< ProductProvenance > ProductProvenanceVector
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
void readImmediate() const
std::string const & processHistoryBranchName()
IndexIntoFile & indexIntoFile_
virtual ~FullProvenanceReader()
std::shared_ptr< InputFile > filePtr_
void readEvent(EventPrincipal &cache)
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 getReleaseVersion()
std::shared_ptr< EventSkipperByID > eventSkipperByID_
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_
std::vector< EventNumber_t > & unsortedEventNumbers() const
unsigned int value() const
static EntryNumber_t const invalidEntry
SharedResourcesAcquirer resourceAcquirer_
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)
void fillBranchEntry(TBranch *branch, T *&pbuf)
static LuminosityBlockNumber_t const invalidLumi
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
virtual EventNumber_t getEventNumberOfEntry(roottree::EntryNumber entry) const override
std::string const & parentageBranchName()
std::shared_ptr< BranchChildren > branchChildren_
LuminosityBlockNumber_t luminosityBlock() const
ProcessHistoryID const & processHistoryID(int i) const
ProductList & productListUpdator()
void setProcessHistoryID(ProcessHistoryID const &phid)
unsigned int transitionIndex() const
std::vector< ParentageID > const & parentageIDLookup_
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()
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
EntryNumber_t firstEventEntryThisLumi() const
ProcessHistoryID const & processHistoryID() const
EventID const & id() const
std::unique_ptr< DaqProvenanceHelper > daqProvenanceHelper_
bool branchListIndexesUnchanged_
SharedResourcesAcquirer resourceAcquirer_
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
std::vector< EventEntryInfo > * pInfoVector_
unsigned int const defaultNonEventCacheSize
RootTreePtrArray treePointers_
void fillEventNumbers() const
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile)
std::shared_ptr< DuplicateChecker > duplicateChecker_
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
std::string const & productDependenciesBranchName()
void setNumberOfEvents(EntryNumber_t nevents) const
void overrideRunNumber(RunID &id)
std::string const & entryDescriptionIDBranchName()
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
std::unique_ptr< WrapperBase > getWrapperBasePtr(void *p, int offset)
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
std::vector< ParentageID > parentageIDLookup_
void fillThisEventAuxiliary()
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
ProcessHistoryRegistry * processHistoryRegistry_
volatile std::atomic< bool > shutdown_flag false
std::vector< ParentageID > const & parentageIDLookup_
ReducedProvenanceReader(RootTree *iRootTree, std::vector< ParentageID > const &iParentageIDLookup, DaqProvenanceHelper const *daqProvenanceHelper)
std::string const & eventHistoryTreeName()
RootFileEventFinder(RootTree &eventTree)
ParentageID const & mapParentageID(ParentageID const &phid) const
void validateFile(InputType inputType, bool usingGoToEvent)
bool insertMapped(value_type const &v)
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
std::string const & newBranchToOldBranch(std::string const &newBranch) const
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)
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
unsigned int const defaultLearningEntries
EntryNumber_t entry() const
std::vector< EventEntryInfo > infoVector_
TTree * eventHistoryTree_
LuminosityBlockNumber_t peekAheadAtLumi() const
std::string const & fileIdentifierBranchName()
SharedResourcesAcquirer resourceAcquirer_
std::shared_ptr< RunAuxiliary > savedRunAuxiliary_
std::string const & wrappedName() const
virtual ~RootFileEventFinder()
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_
std::string createGlobalIdentifier()
void copyProduct(BranchDescription const &productdesc)
void readEventHistoryTree()
void setEntryNumber(EntryNumber theEntryNumber)
void reportOpened(std::string const &inputType)
void insertIntoSet(ProductProvenance const &provenanceProduct) const