1 #ifndef DataFormats_Provenance_IndexIntoFile_h 2 #define DataFormats_Provenance_IndexIntoFile_h 212 class TestIndexIntoFile;
213 class TestIndexIntoFile1;
214 class TestIndexIntoFile2;
215 class TestIndexIntoFile3;
216 class TestIndexIntoFile4;
217 class TestIndexIntoFile5;
221 class ProcessHistoryRegistry;
509 void getRange(
long long& beginEventNumbers,
510 long long& endEventNumbers,
536 int indexToEventRange,
537 long long indexToEvent,
547 void skipEventForward(
int& phIndexOfSkippedEvent,
552 void skipEventBackward(
int& phIndexOfEvent,
565 virtual bool skipLumiInRun() = 0;
566 virtual bool lumiEntryValid(
int index)
const = 0;
568 void advanceToNextRun();
569 void advanceToNextLumiOrRun();
570 bool skipToNextEventInLumi();
571 void initializeRun();
573 void initializeLumi() ;
578 int size()
const {
return size_; }
586 long long nEvents()
const {
return nEvents_; }
590 void getLumisInRun(std::vector<LuminosityBlockNumber_t> &
lumis)
const;
603 virtual void initializeLumi_() = 0;
604 virtual bool nextEventRange() = 0;
605 virtual bool previousEventRange() = 0;
606 bool previousLumiWithEvents();
607 virtual bool setToLastEventInRange(
int index) = 0;
608 virtual EntryType getRunOrLumiEntryType(
int index)
const = 0;
609 virtual bool isSameLumi(
int index1,
int index2)
const = 0;
610 virtual bool isSameRun(
int index1,
int index2)
const = 0;
633 int indexToEventRange,
634 long long indexToEvent,
645 bool skipLumiInRun()
override;
646 bool lumiEntryValid(
int index)
const override;
650 void initializeLumi_()
override;
651 bool nextEventRange()
override;
652 bool previousEventRange()
override;
653 bool setToLastEventInRange(
int index)
override;
654 EntryType getRunOrLumiEntryType(
int index)
const override;
655 bool isSameLumi(
int index1,
int index2)
const override;
656 bool isSameRun(
int index1,
int index2)
const override;
669 int indexToEventRange,
670 long long indexToEvent,
680 bool skipLumiInRun()
override;
681 bool lumiEntryValid(
int index)
const override;
685 void initializeLumi_()
override;
686 bool nextEventRange()
override;
687 bool previousEventRange()
override;
688 bool setToLastEventInRange(
int index)
override;
689 EntryType getRunOrLumiEntryType(
int index)
const override;
690 bool isSameLumi(
int index1,
int index2)
const override;
691 bool isSameRun(
int index1,
int index2)
const override;
713 int indexToEventRange,
714 long long indexToEvent,
768 impl_->skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
782 impl_->skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
796 void advanceToEvent();
797 void advanceToLumi();
800 return *impl_ == *right.
impl_;
804 return !(*
this == right);
816 void getLumisInRun(std::vector<LuminosityBlockNumber_t> &
lumis)
const {impl_->getLumisInRun(lumis);}
820 friend class ::TestIndexIntoFile;
821 friend class ::TestIndexIntoFile3;
822 friend class ::TestIndexIntoFile4;
823 friend class ::TestIndexIntoFile5;
828 int size()
const {
return impl_->size(); }
834 long long nEvents()
const {
return impl_->nEvents(); }
974 void fixIndexes(std::vector<ProcessHistoryID>& processHistoryIDs);
1086 friend class ::TestIndexIntoFile;
1087 friend class ::TestIndexIntoFile1;
1088 friend class ::TestIndexIntoFile2;
1089 friend class ::TestIndexIntoFile3;
1090 friend class ::TestIndexIntoFile4;
1091 friend class ::TestIndexIntoFile5;
1145 iter_.getLumisInRun(lumis);
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
IndexIntoFile::IndexIntoFileItr const & iter_
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.
IndexIntoFileItrHolder(IndexIntoFile::IndexIntoFileItr const &iIter)
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]
void getLumisInRun(std::vector< LuminosityBlockNumber_t > &lumis) const
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
void getLumisInRun(std::vector< LuminosityBlockNumber_t > &lumis) 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_