55 #include "TTreeCache.h"
86 if(inxBegin == inxEnd)
return 0;
87 int defaultOffset = (inxBegin.
run() != 0 ? 0 : 1);
88 int offset = (forcedRunNumber != 0U ? forcedRunNumber - inxBegin.
run() : defaultOffset);
91 <<
"The value of the 'setRunNumber' parameter must not be\n"
92 <<
"less than the first run number in the first input file.\n"
93 <<
"'setRunNumber' was " << forcedRunNumber <<
", while the first run was "
94 << forcedRunNumber - offset <<
".\n";
113 return eventAux.
event();
124 boost::shared_ptr<InputFile> filePtr,
125 boost::shared_ptr<EventSkipperByID> eventSkipperByID,
129 unsigned int treeCacheSize,
130 int treeMaxVirtualSize,
136 boost::shared_ptr<BranchIDListHelper> branchIDListHelper,
137 boost::shared_ptr<DuplicateChecker> duplicateChecker,
138 bool dropDescendants,
139 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
140 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
141 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
142 bool labelRawDataLikeMC,
144 bool enablePrefetching) :
146 logicalFile_(logicalFileName),
147 processConfiguration_(processConfiguration),
148 processConfigurations_(),
150 eventSkipperByID_(eventSkipperByID),
151 fileFormatVersion_(),
154 indexIntoFile_(*indexIntoFileSharedPtr_),
155 orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
157 indexIntoFileEnd_(indexIntoFileBegin_),
158 indexIntoFileIter_(indexIntoFileBegin_),
159 eventProcessHistoryIDs_(),
160 eventProcessHistoryIter_(eventProcessHistoryIDs_.
begin()),
161 savedRunAuxiliary_(),
162 skipAnyEvents_(skipAnyEvents),
163 noEventSort_(noEventSort),
164 whyNotFastClonable_(0),
165 hasNewlyDroppedBranch_(),
166 branchListIndexesUnchanged_(
false),
172 lastEventEntryNumberRead_(-1LL),
175 branchIDListHelper_(branchIDListHelper),
176 processingMode_(processingMode),
178 newBranchToOldBranch_(),
184 duplicateChecker_(duplicateChecker),
185 provenanceAdaptor_(),
186 provenanceReaderMaker_(),
187 eventBranchMapper_(),
188 parentageIDLookup_(),
189 daqProvenanceHelper_() {
200 if(
nullptr == metaDataTree.get()) {
202 <<
" in the input file.\n";
211 fft->SetAddress(&fftPtr);
232 typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
234 PsetMap *psetMapPtr = &psetMap;
243 if(
nullptr == psetTree.get()) {
245 <<
" in the input file.\n";
248 typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
250 IdToBlobs* pIdToBlob = &idToBlob;
254 psetTreeCache->SetEnablePrefetching(
false);
255 filePtr_->SetCacheRead(psetTreeCache.get());
256 for(Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
257 psetTree->GetEntry(
i);
258 psetMap.insert(idToBlob);
281 std::unique_ptr<BranchIDLists> branchIDListsAPtr(
new BranchIDLists);
322 for(
auto const& psetEntry : psetMap) {
324 pset.
setID(psetEntry.first);
343 <<
"Failed to find branchIDLists branch in metaData tree.\n";
348 if(labelRawDataLikeMC) {
352 BranchKey finder(rawData, source,
"",
"");
353 ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
354 if(it != pList.end() && it->first.friendlyClassName_ == rawData && it->first.moduleLabel_ ==
source) {
370 it = pList.lower_bound(finder);
371 assert(!(it != pList.end() && it->first.friendlyClassName_ == rawData && it->first.moduleLabel_ ==
source));
404 for(
auto const& product : pList) {
417 for(
auto const& product : prodList) {
421 newReg->copyProduct(prod);
425 <<
"Cannot change friendly class name algorithm without more development work\n"
426 <<
"to update BranchIDLists. Contact the framework group.\n";
430 newReg->copyProduct(newBD);
434 dropOnInput(*newReg, productSelectorRules, dropDescendants, inputType);
445 for(
auto const& product : prodList) {
481 if(
nullptr == entryDescriptionTree.get()) {
483 <<
" in the input file.\n";
501 if(idBuffer != entryDescriptionBuffer.
id()) {
531 if(
nullptr == parentageTree.get()) {
533 <<
" in the input file.\n";
613 std::unique_ptr<FileBlock>
775 phid_(phid), run_(run) {}
779 struct RunItemSortByRun {
780 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
781 return a.run_ < b.run_;
784 struct RunItemSortByRunPhid {
785 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
786 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
792 phid_(phid), run_(run), lumi_(lumi), firstEventEntry_(entry),
793 lastEventEntry_(entry == -1LL ? -1LL : entry + 1) {}
797 EntryNumber_t firstEventEntry_;
798 EntryNumber_t lastEventEntry_;
800 struct LumiItemSortByRunLumi {
801 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
802 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
805 struct LumiItemSortByRunLumiPhid {
806 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
807 if(a.run_ < b.run_)
return true;
808 if(b.run_ < a.run_)
return false;
809 if(a.lumi_ < b.lumi_)
return true;
810 if(b.lumi_ < a.lumi_)
return false;
811 return a.phid_ < b.phid_;
827 typedef std::list<LumiItem> LumiList;
830 typedef std::set<LuminosityBlockID> RunLumiSet;
831 RunLumiSet runLumiSet;
833 typedef std::list<RunItem>
RunList;
836 typedef std::set<RunNumber_t> RunSet;
839 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
840 RunItemSet runItemSet;
842 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
856 bool newLumi =
false;
867 if(iFirst || prevPhid != reducedPHID || prevRun !=
eventAux().
run()) {
869 newRun = newLumi =
true;
870 }
else if(prevLumi !=
eventAux().luminosityBlock()) {
873 prevPhid = reducedPHID;
877 lumis.emplace_back(reducedPHID,
881 LumiItem& currentLumi = lumis.back();
883 ++currentLumi.lastEventEntry_;
888 if(runItemSet.insert(item).second) {
889 runs.push_back(std::move(item));
891 phidMap.insert(std::make_pair(
eventAux().
run(), reducedPHID));
902 typedef std::map<RunNumber_t, EntryNumber_t> RunMap;
905 typedef std::vector<RunItem> RunVector;
915 if(runSet.insert(runAux->run()).
second) {
917 emptyRuns.emplace_back(reducedPHID, runAux->run());
920 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
927 RunItemSortByRun runItemSortByRun;
930 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
931 for(
auto const& emptyRun : emptyRuns) {
932 for(; itRuns != endRuns; ++itRuns) {
933 if(runItemSortByRun(emptyRun, *itRuns)) {
937 runs.insert(itRuns, emptyRun);
942 typedef std::vector<LumiItem> LumiVector;
943 LumiVector emptyLumis;
945 typedef std::map<LuminosityBlockID, EntryNumber_t> RunLumiMap;
946 RunLumiMap runLumiMap;
953 if(runLumiSet.insert(lumiID).second) {
958 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
959 assert(iPhidMap != phidMap.end());
960 emptyLumis.emplace_back(iPhidMap->second, lumiAux->run(), lumiAux->luminosityBlock(), -1LL);
969 LumiItemSortByRunLumi lumiItemSortByRunLumi;
972 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
973 for(
auto const& emptyLumi : emptyLumis) {
974 for(; itLumis != endLumis; ++itLumis) {
975 if(lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
979 lumis.insert(itLumis, emptyLumi);
984 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
985 RunCountMap runCountMap;
987 assert(phids.empty());
989 assert(entries.empty());
991 for(
auto&
run : runs) {
992 RunCountMap::const_iterator countMapItem = runCountMap.find(
run);
993 if(countMapItem == runCountMap.end()) {
994 countMapItem = runCountMap.insert(std::make_pair(
run, rcount)).first;
995 assert(countMapItem != runCountMap.end());
998 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
run.phid_);
999 if(phidItem == phids.end()) {
1000 phids.push_back(
run.phid_);
1001 phidItem = phids.end() - 1;
1003 entries.emplace_back(
1004 countMapItem->second,
1007 phidItem - phids.begin(),
1015 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1016 LumiCountMap lumiCountMap;
1018 for(
auto&
lumi : lumis) {
1019 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(
lumi.phid_,
lumi.run_));
1020 assert(runCountMapItem != runCountMap.end());
1021 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(
lumi);
1022 if(countMapItem == lumiCountMap.end()) {
1023 countMapItem = lumiCountMap.insert(std::make_pair(
lumi, lcount)).first;
1024 assert(countMapItem != lumiCountMap.end());
1027 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids,
lumi.phid_);
1028 assert(phidItem != phids.end());
1029 entries.emplace_back(
1030 runCountMapItem->second,
1031 countMapItem->second,
1033 phidItem - phids.begin(),
1036 lumi.firstEventEntry_,
1037 lumi.lastEventEntry_);
1049 "'Events' tree is corrupted or not present\n" <<
"in the input file.\n";
1059 for(
auto& phid : phidVec) {
1076 bool needEventNumbers =
false;
1078 if(inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1079 needEventNumbers =
true;
1081 bool needEventEntries =
false;
1084 needEventEntries =
true;
1108 treePointer->close();
1109 treePointer =
nullptr;
1160 if(!eventHistoryBranch) {
1162 <<
"Failed to find history branch in event history tree.\n";
1164 eventHistoryBranch->SetAddress(&pHistory);
1173 assert(eventSelectionIDBranch !=
nullptr);
1177 assert(branchListIndexesBranch !=
nullptr);
1196 boost::shared_ptr<LuminosityBlockAuxiliary>
1209 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1212 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1217 return lumiAuxiliary;
1220 boost::shared_ptr<RunAuxiliary>
1222 boost::shared_ptr<RunAuxiliary> runAuxiliary(
new RunAuxiliary);
1228 RunAux *pRunAux = &runAux;
1233 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1236 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1238 return runAuxiliary;
1355 assert(ep !=
nullptr);
1401 boost::shared_ptr<RunAuxiliary>
1428 filePtr_->reportInputRunNumber(runAuxiliary->run());
1459 runAuxiliary->setProcessHistoryID(
eventAux().processHistoryID());
1468 return runAuxiliary;
1471 boost::shared_ptr<RunPrincipal>
1478 return runPrincipal;
1483 runPrincipal->readImmediate();
1485 return runPrincipal;
1488 boost::shared_ptr<LuminosityBlockAuxiliary>
1508 boost::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary =
fillLumiAuxiliary();
1512 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1529 return lumiAuxiliary;
1532 boost::shared_ptr<LuminosityBlockPrincipal>
1539 return lumiPrincipal;
1545 lumiPrincipal->readImmediate();
1547 return lumiPrincipal;
1608 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
1626 <<
"Failed to find the event history tree.\n";
1639 <<
"a release (" << pc.releaseVersion() <<
") used in writing the input file, " <<
file() <<
".\n"
1640 <<
"Forward compatibility cannot be supported.\n";
1647 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
1648 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile) {
1655 currentIndexIntoFile);
1669 std::set<BranchID> branchesToDrop;
1670 for(
auto const& product : prodList) {
1672 if(!productSelector.
selected(prod)) {
1673 if(dropDescendants) {
1676 branchesToDrop.insert(prod.
branchID());
1682 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1683 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1685 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
1687 if(productSelector.
selected(prod)) {
1689 <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
1690 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
1691 <<
"that was explicitly dropped.\n";
1695 ProductRegistry::ProductList::iterator icopy = it;
1697 prodList.erase(icopy);
1706 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1711 if(edp.isMergeable()) {
1713 ProductRegistry::ProductList::iterator icopy = it;
1715 prodList.erase(icopy);
1725 std::unique_ptr<MakeProvenanceReader>
1738 boost::shared_ptr<BranchMapper>
1762 std::vector<ParentageID>
const& iParentageIDLookup,
1765 rootTree_(iRootTree),
1766 pProvVector_(&provVector_),
1767 parentageIDLookup_(iParentageIDLookup),
1768 daqProvenanceHelper_(daqProvenanceHelper) {
1787 <<
"ReducedProvenanceReader::ReadProvenance\n"
1788 <<
"The parentage ID index value " << prov.parentageIDIndex_ <<
" is out of bounds. The maximum value is " <<
parentageIDLookup_.size()-1 <<
".\n"
1789 <<
"This should never happen.\n"
1790 <<
"Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
1811 rootTree_(rootTree),
1813 pInfoVector_(&infoVector_),
1814 daqProvenanceHelper_(daqProvenanceHelper) {
1847 rootTree_(rootTree),
1849 pInfoVector_(&infoVector_),
1850 daqProvenanceHelper_(daqProvenanceHelper) {
1891 std::unique_ptr<ProvenanceReaderBase>
1896 std::unique_ptr<ProvenanceReaderBase>
1898 return std::unique_ptr<ProvenanceReaderBase>(
new OldProvenanceReader(&rootTree, daqProvenanceHelper));
1901 std::unique_ptr<ProvenanceReaderBase>
1903 return std::unique_ptr<ProvenanceReaderBase>(
new FullProvenanceReader(&rootTree, daqProvenanceHelper));
1906 std::unique_ptr<ProvenanceReaderBase>
EventID const & eventID() const
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
virtual void readProvenance(BranchMapper const &mapper) const
EventNumber_t event() const
std::string const & idToParameterSetBlobsBranchName()
std::unique_ptr< ProvenanceAdaptor > provenanceAdaptor_
boost::shared_ptr< BranchChildren > branchChildren_
StoredProductProvenanceVector provVector_
bool selected(BranchDescription const &desc) const
void fillEventPrincipal(EventAuxiliary const &aux, boost::shared_ptr< EventSelectionIDVector > eventSelectionIDs=boost::shared_ptr< EventSelectionIDVector >(), boost::shared_ptr< BranchListIndexes > branchListIndexes=boost::shared_ptr< BranchListIndexes >(), boost::shared_ptr< BranchMapper > mapper=boost::shared_ptr< BranchMapper >(new BranchMapper), DelayedReader *reader=0)
boost::shared_ptr< BranchListIndexes > branchListIndexes_
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
unsigned int const defaultNonEventLearningEntries
boost::shared_ptr< RunAuxiliary > savedRunAuxiliary_
virtual void readProvenance(BranchMapper const &mapper) const
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_
ForwardSequence::const_iterator lower_bound_all(ForwardSequence const &s, Datum const &d)
wrappers for std::lower_bound
bool branchListIndexesUnchanged() const
std::vector< std::string > const & branchNames() const
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
ProcessConfigurationVector processConfigurations_
StoredProductProvenanceVector * pProvVector_
unsigned int EventNumber_t
std::string & branchName() const
static ThreadSafeRegistry * instance()
void checkReleaseVersion()
DaqProvenanceHelper const * daqProvenanceHelper_
std::map< std::string, std::string > newBranchToOldBranch_
EntryNumber_t firstEventEntryThisRun() const
IndexIntoFile::EntryType getEntryTypeWithSkipping()
bool empty() const
True if no runs, lumis, or events are in the file.
std::map< BranchKey, BranchDescription > ProductList
void fillEventAuxiliary()
BranchID const & mapBranchID(BranchID const &branchID) const
EntryType getEntryType() const
bool setEntryAtRun(RunNumber_t run)
ProductProvenanceVector * pInfoVector_
Timestamp const & time() const
std::unique_ptr< MakeProvenanceReader > provenanceReaderMaker_
EntryNumber const & entries() const
bool getMapped(key_type const &k, value_type &result) const
void setRefCoreStreamer(bool resetAll=false)
std::string const & fileFormatVersionBranchName()
void reduceProcessHistoryIDs()
IndexIntoFileItr begin(SortOrder sortOrder) const
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
std::vector< BranchID > const & parents() const
boost::shared_ptr< BranchIDLists const > branchIDLists_
std::string const & eventSelectionsBranchName()
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const
InputSource::ProcessingMode processingMode_
boost::shared_ptr< LuminosityBlockPrincipal > readLumi(boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal)
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
boost::shared_ptr< RunAuxiliary > fillRunAuxiliary()
void stable_sort_all(RandomAccessSequence &s)
wrappers for std::stable_sort
static RunID firstValidRun()
LuminosityBlockNumber_t lumi() const
boost::shared_ptr< BranchMapper > eventBranchMapper_
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
std::unique_ptr< FileBlock > createFileBlock() const
LuminosityBlockNumber_t luminosityBlock() const
void trainCache(char const *branchNames)
bool insertMapped(value_type const &v)
unsigned int LuminosityBlockNumber_t
virtual ~OldProvenanceReader()
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
TBranch * branchEntryInfoBranch() const
static int position[TOTALCHAMBERS][3]
void fillProductRegistryTransients(std::vector< ProcessConfiguration > const &pcVec, ProductRegistry const &preg, bool okToRegister=false)
void advanceToNextLumiOrRun()
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 setID(ParameterSetID const &id) const
virtual void readProvenance(BranchMapper const &mapper) const
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
ProcessConfigurationRegistry::vector_type ProcessConfigurationVector
std::vector< BranchID > const & parents() const
ProductList const & productList() const
U second(std::pair< T, U > const &p)
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
IndexIntoFile::EntryType getNextEntryTypeWanted()
TTree const * tree() const
boost::shared_ptr< DuplicateChecker > duplicateChecker_
DaqProvenanceHelper const * daqProvenanceHelper_
std::string const logicalFile_
std::map< key_type, value_type > collection_type
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
std::string const & processHistoryMapBranchName()
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const
std::string const & className() const
bool wasLastEventJustRead() const
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.
virtual EventNumber_t getEventNumberOfEntry(roottree::EntryNumber entry) const
OldProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
std::string const & eventHistoryBranchName()
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 treeCacheSize, int treeMaxVirtualSize, InputSource::ProcessingMode processingMode, RunNumber_t const &forcedRunNumber, bool noEventSort, ProductSelectorRules const &productSelectorRules, InputType::InputType inputType, boost::shared_ptr< BranchIDListHelper > branchIDListHelper, boost::shared_ptr< DuplicateChecker > duplicateChecker, bool dropDescendantsOfDroppedProducts, 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)
EventPrincipal * readEvent(EventPrincipal &cache)
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
Long64_t numEntries(TFile *hdl, std::string const &trname)
std::pair< std::string, MonitorElement * > entry
EventAuxiliary const & eventAux() const
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()
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
std::string const & metaDataTreeName()
std::string & wrappedName() const
LuminosityBlockNumber_t oldLuminosityBlock() const
EntryDescriptionID id() const
unsigned int offset(bool)
void insertCollection(collection_type const &c)
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
bool wasFirstEventJustRead() const
std::string const & parameterSetMapBranchName()
Hash< ProcessHistoryType > ProcessHistoryID
std::vector< ProductProvenance > ProductProvenanceVector
boost::shared_ptr< EventSelectionIDVector > eventSelectionIDs_
std::string const & processHistoryBranchName()
IndexIntoFile & indexIntoFile_
virtual ~FullProvenanceReader()
EntryNumber const & entryNumber() 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()
void conversion(EventAux const &from, EventAuxiliary &to)
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
std::vector< EventNumber_t > & unsortedEventNumbers() const
static Timestamp const & invalidTimestamp()
static EntryNumber_t const invalidEntry
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
void setIfFastClonable(int remainingEvents, int remainingLumis)
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker() const
void fillBranchEntry(TBranch *branch, T *&pbuf)
static LuminosityBlockNumber_t const invalidLumi
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
void readEntryDescriptionTree()
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)
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_
void insertIntoSet(ProductProvenance const &provenanceProduct) const
boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > runPrincipal)
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
std::vector< EventEntryInfo > * pInfoVector_
unsigned int const defaultNonEventCacheSize
std::vector< value_type > vector_type
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)
boost::shared_ptr< BranchMapper > makeBranchMapper()
std::string const & entryDescriptionIDBranchName()
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)
EventPrincipal * readCurrentEvent(EventPrincipal &cache)
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
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)
virtual void readProvenance(BranchMapper const &mapper) const
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_
void dropOnInput(ProductRegistry ®, ProductSelectorRules const &rules, bool dropDescendants, InputType::InputType inputType)
LuminosityBlockNumber_t peekAheadAtLumi() const
std::string const & fileIdentifierBranchName()
boost::shared_ptr< ProductRegistry const > productRegistry() const
void validateFile(InputType::InputType inputType, bool usingGoToEvent)
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const
virtual ~RootFileEventFinder()
EventNumber_t event() const
std::string const & moduleDescriptionMapBranchName()
boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
DaqProvenanceHelper const * daqProvenanceHelper_
std::string createGlobalIdentifier()
void copyProduct(BranchDescription const &productdesc)
void readEventHistoryTree()
void setEntryNumber(EntryNumber theEntryNumber)
void reportOpened(std::string const &inputType)
roottree::EntryNumber EntryNumber