19 : previousAddedIndex_(invalidIndex),
22 beginEvents_(invalidEntry),
23 endEvents_(invalidEntry),
24 currentIndex_(invalidIndex),
25 currentRun_(invalidRun),
26 currentLumi_(invalidLumi),
32 unsortedEventNumbers_() {}
104 <<
"In IndexIntoFile::addEntry. Entries were added in illegal order.\n" 105 <<
"This means the IndexIntoFile product in the output file will be corrupted.\n" 106 <<
"The output file will be unusable for most purposes.\n" 107 <<
"If this occurs after an unrelated exception was thrown in\n" 108 <<
"endLuminosityBlock or endRun then ignore this exception and fix\n" 109 <<
"the primary exception. This is an expected side effect.\n" 110 <<
"Otherwise please report this to the core framework developers\n";
116 std::pair<IndexRunKey, EntryNumber_t> keyAndOrder(
IndexRunKey(index, run), entry);
131 addLumi(index, run, lumi, entry);
164 long long beginEventNumbers = 0;
166 std::vector<RunOrLumiIndexes>::iterator beginOfLumi =
runOrLumiIndexes().begin();
167 std::vector<RunOrLumiIndexes>::iterator endOfLumi = beginOfLumi;
170 while (beginOfLumi != iEnd && beginOfLumi->isRun()) {
173 if (beginOfLumi == iEnd)
176 endOfLumi = beginOfLumi + 1;
177 while (endOfLumi != iEnd && beginOfLumi->processHistoryIDIndex() == endOfLumi->processHistoryIDIndex() &&
178 beginOfLumi->run() == endOfLumi->run() && beginOfLumi->lumi() == endOfLumi->lumi()) {
182 for (std::vector<RunOrLumiIndexes>::iterator iter = beginOfLumi; iter != endOfLumi; ++iter) {
183 if (runOrLumiEntries_[iter->indexToGetEntry()].beginEvents() !=
invalidEntry) {
184 nEvents += runOrLumiEntries_[iter->indexToGetEntry()].endEvents() -
185 runOrLumiEntries_[iter->indexToGetEntry()].beginEvents();
188 for (std::vector<RunOrLumiIndexes>::iterator iter = beginOfLumi; iter != endOfLumi; ++iter) {
189 iter->setBeginEventNumbers(beginEventNumbers);
190 iter->setEndEventNumbers(beginEventNumbers + nEvents);
193 beginOfLumi = endOfLumi;
208 needEventNumbers =
false;
212 needEventEntries =
false;
224 if (!needEventNumbers && !needEventEntries) {
230 if (needEventNumbers) {
233 if (needEventEntries) {
238 long long previousBeginEventNumbers = -1
LL;
242 if (runOrLumi.isRun())
245 long long beginEventNumbers = 0;
246 long long endEventNumbers = 0;
249 runOrLumi.getRange(beginEventNumbers, endEventNumbers, beginEventEntry, endEventEntry);
253 if (beginEventNumbers != previousBeginEventNumbers)
257 if (needEventNumbers) {
260 if (needEventEntries) {
266 previousBeginEventNumbers = beginEventNumbers;
267 offset += endEventEntry - beginEventEntry;
269 if (needEventNumbers) {
273 if (needEventEntries) {
309 std::vector<ProcessHistoryID> reducedPHIDs;
311 std::map<ProcessHistoryID, int> reducedPHIDToIndex;
313 std::pair<std::map<ProcessHistoryID, int>::iterator,
bool> insertResult;
315 std::vector<int> phidIndexConverter;
318 mapEntry.first = reducedPHID;
319 insertResult = reducedPHIDToIndex.insert(mapEntry);
321 if (insertResult.second) {
322 insertResult.first->second = reducedPHIDs.size();
323 reducedPHIDs.push_back(reducedPHID);
325 phidIndexConverter.push_back(insertResult.first->second);
327 processHistoryIDs_.
swap(reducedPHIDs);
332 if (processHistoryIDs_.size() == reducedPHIDs.size()) {
336 std::map<IndexIntoFile::IndexRunKey, int> runOrderMap;
337 std::pair<std::map<IndexIntoFile::IndexRunKey, int>::iterator,
bool> runInsertResult;
339 std::map<IndexIntoFile::IndexRunLumiKey, int> lumiOrderMap;
340 std::pair<std::map<IndexIntoFile::IndexRunLumiKey, int>::iterator,
bool> lumiInsertResult;
345 item.setProcessHistoryIDIndex(phidIndexConverter.at(
item.processHistoryIDIndex()));
349 runInsertResult = runOrderMap.insert(std::pair<IndexIntoFile::IndexRunKey, int>(runKey, 0));
350 if (runInsertResult.second) {
351 runInsertResult.first->second =
item.orderPHIDRun();
353 item.setOrderPHIDRun(runInsertResult.first->second);
357 if (
item.lumi() != 0) {
359 lumiInsertResult = lumiOrderMap.insert(std::pair<IndexIntoFile::IndexRunLumiKey, int>(lumiKey, 0));
360 if (lumiInsertResult.second) {
361 lumiInsertResult.first->second =
item.orderPHIDRunLumi();
363 item.setOrderPHIDRunLumi(lumiInsertResult.first->second);
367 std::stable_sort(runOrLumiEntries_.begin(), runOrLumiEntries_.end());
371 std::map<int, int> oldToNewIndex;
376 std::vector<ProcessHistoryID>::const_iterator iterExisting =
377 std::find(processHistoryIDs.begin(), processHistoryIDs.end(), *iter);
378 if (iterExisting == processHistoryIDs.end()) {
380 processHistoryIDs.push_back(*iter);
382 oldToNewIndex[iter -
processHistoryIDs_.begin()] = iterExisting - processHistoryIDs.begin();
388 item.setProcessHistoryIDIndex(oldToNewIndex[
item.processHistoryIDIndex()]);
394 std::map<IndexRunKey, EntryNumber_t>::const_iterator keyAndOrder =
398 <<
"In IndexIntoFile::sortVector_Run_Or_Lumi_Entries. A run entry is missing.\n" 399 <<
"This means the IndexIntoFile product in the output file will be corrupted.\n" 400 <<
"The output file will be unusable for most purposes.\n" 401 <<
"If this occurs after an unrelated exception was thrown in\n" 402 <<
"endLuminosityBlock or endRun then ignore this exception and fix\n" 403 <<
"the primary exception. This is an expected side effect.\n" 404 <<
"Otherwise please report this to the core framework developers\n";
406 item.setOrderPHIDRun(keyAndOrder->second);
413 std::vector<RunOrLumiIndexes>::iterator beginOfLumi =
runOrLumiIndexes().begin();
414 std::vector<RunOrLumiIndexes>::iterator endOfLumi = beginOfLumi;
417 while (beginOfLumi != iEnd && beginOfLumi->isRun()) {
420 if (beginOfLumi == iEnd)
423 endOfLumi = beginOfLumi + 1;
424 while (endOfLumi != iEnd && beginOfLumi->processHistoryIDIndex() == endOfLumi->processHistoryIDIndex() &&
425 beginOfLumi->run() == endOfLumi->run() && beginOfLumi->lumi() == endOfLumi->lumi()) {
428 assert(beginOfLumi->endEventNumbers() >= 0);
429 assert(beginOfLumi->endEventNumbers() <=
static_cast<long long>(
eventNumbers().size()));
431 eventNumbers().begin() + beginOfLumi->endEventNumbers());
432 beginOfLumi = endOfLumi;
438 std::vector<RunOrLumiIndexes>::iterator beginOfLumi =
runOrLumiIndexes().begin();
439 std::vector<RunOrLumiIndexes>::iterator endOfLumi = beginOfLumi;
442 while (beginOfLumi != iEnd && beginOfLumi->isRun()) {
445 if (beginOfLumi == iEnd)
448 endOfLumi = beginOfLumi + 1;
449 while (endOfLumi != iEnd && beginOfLumi->processHistoryIDIndex() == endOfLumi->processHistoryIDIndex() &&
450 beginOfLumi->run() == endOfLumi->run() && beginOfLumi->lumi() == endOfLumi->lumi()) {
453 assert(beginOfLumi->endEventNumbers() >= 0);
454 assert(beginOfLumi->endEventNumbers() <=
static_cast<long long>(
eventEntries().size()));
456 eventEntries().begin() + beginOfLumi->endEventNumbers());
457 beginOfLumi = endOfLumi;
463 return end(sortOrder);
477 if (it.getEntryType() ==
kEvent) {
478 if (it.entry() < maxEntry) {
481 maxEntry = it.entry();
494 bool lumiMissing = (lumi == 0 &&
event != 0);
496 std::vector<RunOrLumiIndexes>::const_iterator iEnd =
runOrLumiIndexes().end();
497 std::vector<RunOrLumiIndexes>::const_iterator phEnd;
500 for (std::vector<RunOrLumiIndexes>::const_iterator phBegin =
runOrLumiIndexes().
begin(); phBegin != iEnd;
503 phEnd = std::upper_bound(phBegin, iEnd, el,
Compare_Index());
505 std::vector<RunOrLumiIndexes>::const_iterator iRun = std::lower_bound(phBegin, phEnd, el,
Compare_Index_Run());
507 if (iRun == phEnd || iRun->run() !=
run)
517 std::vector<RunOrLumiIndexes>::const_iterator iRunEnd = std::upper_bound(iRun, phEnd, el,
Compare_Index_Run());
519 std::vector<RunOrLumiIndexes>::const_iterator iLumi = std::lower_bound(iRun, iRunEnd, el);
520 if (iLumi == iRunEnd || iLumi->lumi() !=
lumi)
536 long long beginEventNumbers = iLumi->beginEventNumbers();
537 long long endEventNumbers = iLumi->endEventNumbers();
538 if (beginEventNumbers >= endEventNumbers)
541 long long indexToEvent = 0;
543 std::vector<EventEntry>::const_iterator eventIter =
550 indexToEvent = eventIter -
eventEntries().begin() - beginEventNumbers;
553 std::vector<EventNumber_t>::const_iterator eventIter = std::lower_bound(
555 if (eventIter == (
eventNumbers().
begin() + endEventNumbers) || *eventIter != event)
558 indexToEvent = eventIter -
eventNumbers().begin() - beginEventNumbers;
575 endEventNumbers - beginEventNumbers);
578 std::vector<RunOrLumiIndexes>::const_iterator iLumi = iRun;
579 while (iLumi != iRunEnd && iLumi->lumi() ==
invalidLumi) {
582 if (iLumi == iRunEnd)
585 std::vector<RunOrLumiIndexes>::const_iterator lumiEnd;
586 for (; iLumi != iRunEnd; iLumi = lumiEnd) {
588 lumiEnd = std::upper_bound(iLumi, iRunEnd, elWithLumi);
590 long long beginEventNumbers = iLumi->beginEventNumbers();
591 long long endEventNumbers = iLumi->endEventNumbers();
592 if (beginEventNumbers >= endEventNumbers)
595 long long indexToEvent = 0;
597 std::vector<EventEntry>::const_iterator eventIter =
603 indexToEvent = eventIter -
eventEntries().begin() - beginEventNumbers;
606 std::vector<EventNumber_t>::const_iterator eventIter = std::lower_bound(
608 if (eventIter == (
eventNumbers().
begin() + endEventNumbers) || *eventIter != event)
610 indexToEvent = eventIter -
eventNumbers().begin() - beginEventNumbers;
627 endEventNumbers - beginEventNumbers);
645 while (itr != itrEnd) {
660 if (eventNumber == event) {
738 while (iter1 != iEnd1 && iter1.
isRun())
745 while (iter2 != iEnd2 && iter2.
isRun())
755 while (iter1 != iEnd1 && iter2 != iEnd2) {
758 if (indexes1 < indexes2) {
760 }
else if (indexes2 < indexes1) {
765 if (indexes1.
isRun() || (previousIndexes && !(*previousIndexes < indexes1))) {
769 previousIndexes = &indexes1;
780 if ((beginEventNumbers1 >= endEventNumbers1) || (beginEventNumbers2 >= endEventNumbers2)) {
787 std::vector<EventEntry> matchingEvents;
788 std::insert_iterator<std::vector<EventEntry> > insertIter(matchingEvents, matchingEvents.begin());
791 indexIntoFile.
eventEntries().begin() + beginEventNumbers2,
792 indexIntoFile.
eventEntries().begin() + endEventNumbers2,
801 std::vector<EventNumber_t> matchingEvents;
802 std::insert_iterator<std::vector<EventNumber_t> > insertIter(matchingEvents, matchingEvents.begin());
805 indexIntoFile.
eventNumbers().begin() + beginEventNumbers2,
806 indexIntoFile.
eventNumbers().begin() + endEventNumbers2,
825 if (indexes.
isRun() || (previousIndexes && !(*previousIndexes < indexes))) {
828 previousIndexes = &indexes;
834 if (beginEventNumbers + 1 >= endEventNumbers)
838 std::vector<EventEntry>::iterator
last =
eventEntries().begin() + endEventNumbers;
839 if (std::adjacent_find(
eventEntries().
begin() + beginEventNumbers, last) != last) {
844 std::vector<EventNumber_t>::iterator
last =
eventNumbers().begin() + endEventNumbers;
845 if (std::adjacent_find(
eventNumbers().
begin() + beginEventNumbers, last) != last) {
887 indexToGetEntry_(indexToGetEntry),
888 beginEventNumbers_(-1),
889 endEventNumbers_(-1) {}
892 : indexIntoFile_(indexIntoFile), runOrLumi_(runOrLumi) {
917 long long& endEventNumbers,
936 int indexToEventRange,
937 long long indexToEvent,
942 indexToRun_(indexToRun),
943 indexToLumi_(indexToLumi),
944 indexToEventRange_(indexToEventRange),
945 indexToEvent_(indexToEvent),
985 }
else if (nextType ==
kRun) {
997 if (nextType ==
kRun && sameRun) {
999 }
else if (nextType ==
kRun && !sameRun) {
1002 }
else if (nextType ==
kLumi) {
1016 runOfSkippedEvent =
run();
1040 skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1049 skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1062 skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1116 for (; newLumi > 0; --newLumi) {
1139 int newRun = newLumi;
1160 long long saveNEvents =
nEvents();
1188 long long saveNEvents =
nEvents();
1238 for (
int i = 1; startSearch +
i <
size_; ++
i) {
1254 for (
int i = 1; startSearch +
i <
size_; ++
i) {
1294 if (entryType ==
kRun) {
1312 auto oldLumi =
lumi();
1316 assert(oldLumi ==
lumi());
1347 if (entryType ==
kRun) {
1355 if (luminosityBlock !=
invalidLumi && luminosityBlock != previousLumi) {
1356 lumis.push_back(luminosityBlock);
1357 previousLumi = luminosityBlock;
1361 std::sort(lumis.begin(), lumis.end());
1362 lumis.erase(
std::unique(lumis.begin(), lumis.end()), lumis.end());
1382 indexIntoFile, entryType, indexToRun, indexToLumi, indexToEventRange, indexToEvent, nEvents) {}
1540 if (index < 0 || index >=
size()) {
1549 if (index1 < 0 || index1 >=
size() || index2 < 0 || index2 >=
size()) {
1556 if (index1 < 0 || index1 >=
size() || index2 < 0 || index2 >=
size()) {
1565 if (index < 0 || index >=
size()) {
1579 indexIntoFile, entryType, indexToRun, indexToLumi, indexToEventRange, indexToEvent, nEvents) {
1616 long long eventNumberIndex =
1633 long long eventNumberIndex =
1657 if (nEventsInRange == 0) {
1697 if (index < 0 || index >=
size()) {
1706 if (index1 < 0 || index1 >=
size() || index2 < 0 || index2 >=
size()) {
1713 if (index1 < 0 || index1 >=
size() || index2 < 0 || index2 >=
size()) {
1722 if (index < 0 || index >=
size()) {
1739 indexIntoFile, entryType, indexToRun, indexToLumi, indexToEventRange, indexToEvent, nEvents));
1743 indexIntoFile, entryType, indexToRun, indexToLumi, indexToEventRange, indexToEvent, nEvents));
1767 return lh.
run() < rh.
run();
void initializeRun()
Should only be used internally and for tests.
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
RunNumber_t & currentRun() const
int processHistoryIDIndex() const
int processHistoryIDIndex() const
virtual bool isSameLumi(int index1, int index2) const =0
EntryNumber_t peekAheadAtEventEntry() const
int processHistoryIDIndex() const override
bool isSameLumi(int index1, int index2) const override
void setIndexToLumi(int value)
virtual void initializeLumi_()=0
EntryNumber_t endEvents() const
void doneFileInitialization() const
Clears the temporary vector of event numbers to reduce memory usage.
static constexpr int invalidIndex
bool skipLumiInRun() override
RunNumber_t run() const override
IndexIntoFile const * indexIntoFile() const
IndexIntoFileItrImpl * clone() const override
LuminosityBlockNumber_t currentLumi_
bool skipToNextEventInLumi()
bool isSameRun(int index1, int index2) const override
void addLumi(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EntryNumber_t entry)
virtual bool previousEventRange()=0
std::vector< EventEntry > & eventEntries() const
virtual bool nextEventRange()=0
EntryNumber_t beginEvents() const
void advanceToNextLumiOrRun()
EntryNumber_t entry() const override
std::vector< EventNumber_t > eventNumbers_
virtual bool setToLastEventInRange(int index)=0
SortedRunOrLumiItr beginRunOrLumi() const
EntryNumber_t orderPHIDRun_
bool empty() const
True if no runs, lumis, or events are in the file.
LuminosityBlockNumber_t & currentLumi() const
RunNumber_t run() const override
EntryType getEntryType() const
EntryNumber_t beginEvents_
bool isSameLumi(int index1, int index2) const override
bool nextEventRange() override
IndexIntoFile const * indexIntoFile_
bool operator==(SortedRunOrLumiItr const &right) const
unsigned long long EventNumber_t
std::vector< RunOrLumiIndexes > & runOrLumiIndexes() const
EntryNumber_t beginEvents_
void fillUnsortedEventNumbers() const
EntryNumber_t peekAheadAtEventEntry() const override
IndexIntoFileItr begin(SortOrder sortOrder) const
void initializeLumi_() override
bool previousEventRange() override
IndexIntoFile const * indexIntoFile_
void swap(Hash< I > &other)
LuminosityBlockNumber_t lumi() const
std::map< IndexRunLumiKey, EntryNumber_t > & lumiToOrder() const
std::vector< RunOrLumiEntry > const & runOrLumiEntries() const
Used internally and for test purposes.
LuminosityBlockNumber_t peekAheadAtLumi() const override
void stable_sort_all(RandomAccessSequence &s)
wrappers for std::stable_sort
EntryNumber_t orderPHIDRun() const
std::vector< EventNumber_t > unsortedEventNumbers_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EntryNumber_t entry() const override
virtual LuminosityBlockNumber_t lumi() const =0
void setIndexToEventRange(int value)
virtual ~IndexIntoFileItrImpl()
unsigned int LuminosityBlockNumber_t
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
std::vector< ProcessHistoryID > const & processHistoryIDs() const
static constexpr EventNumber_t invalidEvent
void swap(Association< C > &lhs, Association< C > &rhs)
long long beginEventNumbers() const
virtual bool lumiEntryValid(int index) const =0
std::map< IndexRunLumiKey, EntryNumber_t > lumiToOrder_
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
virtual bool isSameRun(int index1, int index2) const =0
int & previousAddedIndex() const
void sortVector_Run_Or_Lumi_Entries()
void setNEvents(long long value)
EntryType getRunOrLumiEntryType(int index) const override
size_t numberOfEvents() const
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
IndexIntoFile const * indexIntoFile() const
bool skipLumiInRun() override
int & currentIndex() const
bool setToLastEventInRange(int index) override
RunOrLumiIndexes(int processHistoryIDIndex, RunNumber_t run, LuminosityBlockNumber_t lumi, int indexToGetEntry)
long long indexToEvent() const
LuminosityBlockNumber_t lumi() const override
double intersection(double r12)
static constexpr RunNumber_t invalidRun
void setIndexToEvent(long long value)
int processHistoryIDIndex_
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
EntryNumber_t orderPHIDRunLumi() const
int indexToEventRange() const
std::vector< RunOrLumiEntry > runOrLumiEntries_
std::map< IndexRunKey, EntryNumber_t > runToOrder_
void copyPosition(IndexIntoFileItr const &position)
Copy the position without modifying the pointer to the IndexIntoFile or size.
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
EntryNumber_t numberOfEvents_
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
std::vector< ProcessHistoryID > processHistoryIDs_
LuminosityBlockNumber_t lumi_
def unique(seq, keepstr=True)
bool isSameRun(int index1, int index2) const override
void fillEventEntries() const
IndexIntoFileItrImpl(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
virtual bool skipLumiInRun()=0
EntryType getRunOrLumiEntryType(int index) const override
void fillRunOrLumiIndexes() const
bool operator==(IndexIntoFileItrImpl const &right) const
bool lumiEntryValid(int index) const override
bool previousLumiWithEvents()
void set_intersection(IndexIntoFile const &indexIntoFile, std::set< IndexRunLumiEventKey > &intersection) const
SortedRunOrLumiItr & operator++()
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
void getLumisInRun(std::vector< LuminosityBlockNumber_t > &lumis) const
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
virtual EntryType getRunOrLumiEntryType(int index) const =0
LuminosityBlockNumber_t lumi() const override
bool operator()(IndexIntoFile::RunOrLumiIndexes const &lh, IndexIntoFile::RunOrLumiIndexes const &rh)
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 operator!=(SortedRunOrLumiItr const &right) const
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
long long endEventNumbers() const
SortedRunOrLumiItr(IndexIntoFile const *indexIntoFile, unsigned runOrLumi)
EntryNumber_t firstEventEntryThisLumi()
Hash< ProcessHistoryType > ProcessHistoryID
void sortEventEntries() const
bool containsLumi(RunNumber_t run, LuminosityBlockNumber_t lumi) const
bool containsDuplicateEvents() const
Returns true if the IndexIntoFile contains 2 events with the same ProcessHistoryID index...
bool previousEventRange() override
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
void inputFileClosed() const
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
bool setToLastEventInRange(int index) override
void resetEventFinder() const
bool nextEventRange() override
std::vector< EventNumber_t > & unsortedEventNumbers() const
static constexpr EntryNumber_t invalidEntry
EntryNumber_t peekAheadAtEventEntry() const override
IndexIntoFileItrSorted(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
virtual RunNumber_t run() const =0
static constexpr LuminosityBlockNumber_t invalidLumi
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
unsigned runOrLumi() const
void initializeLumi()
Should only be used internally and for tests.
ProcessHistoryID const & processHistoryID(int i) const
std::map< IndexRunKey, EntryNumber_t > & runToOrder() const
EntryNumber_t firstEventEntryThisRun()
void copyPosition(IndexIntoFileItrImpl const &position)
IndexIntoFileItrImpl * clone() const override
std::vector< EventEntry > eventEntries_
EventNumber_t getEventNumberOfEntry(EntryNumber_t entry) const
bool lumiEntryValid(int index) const override
void fillEventNumbers() const
static int position[264][3]
LuminosityBlockNumber_t peekAheadAtLumi() const override
long long nEvents() const
void setNumberOfEvents(EntryNumber_t nevents) const
bool containsEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
std::vector< EventNumber_t > & eventNumbers() const
std::vector< RunOrLumiIndexes > runOrLumiIndexes_
IndexIntoFileItr(IndexIntoFile const *indexIntoFile, SortOrder sortOrder, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
virtual int processHistoryIDIndex() const =0
virtual LuminosityBlockNumber_t peekAheadAtLumi() const =0
SortedRunOrLumiItr endRunOrLumi() const
bool operator()(IndexIntoFile::RunOrLumiIndexes const &lh, IndexIntoFile::RunOrLumiIndexes const &rh)
bool skipToNextEventInLumi()
bool containsRun(RunNumber_t run) const
EntryNumber_t orderPHIDRunLumi_
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
EntryNumber_t entry() const
void getRange(long long &beginEventNumbers, long long &endEventNumbers, EntryNumber_t &beginEventEntry, EntryNumber_t &endEventEntry)
EntryNumber_t & endEvents() const
LuminosityBlockNumber_t peekAheadAtLumi() const
EntryNumber_t & beginEvents() const
virtual EntryNumber_t peekAheadAtEventEntry() const =0
value_ptr< IndexIntoFileItrImpl > impl_
IndexIntoFileItrNoSort(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
void initializeLumi_() override
int processHistoryIDIndex() const override
edm::propagate_const< std::shared_ptr< EventFinder > > eventFinder_
RunOrLumiIndexes const & runOrLumiIndexes() const