51 #include "TTreeCache.h"
85 if(inxBegin == inxEnd)
return 0;
86 int defaultOffset = (inxBegin.
run() != 0 ? 0 : 1);
87 int offset = (forcedRunNumber != 0U ? forcedRunNumber - inxBegin.
run() : defaultOffset);
90 <<
"The value of the 'setRunNumber' parameter must not be\n"
91 <<
"less than the first run number in the first input file.\n"
92 <<
"'setRunNumber' was " << forcedRunNumber <<
", while the first run was "
93 << forcedRunNumber - offset <<
".\n";
99 checkReleaseVersion(std::vector<ProcessHistory> processHistoryVector,
std::string const&
fileName) {
101 releaseversion::DecomposedReleaseVersion currentRelease(releaseVersion);
102 for(
auto const& ph : processHistoryVector) {
103 for(
auto const& pc : ph) {
107 <<
"a release (" << pc.releaseVersion() <<
") used in writing the input file, " << fileName <<
".\n"
108 <<
"Forward compatibility cannot be supported.\n";
128 return eventAux.
event();
139 boost::shared_ptr<InputFile> filePtr,
140 boost::shared_ptr<EventSkipperByID> eventSkipperByID,
144 unsigned int nStreams,
145 unsigned int treeCacheSize,
146 int treeMaxVirtualSize,
152 boost::shared_ptr<BranchIDListHelper> branchIDListHelper,
153 boost::shared_ptr<DuplicateChecker> duplicateChecker,
154 bool dropDescendants,
156 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
157 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
158 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
159 bool bypassVersionCheck,
160 bool labelRawDataLikeMC,
162 bool enablePrefetching) :
164 logicalFile_(logicalFileName),
165 processConfiguration_(processConfiguration),
166 processHistoryRegistry_(&processHistoryRegistry),
168 eventSkipperByID_(eventSkipperByID),
169 fileFormatVersion_(),
172 indexIntoFile_(*indexIntoFileSharedPtr_),
173 orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
175 indexIntoFileEnd_(indexIntoFileBegin_),
176 indexIntoFileIter_(indexIntoFileBegin_),
177 eventProcessHistoryIDs_(),
178 eventProcessHistoryIter_(eventProcessHistoryIDs_.
begin()),
179 savedRunAuxiliary_(),
180 skipAnyEvents_(skipAnyEvents),
181 noEventSort_(noEventSort),
182 whyNotFastClonable_(0),
183 hasNewlyDroppedBranch_(),
184 branchListIndexesUnchanged_(
false),
193 branchIDListHelper_(branchIDListHelper),
194 processingMode_(processingMode),
196 newBranchToOldBranch_(),
198 eventSelectionIDs_(),
199 branchListIndexes_(),
202 duplicateChecker_(duplicateChecker),
203 provenanceAdaptor_(),
204 provenanceReaderMaker_(),
205 eventProductProvenanceRetriever_(),
206 parentageIDLookup_(),
207 daqProvenanceHelper_() {
218 if(
nullptr == metaDataTree.get()) {
220 <<
" in the input file.\n";
229 fft->SetAddress(&fftPtr);
250 typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
252 PsetMap *psetMapPtr = &psetMap;
261 if(
nullptr == psetTree.get()) {
263 <<
" in the input file.\n";
266 typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
268 IdToBlobs* pIdToBlob = &idToBlob;
272 psetTreeCache->SetEnablePrefetching(
false);
273 filePtr_->SetCacheRead(psetTreeCache.get());
274 for(Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
275 psetTree->GetEntry(
i);
276 psetMap.insert(idToBlob);
301 std::unique_ptr<BranchIDLists> branchIDListsAPtr(
new BranchIDLists);
340 for(
auto const& psetEntry : psetMap) {
342 pset.
setID(psetEntry.first);
352 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
true));
359 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
false));
364 <<
"Failed to find branchIDLists branch in metaData tree.\n";
369 if(!bypassVersionCheck) {
370 checkReleaseVersion(pHistVector,
file());
373 if(labelRawDataLikeMC) {
377 BranchKey finder(rawData, source,
"",
"");
378 ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
379 if(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source) {
394 it = pList.lower_bound(finder);
395 assert(!(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source));
405 for(
auto const& history : pHistVector) {
436 for(
auto& product : pList) {
447 for(
auto const& product : prodList) {
451 newReg->copyProduct(prod);
455 <<
"Cannot change friendly class name algorithm without more development work\n"
456 <<
"to update BranchIDLists. Contact the framework group.\n";
460 newReg->copyProduct(newBD);
464 dropOnInput(*newReg, productSelectorRules, dropDescendants, inputType);
472 for(
auto const& product : prodList) {
502 if(
nullptr == entryDescriptionTree.get()) {
504 <<
" in the input file.\n";
520 if(idBuffer != entryDescriptionBuffer.
id()) {
523 entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.
id(),entryDescriptionBuffer));
548 if(
nullptr == parentageTree.get()) {
550 <<
" in the input file.\n";
633 std::unique_ptr<FileBlock>
803 phid_(phid), run_(run) {}
807 struct RunItemSortByRun {
808 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
809 return a.run_ < b.run_;
812 struct RunItemSortByRunPhid {
813 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
814 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
820 phid_(phid), run_(run), lumi_(lumi), firstEventEntry_(entry),
821 lastEventEntry_(entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry : entry + 1) {}
828 struct LumiItemSortByRunLumi {
829 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
830 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
833 struct LumiItemSortByRunLumiPhid {
834 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
835 if(a.run_ < b.run_)
return true;
836 if(b.run_ < a.run_)
return false;
837 if(a.lumi_ < b.lumi_)
return true;
838 if(b.lumi_ < a.lumi_)
return false;
839 return a.phid_ < b.phid_;
855 typedef std::list<LumiItem> LumiList;
858 typedef std::set<LuminosityBlockID> RunLumiSet;
859 RunLumiSet runLumiSet;
861 typedef std::list<RunItem>
RunList;
864 typedef std::set<RunNumber_t> RunSet;
867 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
868 RunItemSet runItemSet;
870 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
884 bool newLumi =
false;
895 if(iFirst || prevPhid != reducedPHID || prevRun !=
eventAux().
run()) {
897 newRun = newLumi =
true;
898 }
else if(prevLumi !=
eventAux().luminosityBlock()) {
901 prevPhid = reducedPHID;
905 lumis.emplace_back(reducedPHID,
909 LumiItem& currentLumi = lumis.back();
911 ++currentLumi.lastEventEntry_;
916 if(runItemSet.insert(item).second) {
917 runs.push_back(std::move(item));
919 phidMap.insert(std::make_pair(
eventAux().
run(), reducedPHID));
930 typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
933 typedef std::vector<RunItem> RunVector;
943 if(runSet.insert(runAux->run()).
second) {
945 emptyRuns.emplace_back(reducedPHID, runAux->run());
948 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
955 RunItemSortByRun runItemSortByRun;
958 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
959 for(
auto const& emptyRun : emptyRuns) {
960 for(; itRuns != endRuns; ++itRuns) {
961 if(runItemSortByRun(emptyRun, *itRuns)) {
965 runs.insert(itRuns, emptyRun);
970 typedef std::vector<LumiItem> LumiVector;
971 LumiVector emptyLumis;
973 typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
974 RunLumiMap runLumiMap;
981 if(runLumiSet.insert(lumiID).second) {
986 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
987 assert(iPhidMap != phidMap.end());
997 LumiItemSortByRunLumi lumiItemSortByRunLumi;
1000 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
1001 for(
auto const& emptyLumi : emptyLumis) {
1002 for(; itLumis != endLumis; ++itLumis) {
1003 if(lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1007 lumis.insert(itLumis, emptyLumi);
1012 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1013 RunCountMap runCountMap;
1015 assert(phids.empty());
1017 assert(entries.empty());
1019 for(
auto&
run : runs) {
1020 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
1021 if(countMapItem == runCountMap.end()) {
1022 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
1023 assert(countMapItem != runCountMap.end());
1026 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
1027 if(phidItem == phids.end()) {
1028 phids.push_back(
run.phid_);
1029 phidItem = phids.end() - 1;
1031 entries.emplace_back(
1032 countMapItem->second,
1035 phidItem - phids.begin(),
1043 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1044 LumiCountMap lumiCountMap;
1046 for(
auto&
lumi : lumis) {
1047 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1048 assert(runCountMapItem != runCountMap.end());
1049 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1050 if(countMapItem == lumiCountMap.end()) {
1051 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1052 assert(countMapItem != lumiCountMap.end());
1055 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1056 assert(phidItem != phids.end());
1057 entries.emplace_back(
1058 runCountMapItem->second,
1059 countMapItem->second,
1061 phidItem - phids.begin(),
1064 lumi.firstEventEntry_,
1065 lumi.lastEventEntry_);
1077 "'Events' tree is corrupted or not present\n" <<
"in the input file.\n";
1087 for(
auto& phid : phidVec) {
1104 bool needEventNumbers =
false;
1106 if(inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1107 needEventNumbers =
true;
1109 bool needEventEntries =
false;
1112 needEventEntries =
true;
1136 treePointer->close();
1137 treePointer =
nullptr;
1192 if(!eventHistoryBranch) {
1194 <<
"Failed to find history branch in event history tree.\n";
1196 eventHistoryBranch->SetAddress(&pHistory);
1205 assert(eventSelectionIDBranch !=
nullptr);
1209 assert(branchListIndexesBranch !=
nullptr);
1228 boost::shared_ptr<LuminosityBlockAuxiliary>
1241 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1244 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1249 return lumiAuxiliary;
1252 boost::shared_ptr<RunAuxiliary>
1254 boost::shared_ptr<RunAuxiliary> runAuxiliary(
new RunAuxiliary);
1260 RunAux *pRunAux = &runAux;
1265 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1268 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1270 return runAuxiliary;
1431 boost::shared_ptr<RunAuxiliary>
1455 filePtr_->reportInputRunNumber(runAuxiliary->run());
1484 runAuxiliary->setProcessHistoryID(
eventAux().processHistoryID());
1492 return runAuxiliary;
1512 boost::shared_ptr<LuminosityBlockAuxiliary>
1529 boost::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary =
fillLumiAuxiliary();
1533 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1547 return lumiAuxiliary;
1626 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
1644 <<
"Failed to find the event history tree.\n";
1651 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
1652 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile) {
1659 currentIndexIntoFile);
1673 std::set<BranchID> branchesToDrop;
1674 for(
auto const& product : prodList) {
1676 if(!productSelector.
selected(prod)) {
1677 if(dropDescendants) {
1680 branchesToDrop.insert(prod.
branchID());
1686 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1687 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1689 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
1691 if(productSelector.
selected(prod)) {
1693 <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
1694 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
1695 <<
"that was explicitly dropped.\n";
1699 ProductRegistry::ProductList::iterator icopy = it;
1701 prodList.erase(icopy);
1710 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1715 if(edp.isMergeable()) {
1717 ProductRegistry::ProductList::iterator icopy = it;
1719 prodList.erase(icopy);
1729 std::unique_ptr<MakeProvenanceReader>
1746 boost::shared_ptr<ProductProvenanceRetriever>
1770 std::vector<ParentageID>
const& iParentageIDLookup,
1773 rootTree_(iRootTree),
1774 pProvVector_(&provVector_),
1775 parentageIDLookup_(iParentageIDLookup),
1776 daqProvenanceHelper_(daqProvenanceHelper) {
1795 <<
"ReducedProvenanceReader::ReadProvenance\n"
1796 <<
"The parentage ID index value " << prov.parentageIDIndex_ <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size()-1 <<
".\n"
1797 <<
"This should never happen.\n"
1798 <<
"Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
1819 rootTree_(rootTree),
1821 pInfoVector_(&infoVector_),
1822 daqProvenanceHelper_(daqProvenanceHelper) {
1856 rootTree_(rootTree),
1858 pInfoVector_(&infoVector_),
1859 entryDescriptionMap_(theMap),
1860 daqProvenanceHelper_(daqProvenanceHelper) {
1871 Parentage parentage(iter->second.parents());
1901 std::unique_ptr<ProvenanceReaderBase>
1906 std::unique_ptr<ProvenanceReaderBase>
1911 std::unique_ptr<ProvenanceReaderBase>
1913 return std::unique_ptr<ProvenanceReaderBase>(
new FullProvenanceReader(&rootTree, daqProvenanceHelper));
1916 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
std::string const & branchName() const
boost::shared_ptr< BranchChildren > branchChildren_
StoredProductProvenanceVector provVector_
bool selected(BranchDescription const &desc) const
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
unsigned int const defaultNonEventLearningEntries
boost::shared_ptr< RunAuxiliary > savedRunAuxiliary_
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::string const & entryDescriptionBranchName()
bool skipEvents(int &offset)
FileFormatVersion fileFormatVersion() 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
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
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
boost::shared_ptr< BranchIDLists const > branchIDLists_
std::string const & eventSelectionsBranchName()
InputSource::ProcessingMode processingMode_
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
boost::shared_ptr< RunAuxiliary > fillRunAuxiliary()
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
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
boost::shared_ptr< DuplicateChecker > duplicateChecker_
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
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
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)
EventAuxiliary const & eventAux() const
EventSelectionIDVector eventSelectionIDs_
int processHistoryIDIndex() const
bool isEarlierRelease(std::string const &a, std::string const &b)
int whyNotFastClonable() const
BranchType branchType() const
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
WrapperInterfaceBase const * getInterface() 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()
boost::shared_ptr< ProductProvenanceRetriever > eventProductProvenanceRetriever_
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()
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
static EntryNumber_t const invalidEntry
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, boost::shared_ptr< InputFile > filePtr, boost::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, boost::shared_ptr< BranchIDListHelper > branchIDListHelper, boost::shared_ptr< DuplicateChecker > duplicateChecker, bool dropDescendantsOfDroppedProducts, ProcessHistoryRegistry &processHistoryRegistry, std::vector< boost::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< boost::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool bypassVersionCheck, bool labelRawDataLikeMC, bool usingGoToEvent, bool enablePrefetching)
boost::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever()
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()
boost::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
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::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_
void setEventFinder(boost::shared_ptr< EventFinder > ptr) const
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)
boost::shared_ptr< ProductRegistry const > productRegistry_
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)
boost::shared_ptr< InputFile > filePtr_
void initializeDuplicateChecker(std::vector< boost::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< boost::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile)
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
boost::shared_ptr< EventSkipperByID > eventSkipperByID_
EntryNumber_t entry() const
std::vector< EventEntryInfo > infoVector_
TTree * eventHistoryTree_
LuminosityBlockNumber_t peekAheadAtLumi() const
std::string const & fileIdentifierBranchName()
boost::shared_ptr< ProductRegistry const > productRegistry() const
std::string const & wrappedName() const
virtual ~RootFileEventFinder()
EventNumber_t event() const
std::string const & moduleDescriptionMapBranchName()
bool insertMapped(value_type const &v)
boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
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