1 #ifndef DataFormats_Provenance_IndexIntoFile_h 2 #define DataFormats_Provenance_IndexIntoFile_h 180 class TestIndexIntoFile;
181 class TestIndexIntoFile1;
182 class TestIndexIntoFile2;
183 class TestIndexIntoFile3;
184 class TestIndexIntoFile4;
185 class TestIndexIntoFile5;
189 class ProcessHistoryRegistry;
319 EntryNumber_t
Event);
469 void getRange(
long long& beginEventNumbers,
470 long long& endEventNumbers,
471 EntryNumber_t& beginEventEntry,
472 EntryNumber_t& endEventEntry);
496 int indexToEventRange,
497 long long indexToEvent,
507 void skipEventForward(
int& phIndexOfSkippedEvent,
510 EntryNumber_t& skippedEventEntry);
512 void skipEventBackward(
int& phIndexOfEvent,
515 EntryNumber_t& eventEntry);
520 virtual EntryNumber_t
entry()
const = 0;
522 virtual EntryNumber_t peekAheadAtEventEntry()
const = 0;
523 EntryNumber_t firstEventEntryThisRun();
524 EntryNumber_t firstEventEntryThisLumi();
525 virtual bool skipLumiInRun() = 0;
527 void advanceToNextRun();
528 void advanceToNextLumiOrRun();
529 bool skipToNextEventInLumi();
530 void initializeRun();
537 int size()
const {
return size_; }
545 long long nEvents()
const {
return nEvents_; }
560 virtual void initializeLumi_() = 0;
561 virtual bool nextEventRange() = 0;
562 virtual bool previousEventRange() = 0;
563 bool previousLumiWithEvents();
564 virtual bool setToLastEventInRange(
int index) = 0;
565 virtual EntryType getRunOrLumiEntryType(
int index)
const = 0;
566 virtual bool isSameLumi(
int index1,
int index2)
const = 0;
567 virtual bool isSameRun(
int index1,
int index2)
const = 0;
589 int indexToEventRange,
590 long long indexToEvent,
598 EntryNumber_t
entry()
const override;
600 EntryNumber_t peekAheadAtEventEntry()
const override;
601 bool skipLumiInRun()
override;
605 void initializeLumi_()
override;
606 bool nextEventRange()
override;
607 bool previousEventRange()
override;
608 bool setToLastEventInRange(
int index)
override;
609 EntryType getRunOrLumiEntryType(
int index)
const override;
610 bool isSameLumi(
int index1,
int index2)
const override;
611 bool isSameRun(
int index1,
int index2)
const override;
623 int indexToEventRange,
624 long long indexToEvent,
631 EntryNumber_t
entry()
const override;
633 EntryNumber_t peekAheadAtEventEntry()
const override;
634 bool skipLumiInRun()
override;
638 void initializeLumi_()
override;
639 bool nextEventRange()
override;
640 bool previousEventRange()
override;
641 bool setToLastEventInRange(
int index)
override;
642 EntryType getRunOrLumiEntryType(
int index)
const override;
643 bool isSameLumi(
int index1,
int index2)
const override;
644 bool isSameRun(
int index1,
int index2)
const override;
665 int indexToEventRange,
666 long long indexToEvent,
674 EntryNumber_t
entry()
const {
return impl_->entry();}
719 EntryNumber_t& skippedEventEntry) {
720 impl_->skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
733 EntryNumber_t& eventEntry) {
734 impl_->skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
748 void advanceToEvent();
749 void advanceToLumi();
752 return *impl_ == *right.
impl_;
756 return !(*
this == right);
770 friend class ::TestIndexIntoFile;
771 friend class ::TestIndexIntoFile3;
772 friend class ::TestIndexIntoFile4;
773 friend class ::TestIndexIntoFile5;
778 int size()
const {
return impl_->size(); }
784 long long nEvents()
const {
return impl_->nEvents(); }
903 EntryNumber_t
entry);
922 void fixIndexes(std::vector<ProcessHistoryID>& processHistoryIDs);
1034 friend class ::TestIndexIntoFile;
1035 friend class ::TestIndexIntoFile1;
1036 friend class ::TestIndexIntoFile2;
1037 friend class ::TestIndexIntoFile3;
1038 friend class ::TestIndexIntoFile4;
1039 friend class ::TestIndexIntoFile5;
void initializeRun()
Should only be used internally and for tests.
bool operator<(EventEntry const &right) const
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
RunNumber_t & currentRun() const
LuminosityBlockNumber_t lumi() const
int processHistoryIDIndex() const
int processHistoryIDIndex() const
void setEventFinder(std::shared_ptr< EventFinder > ptr) const
EntryNumber_t peekAheadAtEventEntry() const
int processHistoryIDIndex() const
void setIndexToLumi(int value)
EntryNumber_t entry() const
LuminosityBlockNumber_t lumi() const
EntryNumber_t firstEventEntryThisRun()
EntryNumber_t endEvents() const
void doneFileInitialization() const
Clears the temporary vector of event numbers to reduce memory usage.
IndexRunLumiKey(int index, RunNumber_t run, LuminosityBlockNumber_t lumi)
static int const invalidIndex
IndexIntoFile const * indexIntoFile() const
LuminosityBlockNumber_t currentLumi_
std::vector< EventEntry > & eventEntries() const
EntryNumber_t beginEvents() const
void setBeginEventNumbers(long long v)
std::vector< EventNumber_t > eventNumbers_
SortedRunOrLumiItr beginRunOrLumi() const
LuminosityBlockNumber_t lumi_
EntryNumber_t orderPHIDRun_
int processHistoryIDIndex_
bool empty() const
True if no runs, lumis, or events are in the file.
LuminosityBlockNumber_t & currentLumi() const
long long beginEventNumbers_
EntryType getEntryType() const
EntryNumber_t beginEvents_
EventEntry(EventNumber_t event, EntryNumber_t entry)
static IndexIntoFile::IndexIntoFileItrImpl * clone(IndexIntoFile::IndexIntoFileItrImpl const *p)
bool operator<(IndexRunLumiKey const &right) const
IndexIntoFile const * indexIntoFile_
int processHistoryIDIndex_
unsigned long long EventNumber_t
std::vector< RunOrLumiIndexes > & runOrLumiIndexes() const
int indexToGetEntry() const
EntryNumber_t beginEvents_
void fillUnsortedEventNumbers() const
IndexIntoFileItr begin(SortOrder sortOrder) const
long long indexToEvent() const
IndexIntoFile const * indexIntoFile_
bool operator==(EventEntry const &right) const
LuminosityBlockNumber_t lumi() const
int indexToEventRange() const
std::vector< RunOrLumiEntry > const & runOrLumiEntries() const
Used internally and for test purposes.
EntryNumber_t orderPHIDRun() const
std::vector< EventNumber_t > unsortedEventNumbers_
LuminosityBlockNumber_t lumi() const
void setIndexToEventRange(int value)
IndexRunLumiEventKey(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
unsigned int LuminosityBlockNumber_t
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
std::vector< ProcessHistoryID > const & processHistoryIDs() const
static EventNumber_t const invalidEvent
long long beginEventNumbers() const
void advanceToNextLumiOrRun()
std::map< IndexRunLumiKey, EntryNumber_t > lumiToFirstEntry_
bool operator<(RunOrLumiIndexes const &right) const
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
int & previousAddedIndex() const
void sortVector_Run_Or_Lumi_Entries()
void setNEvents(long long value)
size_t numberOfEvents() const
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
IndexIntoFile const * indexIntoFile() const
int processHistoryIDIndex() const
bool operator<(RunOrLumiEntry const &right) const
int & currentIndex() const
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
long long indexToEvent() const
double intersection(double r12)
void setOrderPHIDRun(EntryNumber_t v)
static RunNumber_t const invalidRun
void setIndexToEvent(long long value)
int processHistoryIDIndex_
EntryNumber_t orderPHIDRunLumi() const
int indexToEventRange() const
std::vector< RunOrLumiEntry > runOrLumiEntries_
EventNumber_t event() const
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
EntryNumber_t numberOfEvents_
std::vector< ProcessHistoryID > processHistoryIDs_
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
LuminosityBlockNumber_t lumi_
EntryNumber_t firstEventEntryThisLumi()
EventNumber_t event() const
int processHistoryIDIndex() const
void fillEventEntries() const
void setOrderPHIDRunLumi(EntryNumber_t v)
void fillRunOrLumiIndexes() const
std::map< IndexRunKey, EntryNumber_t > runToFirstEntry_
void set_intersection(IndexIntoFile const &indexIntoFile, std::set< IndexRunLumiEventKey > &intersection) const
int processHistoryIDIndex() const
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
void setProcessHistoryIDIndex(int v)
IndexIntoFileItr & operator++()
Move to next event to be processed.
void setEndEventNumbers(long long v)
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
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
long long endEventNumbers() const
bool operator!=(IndexIntoFileItr const &right) const
void sortEventEntries() const
IndexRunKey(int index, RunNumber_t run)
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 containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
void inputFileClosed() const
void initializeTransients() const
long long nEvents() const
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
std::vector< RunOrLumiEntry > & setRunOrLumiEntries()
void resetEventFinder() const
std::map< IndexRunKey, EntryNumber_t > & runToFirstEntry() const
std::vector< EventNumber_t > & unsortedEventNumbers() const
long long endEventNumbers_
EntryType getEntryType() const
static EntryNumber_t const invalidEntry
static LuminosityBlockNumber_t const invalidLumi
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
LuminosityBlockNumber_t lumi() const
unsigned runOrLumi() const
void initializeLumi()
Should only be used internally and for tests.
ProcessHistoryID const & processHistoryID(int i) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
virtual IndexIntoFileItrImpl * clone() const =0
bool operator<(IndexRunKey const &right) const
std::vector< EventEntry > eventEntries_
EventNumber_t getEventNumberOfEntry(EntryNumber_t entry) const
void fillEventNumbers() const
LuminosityBlockNumber_t lumi_
static int position[264][3]
long long nEvents() const
bool operator==(IndexIntoFileItr const &right) 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_
IndexIntoFile const * indexIntoFile() const
bool operator<(IndexRunLumiEventKey const &right) const
SortedRunOrLumiItr endRunOrLumi() const
bool skipToNextEventInLumi()
std::map< IndexRunLumiKey, EntryNumber_t > & lumiToFirstEntry() const
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
EntryNumber_t entry() const
void reset(double vett[256])
LuminosityBlockNumber_t lumi_
EntryNumber_t & endEvents() const
LuminosityBlockNumber_t peekAheadAtLumi() const
EntryNumber_t & beginEvents() const
value_ptr< IndexIntoFileItrImpl > impl_
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
int processHistoryIDIndex_
int processHistoryIDIndex_
edm::propagate_const< std::shared_ptr< EventFinder > > eventFinder_