56 #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";
114 return eventAux.
event();
124 std::string
const& logicalFileName,
125 boost::shared_ptr<InputFile> filePtr,
126 boost::shared_ptr<EventSkipperByID> eventSkipperByID,
130 unsigned int treeCacheSize,
131 int treeMaxVirtualSize,
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 bypassVersionCheck,
143 bool labelRawDataLikeMC,
144 bool usingGoToEvent) :
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 processingMode_(processingMode),
177 newBranchToOldBranch_(),
178 eventHistoryTree_(0),
183 duplicateChecker_(duplicateChecker),
184 provenanceAdaptor_(),
185 provenanceReaderMaker_(),
186 secondaryEventPrincipal_(),
187 eventBranchMapper_(),
188 parentageIDLookup_(),
189 daqProvenanceHelper_() {
200 if(0 == 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(0 == psetTree.get()) {
245 <<
" in the input file.\n";
248 typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
250 IdToBlobs* pIdToBlob = &idToBlob;
254 filePtr_->SetCacheRead(psetTreeCache.get());
255 for(Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
256 psetTree->GetEntry(
i);
257 psetMap.insert(idToBlob);
308 if(!bypassVersionCheck) {
323 for(PsetMap::const_iterator
i = psetMap.begin(), iEnd = psetMap.end();
i != iEnd; ++
i) {
344 <<
"Failed to find branchIDLists branch in metaData tree.\n";
349 if(labelRawDataLikeMC) {
350 std::string
const rawData(
"FEDRawDataCollection");
351 std::string
const source(
"source");
353 BranchKey finder(rawData, source,
"",
"");
354 ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
355 if(it != pList.end() && it->first.friendlyClassName_ == rawData && it->first.moduleLabel_ ==
source) {
371 it = pList.lower_bound(finder);
372 assert(!(it != pList.end() && it->first.friendlyClassName_ == rawData && it->first.moduleLabel_ ==
source));
406 for(ProductRegistry::ProductList::const_iterator it = pList.begin(), itEnd = pList.end();
420 for(ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
425 newReg->copyProduct(prod);
429 <<
"Cannot change friendly class name algorithm without more development work\n"
430 <<
"to update BranchIDLists. Contact the framework group.\n";
434 newReg->copyProduct(newBD);
438 dropOnInput(*newReg, groupSelectorRules, dropDescendants, inputType);
449 for(ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
491 if(0 == entryDescriptionTree.get()) {
493 <<
" in the input file.\n";
511 if(idBuffer != entryDescriptionBuffer.
id()) {
541 if(0 == parentageTree.get()) {
543 <<
" in the input file.\n";
623 boost::shared_ptr<FileBlock>
784 phid_(phid), run_(run) {}
788 struct RunItemSortByRun {
789 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
790 return a.run_ < b.run_;
793 struct RunItemSortByRunPhid {
794 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
795 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
801 phid_(phid), run_(run), lumi_(lumi), firstEventEntry_(entry),
802 lastEventEntry_(entry == -1LL ? -1LL : entry + 1) {}
806 EntryNumber_t firstEventEntry_;
807 EntryNumber_t lastEventEntry_;
809 struct LumiItemSortByRunLumi {
810 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
811 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
814 struct LumiItemSortByRunLumiPhid {
815 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
816 if(a.run_ < b.run_)
return true;
817 if(b.run_ < a.run_)
return false;
818 if(a.lumi_ < b.lumi_)
return true;
819 if(b.lumi_ < a.lumi_)
return false;
820 return a.phid_ < b.phid_;
836 typedef std::list<LumiItem> LumiList;
839 typedef std::set<LuminosityBlockID> RunLumiSet;
840 RunLumiSet runLumiSet;
842 typedef std::list<RunItem>
RunList;
845 typedef std::set<RunNumber_t> RunSet;
848 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
849 RunItemSet runItemSet;
851 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
865 bool newLumi =
false;
876 if(iFirst || prevPhid != reducedPHID || prevRun !=
eventAux().
run()) {
878 newRun = newLumi =
true;
879 }
else if(prevLumi !=
eventAux().luminosityBlock()) {
882 prevPhid = reducedPHID;
886 lumis.emplace_back(reducedPHID,
890 LumiItem& currentLumi = lumis.back();
892 ++currentLumi.lastEventEntry_;
897 if(runItemSet.insert(item).second) {
898 runs.push_back(std::move(item));
900 phidMap.insert(std::make_pair(
eventAux().
run(), reducedPHID));
911 typedef std::map<RunNumber_t, EntryNumber_t> RunMap;
914 typedef std::vector<RunItem> RunVector;
924 if(runSet.insert(runAux->run()).
second) {
926 emptyRuns.emplace_back(reducedPHID, runAux->run());
929 phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
936 RunItemSortByRun runItemSortByRun;
939 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
940 for(RunVector::const_iterator
i = emptyRuns.begin(), iEnd = emptyRuns.end();
i != iEnd; ++
i) {
941 for(; itRuns != endRuns; ++itRuns) {
942 if(runItemSortByRun(*
i, *itRuns)) {
946 runs.insert(itRuns, *
i);
951 typedef std::vector<LumiItem> LumiVector;
952 LumiVector emptyLumis;
954 typedef std::map<LuminosityBlockID, EntryNumber_t> RunLumiMap;
955 RunLumiMap runLumiMap;
962 if(runLumiSet.insert(lumiID).second) {
967 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
968 assert(iPhidMap != phidMap.end());
969 emptyLumis.emplace_back(iPhidMap->second, lumiAux->run(), lumiAux->luminosityBlock(), -1LL);
978 LumiItemSortByRunLumi lumiItemSortByRunLumi;
981 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
982 for(LumiVector::const_iterator
i = emptyLumis.begin(), iEnd = emptyLumis.end();
i != iEnd; ++
i) {
983 for(; itLumis != endLumis; ++itLumis) {
984 if(lumiItemSortByRunLumi(*
i, *itLumis)) {
988 lumis.insert(itLumis, *
i);
993 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
994 RunCountMap runCountMap;
996 assert(phids.empty());
998 assert(entries.empty());
1000 for(RunList::iterator it = runs.begin(), itEnd = runs.end(); it != itEnd; ++it) {
1001 RunCountMap::const_iterator countMapItem = runCountMap.find(*it);
1002 if(countMapItem == runCountMap.end()) {
1003 countMapItem = runCountMap.insert(std::make_pair(*it, rcount)).first;
1004 assert(countMapItem != runCountMap.end());
1007 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids, it->phid_);
1008 if(phidItem == phids.end()) {
1009 phids.push_back(it->phid_);
1010 phidItem = phids.end() - 1;
1012 entries.emplace_back(
1013 countMapItem->second,
1016 phidItem - phids.begin(),
1024 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1025 LumiCountMap lumiCountMap;
1027 for(LumiList::iterator it = lumis.begin(), itEnd = lumis.end(); it != itEnd; ++it) {
1028 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(it->phid_, it->run_));
1029 assert(runCountMapItem != runCountMap.end());
1030 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(*it);
1031 if(countMapItem == lumiCountMap.end()) {
1032 countMapItem = lumiCountMap.insert(std::make_pair(*it, lcount)).first;
1033 assert(countMapItem != lumiCountMap.end());
1036 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids, it->phid_);
1037 assert(phidItem != phids.end());
1038 entries.emplace_back(
1039 runCountMapItem->second,
1040 countMapItem->second,
1042 phidItem - phids.begin(),
1045 it->firstEventEntry_,
1046 it->lastEventEntry_);
1058 "'Events' tree is corrupted or not present\n" <<
"in the input file.\n";
1068 for(std::vector<ProcessHistoryID>::iterator it = phidVec.begin(), itEnd = phidVec.end();
1087 bool needEventNumbers =
false;
1089 if(inputType !=
InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1090 needEventNumbers =
true;
1092 bool needEventEntries =
false;
1095 needEventEntries =
true;
1103 std::string
const label =
"source";
1104 std::string moduleName =
"PoolSource";
1171 if(!eventHistoryBranch) {
1173 <<
"Failed to find history branch in event history tree.\n";
1175 eventHistoryBranch->SetAddress(&pHistory);
1184 assert(eventSelectionIDBranch != 0);
1188 assert(branchListIndexesBranch != 0);
1207 boost::shared_ptr<LuminosityBlockAuxiliary>
1220 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1223 lumiAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1228 return lumiAuxiliary;
1231 boost::shared_ptr<RunAuxiliary>
1233 boost::shared_ptr<RunAuxiliary> runAuxiliary(
new RunAuxiliary);
1239 RunAux *pRunAux = &runAux;
1244 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1247 runAuxiliary->setProcessHistoryID(
daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1249 return runAuxiliary;
1383 boost::shared_ptr<LuminosityBlockPrincipal> lb) {
1411 boost::shared_ptr<LuminosityBlockPrincipal> lb) {
1421 boost::shared_ptr<RunAuxiliary>
1448 filePtr_->reportInputRunNumber(runAuxiliary->run());
1479 runAuxiliary->setProcessHistoryID(
eventAux().processHistoryID());
1488 return runAuxiliary;
1491 boost::shared_ptr<RunPrincipal>
1503 rpCache->readImmediate();
1508 boost::shared_ptr<LuminosityBlockAuxiliary>
1528 boost::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary =
fillLumiAuxiliary();
1532 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1549 return lumiAuxiliary;
1552 boost::shared_ptr<LuminosityBlockPrincipal>
1565 lbCache->readImmediate();
1628 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
1646 <<
"Failed to find the event history tree.\n";
1656 it != itEnd; ++it) {
1660 <<
"a release (" << it->releaseVersion() <<
") used in writing the input file, " <<
file() <<
".\n"
1661 <<
"Forward compatibility cannot be supported.\n";
1668 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
1669 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile) {
1676 currentIndexIntoFile);
1690 std::set<BranchID> branchesToDrop;
1691 for(ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
1692 it != itEnd; ++it) {
1694 if(!groupSelector.
selected(prod)) {
1695 if(dropDescendants) {
1698 branchesToDrop.insert(prod.
branchID());
1704 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1705 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1707 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
1711 <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
1712 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
1713 <<
"that was explicitly dropped.\n";
1717 ProductRegistry::ProductList::iterator icopy = it;
1719 prodList.erase(icopy);
1728 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1733 if(edp.isMergeable()) {
1735 ProductRegistry::ProductList::iterator icopy = it;
1737 prodList.erase(icopy);
1747 std::unique_ptr<MakeProvenanceReader>
1760 boost::shared_ptr<BranchMapper>
1784 std::vector<ParentageID>
const& iParentageIDLookup,
1787 rootTree_(iRootTree),
1788 pProvVector_(&provVector_),
1789 parentageIDLookup_(iParentageIDLookup),
1790 daqProvenanceHelper_(daqProvenanceHelper) {
1801 it != itEnd; ++it) {
1808 it != itEnd; ++it) {
1828 rootTree_(rootTree),
1830 pInfoVector_(&infoVector_),
1831 daqProvenanceHelper_(daqProvenanceHelper) {
1840 it != itEnd; ++it) {
1846 it != itEnd; ++it) {
1866 rootTree_(rootTree),
1868 pInfoVector_(&infoVector_),
1869 daqProvenanceHelper_(daqProvenanceHelper) {
1878 it != itEnd; ++it) {
1911 std::unique_ptr<ProvenanceReaderBase>
1916 std::unique_ptr<ProvenanceReaderBase>
1918 return std::unique_ptr<ProvenanceReaderBase>(
new OldProvenanceReader(&rootTree, daqProvenanceHelper));
1921 std::unique_ptr<ProvenanceReaderBase>
1923 return std::unique_ptr<ProvenanceReaderBase>(
new FullProvenanceReader(&rootTree, daqProvenanceHelper));
1926 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_
boost::shared_ptr< BranchListIndexes > branchListIndexes_
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
unsigned int const defaultNonEventLearningEntries
std::unique_ptr< EventPrincipal > secondaryEventPrincipal_
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
boost::shared_ptr< FileBlock > createFileBlock() const
BranchType const & branchType() const
std::string const & parentageTreeName()
static LuminosityBlockID firstValidLuminosityBlock()
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
EventPrincipal * readCurrentEvent(EventPrincipal &cache, boost::shared_ptr< LuminosityBlockPrincipal > lb=boost::shared_ptr< LuminosityBlockPrincipal >())
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
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
static bool updateFromInput(BranchIDLists const &bidlists, std::string const &fileName)
EntryType getEntryType() const
bool setEntryAtRun(RunNumber_t run)
ProductProvenanceVector * pInfoVector_
Timestamp const & time() const
std::unique_ptr< MakeProvenanceReader > provenanceReaderMaker_
EntryNumber const & entries() const
void setRefCoreStreamer(bool resetAll=false)
std::string const & fileFormatVersionBranchName()
static ThreadSafeRegistry * instance()
void reduceProcessHistoryIDs()
IndexIntoFileItr begin(SortOrder sortOrder) const
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
std::vector< BranchID > const & parents() const
std::string const & eventSelectionsBranchName()
virtual std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const
InputSource::ProcessingMode processingMode_
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)
LuminosityBlockNumber_t luminosityBlock() const
void trainCache(char const *branchNames)
unsigned int LuminosityBlockNumber_t
virtual ~OldProvenanceReader()
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
TBranch * branchEntryInfoBranch() const
void fillProductRegistryTransients(std::vector< ProcessConfiguration > const &pcVec, ProductRegistry const &preg, bool okToRegister=false)
static void fixBranchListIndexes(BranchListIndexes &indexes)
void advanceToNextLumiOrRun()
EventPrincipal * readEvent(EventPrincipal &cache, boost::shared_ptr< LuminosityBlockPrincipal > lb=boost::shared_ptr< LuminosityBlockPrincipal >())
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
EventPrincipal * clearAndReadCurrentEvent(EventPrincipal &cache, boost::shared_ptr< LuminosityBlockPrincipal > lb=boost::shared_ptr< LuminosityBlockPrincipal >())
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()
bool getMapped(key_type const &k, value_type &result) const
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
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()
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
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, GroupSelectorRules const &groupSelectorRules, InputType::InputType inputType, 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 bypassVersionCheck, bool labelRawDataLikeMC, bool usingGoToEvent)
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
void fillEventPrincipal(EventAuxiliary const &aux, boost::shared_ptr< LuminosityBlockPrincipal > lbp, 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)
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)
void clearEventPrincipal()
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
void dropOnInput(ProductRegistry ®, GroupSelectorRules const &rules, bool dropDescendants, InputType::InputType inputType)
std::string const & file() const
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
void insertIntoSet(ProductProvenance const &provenanceProduct) const
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_
author Stefano ARGIRO author Bill Tanenbaum
bool selected(BranchDescription const &desc) const
unsigned int const defaultNonEventCacheSize
std::vector< value_type > vector_type
RootTreePtrArray treePointers_
void fillEventNumbers() const
boost::shared_ptr< ProductRegistry const > productRegistry_
static int position[264][3]
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()
std::vector< value_type > collection_type
boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > rpCache)
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)
boost::shared_ptr< BranchIDListRegistry::collection_type const > branchIDLists_
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
void initialize(GroupSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
bool insertMapped(value_type const &v)
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_
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
boost::shared_ptr< LuminosityBlockPrincipal > readLumi(boost::shared_ptr< LuminosityBlockPrincipal > lbCache)