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 labelRawDataLikeMC,
161 bool enablePrefetching) :
163 logicalFile_(logicalFileName),
164 processConfiguration_(processConfiguration),
165 processHistoryRegistry_(&processHistoryRegistry),
167 eventSkipperByID_(eventSkipperByID),
168 fileFormatVersion_(),
171 indexIntoFile_(*indexIntoFileSharedPtr_),
172 orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
174 indexIntoFileEnd_(indexIntoFileBegin_),
175 indexIntoFileIter_(indexIntoFileBegin_),
176 eventProcessHistoryIDs_(),
177 eventProcessHistoryIter_(eventProcessHistoryIDs_.
begin()),
178 savedRunAuxiliary_(),
179 skipAnyEvents_(skipAnyEvents),
180 noEventSort_(noEventSort),
181 whyNotFastClonable_(0),
182 hasNewlyDroppedBranch_(),
183 branchListIndexesUnchanged_(
false),
192 branchIDListHelper_(branchIDListHelper),
193 processingMode_(processingMode),
195 newBranchToOldBranch_(),
197 eventSelectionIDs_(),
198 branchListIndexes_(),
201 duplicateChecker_(duplicateChecker),
202 provenanceAdaptor_(),
203 provenanceReaderMaker_(),
204 eventProductProvenanceRetriever_(),
205 parentageIDLookup_(),
206 daqProvenanceHelper_() {
217 if(
nullptr == metaDataTree.get()) {
219 <<
" in the input file.\n";
228 fft->SetAddress(&fftPtr);
249 typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
251 PsetMap *psetMapPtr = &psetMap;
260 if(
nullptr == psetTree.get()) {
262 <<
" in the input file.\n";
265 typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
267 IdToBlobs* pIdToBlob = &idToBlob;
271 psetTreeCache->SetEnablePrefetching(
false);
272 filePtr_->SetCacheRead(psetTreeCache.get());
273 for(Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
274 psetTree->GetEntry(
i);
275 psetMap.insert(idToBlob);
300 std::unique_ptr<BranchIDLists> branchIDListsAPtr(
new BranchIDLists);
339 for(
auto const& psetEntry : psetMap) {
341 pset.
setID(psetEntry.first);
351 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
true));
358 inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter,
false));
363 <<
"Failed to find branchIDLists branch in metaData tree.\n";
368 checkReleaseVersion(pHistVector,
file());
370 if(labelRawDataLikeMC) {
374 BranchKey finder(rawData, source,
"",
"");
375 ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
376 if(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source) {
391 it = pList.lower_bound(finder);
392 assert(!(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() ==
source));
402 for(
auto const& history : pHistVector) {
433 for(
auto& product : pList) {
444 for(
auto const& product : prodList) {
448 newReg->copyProduct(prod);
452 <<
"Cannot change friendly class name algorithm without more development work\n"
453 <<
"to update BranchIDLists. Contact the framework group.\n";
457 newReg->copyProduct(newBD);
461 dropOnInput(*newReg, productSelectorRules, dropDescendants, inputType);
469 for(
auto const& product : prodList) {
499 if(
nullptr == entryDescriptionTree.get()) {
501 <<
" in the input file.\n";
517 if(idBuffer != entryDescriptionBuffer.
id()) {
520 entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.
id(),entryDescriptionBuffer));
545 if(
nullptr == parentageTree.get()) {
547 <<
" in the input file.\n";
630 std::unique_ptr<FileBlock>
800 phid_(phid), run_(run) {}
804 struct RunItemSortByRun {
805 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
806 return a.run_ < b.run_;
809 struct RunItemSortByRunPhid {
810 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
811 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
817 phid_(phid), run_(run), lumi_(lumi), firstEventEntry_(entry),
818 lastEventEntry_(entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry : entry + 1) {}
825 struct LumiItemSortByRunLumi {
826 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
827 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
830 struct LumiItemSortByRunLumiPhid {
831 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
832 if(a.run_ < b.run_)
return true;
833 if(b.run_ < a.run_)
return false;
834 if(a.lumi_ < b.lumi_)
return true;
835 if(b.lumi_ < a.lumi_)
return false;
836 return a.phid_ < b.phid_;
852 typedef std::list<LumiItem> LumiList;
855 typedef std::set<LuminosityBlockID> RunLumiSet;
856 RunLumiSet runLumiSet;
858 typedef std::list<RunItem>
RunList;
861 typedef std::set<RunNumber_t> RunSet;
864 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
865 RunItemSet runItemSet;
867 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
881 bool newLumi =
false;
892 if(iFirst || prevPhid != reducedPHID || prevRun !=
eventAux().
run()) {
894 newRun = newLumi =
true;
895 }
else if(prevLumi !=
eventAux().luminosityBlock()) {
898 prevPhid = reducedPHID;
902 lumis.emplace_back(reducedPHID,
906 LumiItem& currentLumi = lumis.back();
908 ++currentLumi.lastEventEntry_;
913 if(runItemSet.insert(item).second) {
914 runs.push_back(std::move(item));
916 phidMap.insert(std::make_pair(
eventAux().
run(), reducedPHID));
927 typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
930 typedef std::vector<RunItem> RunVector;
940 if(runSet.insert(runAux->run()).
second) {
942 emptyRuns.emplace_back(reducedPHID, runAux->run());
945 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
952 RunItemSortByRun runItemSortByRun;
955 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
956 for(
auto const& emptyRun : emptyRuns) {
957 for(; itRuns != endRuns; ++itRuns) {
958 if(runItemSortByRun(emptyRun, *itRuns)) {
962 runs.insert(itRuns, emptyRun);
967 typedef std::vector<LumiItem> LumiVector;
968 LumiVector emptyLumis;
970 typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
971 RunLumiMap runLumiMap;
978 if(runLumiSet.insert(lumiID).second) {
983 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
984 assert(iPhidMap != phidMap.end());
994 LumiItemSortByRunLumi lumiItemSortByRunLumi;
997 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
998 for(
auto const& emptyLumi : emptyLumis) {
999 for(; itLumis != endLumis; ++itLumis) {
1000 if(lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1004 lumis.insert(itLumis, emptyLumi);
1009 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1010 RunCountMap runCountMap;
1012 assert(phids.empty());
1014 assert(entries.empty());
1016 for(
auto&
run : runs) {
1017 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
1018 if(countMapItem == runCountMap.end()) {
1019 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
1020 assert(countMapItem != runCountMap.end());
1023 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
1024 if(phidItem == phids.end()) {
1025 phids.push_back(
run.phid_);
1026 phidItem = phids.end() - 1;
1028 entries.emplace_back(
1029 countMapItem->second,
1032 phidItem - phids.begin(),
1040 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1041 LumiCountMap lumiCountMap;
1043 for(
auto&
lumi : lumis) {
1044 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1045 assert(runCountMapItem != runCountMap.end());
1046 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1047 if(countMapItem == lumiCountMap.end()) {
1048 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1049 assert(countMapItem != lumiCountMap.end());
1052 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1053 assert(phidItem != phids.end());
1054 entries.emplace_back(
1055 runCountMapItem->second,
1056 countMapItem->second,
1058 phidItem - phids.begin(),
1061 lumi.firstEventEntry_,
1062 lumi.lastEventEntry_);
1074 "'Events' tree is corrupted or not present\n" <<
"in the input file.\n";
1084 for(
auto& phid : phidVec) {
1101 bool needEventNumbers =
false;
1103 if(inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1104 needEventNumbers =
true;
1106 bool needEventEntries =
false;
1109 needEventEntries =
true;
1133 treePointer->close();
1134 treePointer =
nullptr;
1189 if(!eventHistoryBranch) {
1191 <<
"Failed to find history branch in event history tree.\n";
1193 eventHistoryBranch->SetAddress(&pHistory);
1202 assert(eventSelectionIDBranch !=
nullptr);
1206 assert(branchListIndexesBranch !=
nullptr);
1225 boost::shared_ptr<LuminosityBlockAuxiliary>
1238 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1241 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1246 return lumiAuxiliary;
1249 boost::shared_ptr<RunAuxiliary>
1251 boost::shared_ptr<RunAuxiliary> runAuxiliary(
new RunAuxiliary);
1257 RunAux *pRunAux = &runAux;
1262 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1265 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1267 return runAuxiliary;
1428 boost::shared_ptr<RunAuxiliary>
1452 filePtr_->reportInputRunNumber(runAuxiliary->run());
1481 runAuxiliary->setProcessHistoryID(
eventAux().processHistoryID());
1489 return runAuxiliary;
1509 boost::shared_ptr<LuminosityBlockAuxiliary>
1526 boost::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary =
fillLumiAuxiliary();
1530 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1544 return lumiAuxiliary;
1623 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
1641 <<
"Failed to find the event history tree.\n";
1648 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
1649 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile) {
1656 currentIndexIntoFile);
1670 std::set<BranchID> branchesToDrop;
1671 for(
auto const& product : prodList) {
1673 if(!productSelector.
selected(prod)) {
1674 if(dropDescendants) {
1677 branchesToDrop.insert(prod.
branchID());
1683 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1684 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1686 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
1688 if(productSelector.
selected(prod)) {
1690 <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
1691 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
1692 <<
"that was explicitly dropped.\n";
1696 ProductRegistry::ProductList::iterator icopy = it;
1698 prodList.erase(icopy);
1707 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1712 if(edp.isMergeable()) {
1714 ProductRegistry::ProductList::iterator icopy = it;
1716 prodList.erase(icopy);
1726 std::unique_ptr<MakeProvenanceReader>
1743 boost::shared_ptr<ProductProvenanceRetriever>
1767 std::vector<ParentageID>
const& iParentageIDLookup,
1770 rootTree_(iRootTree),
1771 pProvVector_(&provVector_),
1772 parentageIDLookup_(iParentageIDLookup),
1773 daqProvenanceHelper_(daqProvenanceHelper) {
1792 <<
"ReducedProvenanceReader::ReadProvenance\n"
1793 <<
"The parentage ID index value " << prov.parentageIDIndex_ <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size()-1 <<
".\n"
1794 <<
"This should never happen.\n"
1795 <<
"Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
1816 rootTree_(rootTree),
1818 pInfoVector_(&infoVector_),
1819 daqProvenanceHelper_(daqProvenanceHelper) {
1853 rootTree_(rootTree),
1855 pInfoVector_(&infoVector_),
1856 entryDescriptionMap_(theMap),
1857 daqProvenanceHelper_(daqProvenanceHelper) {
1868 Parentage parentage(iter->second.parents());
1898 std::unique_ptr<ProvenanceReaderBase>
1903 std::unique_ptr<ProvenanceReaderBase>
1908 std::unique_ptr<ProvenanceReaderBase>
1910 return std::unique_ptr<ProvenanceReaderBase>(
new FullProvenanceReader(&rootTree, daqProvenanceHelper));
1913 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
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)
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 labelRawDataLikeMC, bool usingGoToEvent, bool enablePrefetching)
void readEventHistoryTree()
void setEntryNumber(EntryNumber theEntryNumber)
void reportOpened(std::string const &inputType)
void insertIntoSet(ProductProvenance const &provenanceProduct) const