|
|
Go to the documentation of this file. 1 #ifndef DataFormats_Provenance_IndexIntoFile_h
2 #define DataFormats_Provenance_IndexIntoFile_h
213 class TestIndexIntoFile;
214 class TestIndexIntoFile1;
215 class TestIndexIntoFile2;
216 class TestIndexIntoFile3;
217 class TestIndexIntoFile4;
218 class TestIndexIntoFile5;
222 class ProcessHistoryRegistry;
499 void getRange(
long long& beginEventNumbers,
500 long long& endEventNumbers,
594 virtual bool isSameLumi(
int index1,
int index2)
const = 0;
595 virtual bool isSameRun(
int index1,
int index2)
const = 0;
639 bool isSameLumi(
int index1,
int index2)
const override;
640 bool isSameRun(
int index1,
int index2)
const override;
673 bool isSameLumi(
int index1,
int index2)
const override;
674 bool isSameRun(
int index1,
int index2)
const override;
749 impl_->skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
763 impl_->skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
797 friend class ::TestIndexIntoFile;
798 friend class ::TestIndexIntoFile3;
799 friend class ::TestIndexIntoFile4;
800 friend class ::TestIndexIntoFile5;
1051 friend class ::TestIndexIntoFile;
1052 friend class ::TestIndexIntoFile1;
1053 friend class ::TestIndexIntoFile2;
1054 friend class ::TestIndexIntoFile3;
1055 friend class ::TestIndexIntoFile4;
1056 friend class ::TestIndexIntoFile5;
LuminosityBlockNumber_t lumi() const
virtual EntryNumber_t peekAheadAtEventEntry() const =0
void copyPosition(IndexIntoFileItr const &position)
Copy the position without modifying the pointer to the IndexIntoFile or size.
void fillRunOrLumiIndexes() const
void doneFileInitialization()
Clears the temporary vector of event numbers to reduce memory usage.
size_t numberOfEvents() const
EntryNumber_t firstEventEntryThisLumi()
int processHistoryIDIndex_
std::vector< RunOrLumiEntry > runOrLumiEntries_
LuminosityBlockNumber_t lumi() const
long long nEvents() const
LuminosityBlockNumber_t & currentLumi() const
IndexIntoFileItrSorted(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
bool operator<(IndexRunLumiEventKey const &right) const
void setIndexToEvent(long long value)
std::vector< EventNumber_t > & eventNumbers() const
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
int processHistoryIDIndex_
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
void setEndEventNumbers(long long v)
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
EntryNumber_t peekAheadAtEventEntry() const override
void setNEvents(long long value)
void fillEventEntries() const
bool previousLumiWithEvents()
EntryNumber_t beginEvents_
std::vector< EventNumber_t > & unsortedEventNumbersMutable() const
bool setToLastEventInRange(int index) override
bool skipToNextEventInLumi()
std::vector< EventNumber_t > eventNumbers_
LuminosityBlockNumber_t lumi() const override
int processHistoryIDIndex() const
void getLumisInRun(std::vector< LuminosityBlockNumber_t > &lumis) const
void setNumberOfEvents(EntryNumber_t nevents)
edm::propagate_const< std::shared_ptr< EventFinder > > eventFinder_
LuminosityBlockNumber_t peekAheadAtLumi() const
LuminosityBlockNumber_t lumi() const
bool skipLumiInRun() override
bool operator==(IndexIntoFileItr const &right) const
bool setToLastEventInRange(int index) override
IndexIntoFileItrHolder(IndexIntoFile::IndexIntoFileItr const &iIter)
unsigned runOrLumi() const
EntryNumber_t orderPHIDRunLumi() const
void set_intersection(IndexIntoFile const &indexIntoFile, std::set< IndexRunLumiEventKey > &intersection) const
static constexpr EntryNumber_t invalidEntry
ProcessHistoryID const & processHistoryID(int i) const
IndexIntoFile const * indexIntoFile() const
bool isSameLumi(int index1, int index2) const override
RunNumber_t run() const override
std::vector< EventNumber_t > & unsortedEventNumbers()
bool operator==(IndexIntoFileItrImpl const &right) const
virtual IndexIntoFileItrImpl * clone() const =0
std::vector< EventNumber_t > const & unsortedEventNumbers() const
SortedRunOrLumiItr endRunOrLumi() const
static void destroy(IndexIntoFile::IndexIntoFileItrImpl *p)
bool containsRun(RunNumber_t run) const
void initializeTransients()
void advanceToNextLumiOrRun()
LuminosityBlockNumber_t lumi_
LuminosityBlockNumber_t lumi() const
bool containsLumi(RunNumber_t run, LuminosityBlockNumber_t lumi) const
virtual bool lumiEntryValid(int index) const =0
EntryNumber_t beginEvents_
IndexIntoFile const * indexIntoFile() const
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
bool operator==(EventEntry const &right) const
virtual LuminosityBlockNumber_t peekAheadAtLumi() const =0
unsigned int LuminosityBlockNumber_t
int processHistoryIDIndex() const
virtual LuminosityBlockNumber_t lumi() const =0
EntryType getEntryType() const
void initializeLumi()
Should only be used internally and for tests.
bool operator<(RunOrLumiEntry const &right) const
bool empty() const
True if no runs, lumis, or events are in the file.
IndexIntoFile const * indexIntoFile_
long long endEventNumbers() const
virtual ~IndexIntoFileItrImpl()
EntryNumber_t peekAheadAtEventEntry() const override
bool nextEventRange() override
std::map< IndexRunKey, EntryNumber_t > runToOrder_
std::vector< EventNumber_t > unsortedEventNumbers_
EntryNumber_t firstEventEntryThisLumi()
void initializeLumi_() override
int processHistoryIDIndex() const
LuminosityBlockNumber_t lumi() const
bool isSameLumi(int index1, int index2) const override
void setIndexToEventRange(int value)
long long indexToEvent() const
bool skipToNextEventInLumi()
bool isSameRun(int index1, int index2) const override
void setEventFinder(std::shared_ptr< EventFinder > ptr)
bool operator<(EventEntry const &right) const
static constexpr int invalidIndex
SortedRunOrLumiItr(IndexIntoFile const *indexIntoFile, unsigned runOrLumi)
bool operator==(SortedRunOrLumiItr const &right) const
bool operator<(RunOrLumiIndexes const &right) const
EntryNumber_t firstEventEntryThisRun()
IndexIntoFileItr(IndexIntoFile const *indexIntoFile, SortOrder sortOrder, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
EntryNumber_t numberOfEvents_
std::vector< EventEntry > & eventEntries() const
void resetEventFinder() const
EntryNumber_t orderPHIDRun_
virtual bool previousEventRange()=0
int indexToEventRange() const
long long endEventNumbers_
unsigned long long EventNumber_t
int processHistoryIDIndex() const
void setIndexToLumi(int value)
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
std::map< IndexRunLumiKey, EntryNumber_t > & lumiToOrder() const
std::map< IndexRunLumiKey, EntryNumber_t > lumiToOrder_
LuminosityBlockNumber_t peekAheadAtLumi() const override
SortedRunOrLumiItr beginRunOrLumi() const
static constexpr LuminosityBlockNumber_t invalidLumi
virtual EventNumber_t getEventNumberOfEntry(EntryNumber_t entry) const =0
value_ptr< IndexIntoFileItrImpl > impl_
void getLumisInRun(std::vector< LuminosityBlockNumber_t > &lumis) const
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
void initializeLumi_() override
IndexIntoFileItr begin(SortOrder sortOrder) const
int processHistoryIDIndex_
EntryNumber_t beginEvents() const
bool containsEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
IndexIntoFile const * indexIntoFile_
virtual EntryNumber_t entry() const =0
static constexpr EventNumber_t invalidEvent
EntryNumber_t & beginEvents() const
IndexRunLumiEventKey(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
EntryNumber_t entry() const
virtual bool isSameRun(int index1, int index2) const =0
RunOrLumiIndexes(int processHistoryIDIndex, RunNumber_t run, LuminosityBlockNumber_t lumi, int indexToGetEntry)
void initializeRun()
Should only be used internally and for tests.
int processHistoryIDIndex_
bool containsDuplicateEvents() const
Returns true if the IndexIntoFile contains 2 events with the same ProcessHistoryID index,...
bool nextEventRange() override
LuminosityBlockNumber_t lumi_
IndexRunKey(int index, RunNumber_t run)
bool operator()(IndexIntoFile::RunOrLumiIndexes const &lh, IndexIntoFile::RunOrLumiIndexes const &rh)
EventNumber_t event() const
long long beginEventNumbers() const
int processHistoryIDIndex_
std::map< IndexRunKey, EntryNumber_t > & runToOrder() const
EntryNumber_t firstEventEntryThisRun()
static int position[264][3]
bool operator<(IndexRunLumiKey const &right) const
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
IndexIntoFileItrNoSort(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
int & currentIndex() const
std::vector< ProcessHistoryID > const & processHistoryIDs() const
EntryNumber_t orderPHIDRun() const
virtual int processHistoryIDIndex() const =0
long long nEvents() const
EntryNumber_t entry() const override
RunNumber_t & currentRun() const
void addLumi(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EntryNumber_t entry)
EntryNumber_t entry() const override
void copyPosition(IndexIntoFileItrImpl const &position)
int indexToEventRange() const
bool operator()(IndexIntoFile::RunOrLumiIndexes const &lh, IndexIntoFile::RunOrLumiIndexes const &rh)
RunOrLumiIndexes const & runOrLumiIndexes() const
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
void setProcessHistoryIDIndex(int v)
EntryType getRunOrLumiEntryType(int index) const override
EntryNumber_t & endEvents() const
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
bool operator<(IndexRunKey const &right) const
virtual RunNumber_t run() const =0
IndexIntoFileItrImpl * clone() const override
virtual void initializeLumi_()=0
std::vector< RunOrLumiIndexes > & runOrLumiIndexes() const
bool lumiEntryValid(int index) const override
void fillUnsortedEventNumbers() const
EventNumber_t event() const
int processHistoryIDIndex() const override
bool skipLumiInRun() override
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
void setOrderPHIDRunLumi(EntryNumber_t v)
IndexIntoFileItrImpl(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
EntryType getEntryType() const
LuminosityBlockNumber_t lumi() const override
LuminosityBlockNumber_t lumi_
long long indexToEvent() const
IndexIntoFile const * indexIntoFile() const
EntryNumber_t orderPHIDRunLumi_
void setOrderPHIDRun(EntryNumber_t v)
void advanceToNextLumiOrRun()
EntryNumber_t peekAheadAtEventEntry() const
virtual EntryType getRunOrLumiEntryType(int index) const =0
bool previousEventRange() override
RunNumber_t run() const override
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
std::vector< EventEntry > eventEntries_
bool operator!=(SortedRunOrLumiItr const &right) const
std::vector< RunOrLumiIndexes > runOrLumiIndexes_
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
std::vector< ProcessHistoryID > processHistoryIDs_
int processHistoryIDIndex() const
EventEntry(EventNumber_t event, EntryNumber_t entry)
void sortVector_Run_Or_Lumi_Entries()
virtual bool skipLumiInRun()=0
LuminosityBlockNumber_t peekAheadAtLumi() const override
virtual bool isSameLumi(int index1, int index2) const =0
EntryType getRunOrLumiEntryType(int index) const override
LuminosityBlockNumber_t lumi_
int processHistoryIDIndex() const override
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
bool previousEventRange() override
std::vector< RunOrLumiEntry > & setRunOrLumiEntries()
void getLumisInRun(std::vector< LuminosityBlockNumber_t > &lumis) const
SortedRunOrLumiItr & operator++()
bool operator!=(IndexIntoFileItr const &right) const
std::vector< RunOrLumiEntry > const & runOrLumiEntries() const
Used internally and for test purposes.
IndexRunLumiKey(int index, RunNumber_t run, LuminosityBlockNumber_t lumi)
EntryNumber_t entry() const
void sortEventEntries() const
virtual bool setToLastEventInRange(int index)=0
long long beginEventNumbers_
bool isSameRun(int index1, int index2) const override
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
int indexToGetEntry() const
int & previousAddedIndex() const
EntryNumber_t endEvents() const
double intersection(double r12)
bool lumiEntryValid(int index) const override
IndexIntoFileItrImpl * clone() const override
LuminosityBlockNumber_t currentLumi_
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
IndexIntoFile::IndexIntoFileItr const & iter_
int processHistoryIDIndex() const
EventNumber_t getEventNumberOfEntry(EntryNumber_t entry) const
void getRange(long long &beginEventNumbers, long long &endEventNumbers, EntryNumber_t &beginEventEntry, EntryNumber_t &endEventEntry)
EntryNumber_t entry() const
static constexpr RunNumber_t invalidRun
void setBeginEventNumbers(long long v)
void fillEventNumbers() const
virtual bool nextEventRange()=0
IndexIntoFileItr & operator++()
Move to next event to be processed.
static IndexIntoFile::IndexIntoFileItrImpl * clone(IndexIntoFile::IndexIntoFileItrImpl const *p)