1 #ifndef DataFormats_Provenance_IndexIntoFile_h 2 #define DataFormats_Provenance_IndexIntoFile_h 211 class TestIndexIntoFile;
212 class TestIndexIntoFile1;
213 class TestIndexIntoFile2;
214 class TestIndexIntoFile3;
215 class TestIndexIntoFile4;
216 class TestIndexIntoFile5;
220 class ProcessHistoryRegistry;
508 void getRange(
long long& beginEventNumbers,
509 long long& endEventNumbers,
535 int indexToEventRange,
536 long long indexToEvent,
546 void skipEventForward(
int& phIndexOfSkippedEvent,
551 void skipEventBackward(
int& phIndexOfEvent,
564 virtual bool skipLumiInRun() = 0;
565 virtual bool lumiEntryValid(
int index)
const = 0;
567 void advanceToNextRun();
568 void advanceToNextLumiOrRun();
569 bool skipToNextEventInLumi();
570 void initializeRun();
572 void initializeLumi() ;
577 int size()
const {
return size_; }
585 long long nEvents()
const {
return nEvents_; }
600 virtual void initializeLumi_() = 0;
601 virtual bool nextEventRange() = 0;
602 virtual bool previousEventRange() = 0;
603 bool previousLumiWithEvents();
604 virtual bool setToLastEventInRange(
int index) = 0;
605 virtual EntryType getRunOrLumiEntryType(
int index)
const = 0;
606 virtual bool isSameLumi(
int index1,
int index2)
const = 0;
607 virtual bool isSameRun(
int index1,
int index2)
const = 0;
629 int indexToEventRange,
630 long long indexToEvent,
641 bool skipLumiInRun()
override;
642 bool lumiEntryValid(
int index)
const override;
646 void initializeLumi_()
override;
647 bool nextEventRange()
override;
648 bool previousEventRange()
override;
649 bool setToLastEventInRange(
int index)
override;
650 EntryType getRunOrLumiEntryType(
int index)
const override;
651 bool isSameLumi(
int index1,
int index2)
const override;
652 bool isSameRun(
int index1,
int index2)
const override;
664 int indexToEventRange,
665 long long indexToEvent,
675 bool skipLumiInRun()
override;
676 bool lumiEntryValid(
int index)
const override;
680 void initializeLumi_()
override;
681 bool nextEventRange()
override;
682 bool previousEventRange()
override;
683 bool setToLastEventInRange(
int index)
override;
684 EntryType getRunOrLumiEntryType(
int index)
const override;
685 bool isSameLumi(
int index1,
int index2)
const override;
686 bool isSameRun(
int index1,
int index2)
const override;
707 int indexToEventRange,
708 long long indexToEvent,
762 impl_->skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
776 impl_->skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
790 void advanceToEvent();
791 void advanceToLumi();
794 return *impl_ == *right.
impl_;
798 return !(*
this == right);
812 friend class ::TestIndexIntoFile;
813 friend class ::TestIndexIntoFile3;
814 friend class ::TestIndexIntoFile4;
815 friend class ::TestIndexIntoFile5;
820 int size()
const {
return impl_->size(); }
826 long long nEvents()
const {
return impl_->nEvents(); }
966 void fixIndexes(std::vector<ProcessHistoryID>& processHistoryIDs);
1078 friend class ::TestIndexIntoFile;
1079 friend class ::TestIndexIntoFile1;
1080 friend class ::TestIndexIntoFile2;
1081 friend class ::TestIndexIntoFile3;
1082 friend class ::TestIndexIntoFile4;
1083 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 constexpr int invalidIndex
IndexIntoFile const * indexIntoFile() const
LuminosityBlockNumber_t currentLumi_
static void destroy(IndexIntoFile::IndexIntoFileItrImpl *p)
void addLumi(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EntryNumber_t entry)
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::map< IndexRunLumiKey, EntryNumber_t > & lumiToOrder() 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 constexpr EventNumber_t invalidEvent
long long beginEventNumbers() const
void advanceToNextLumiOrRun()
std::map< IndexRunLumiKey, EntryNumber_t > lumiToOrder_
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 constexpr RunNumber_t invalidRun
void setIndexToEvent(long long value)
int processHistoryIDIndex_
EntryNumber_t orderPHIDRunLumi() const
int indexToEventRange() const
std::vector< RunOrLumiEntry > runOrLumiEntries_
std::map< IndexRunKey, EntryNumber_t > runToOrder_
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
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::vector< EventNumber_t > & unsortedEventNumbers() const
long long endEventNumbers_
EntryType getEntryType() const
static constexpr EntryNumber_t invalidEntry
static constexpr LuminosityBlockNumber_t 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)
std::map< IndexRunKey, EntryNumber_t > & runToOrder() const
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()
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_