1 #ifndef DataFormats_Provenance_IndexIntoFile_h
2 #define DataFormats_Provenance_IndexIntoFile_h
173 #include "boost/shared_ptr.hpp"
461 void getRange(
long long& beginEventNumbers,
462 long long& endEventNumbers,
558 virtual bool isSameLumi(
int index1,
int index2)
const = 0;
559 virtual bool isSameRun(
int index1,
int index2)
const = 0;
602 virtual bool isSameLumi(
int index1,
int index2)
const;
603 virtual bool isSameRun(
int index1,
int index2)
const;
635 virtual bool isSameLumi(
int index1,
int index2)
const;
636 virtual bool isSameRun(
int index1,
int index2)
const;
712 impl_->skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
726 impl_->skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
748 return !(*
this == right);
void initializeRun()
Should only be used internally and for tests.
virtual bool nextEventRange()
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
virtual bool isSameLumi(int index1, int index2) const
virtual EntryNumber_t entry() const
EntryNumber_t peekAheadAtEventEntry() const
int processHistoryIDIndex() const
void setIndexToLumi(int value)
virtual void initializeLumi_()=0
EntryNumber_t entry() const
LuminosityBlockNumber_t lumi() const
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
virtual LuminosityBlockNumber_t lumi() const
virtual EntryNumber_t peekAheadAtEventEntry() const
virtual EntryNumber_t entry() const
IndexIntoFile const * indexIntoFile() const
virtual bool isSameRun(int index1, int index2) const
LuminosityBlockNumber_t currentLumi_
bool skipToNextEventInLumi()
unsigned int EventNumber_t
virtual bool previousEventRange()=0
std::vector< EventEntry > & eventEntries() const
virtual bool nextEventRange()=0
EntryNumber_t beginEvents() const
virtual bool skipLumiInRun()
void advanceToNextLumiOrRun()
void setBeginEventNumbers(long long v)
std::vector< EventNumber_t > eventNumbers_
virtual int processHistoryIDIndex() const =0
virtual EntryType getRunOrLumiEntryType(int index) const
virtual bool setToLastEventInRange(int index)=0
EntryNumber_t firstEventEntryThisRun() const
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_
virtual LuminosityBlockNumber_t peekAheadAtLumi() const
EntryType getEntryType() const
EntryNumber_t beginEvents_
virtual bool setToLastEventInRange(int index)
virtual bool nextEventRange()
EventEntry(EventNumber_t event, EntryNumber_t entry)
static IndexIntoFile::IndexIntoFileItrImpl * clone(IndexIntoFile::IndexIntoFileItrImpl const *p)
virtual RunNumber_t run() const
virtual void initializeLumi_()
bool operator<(IndexRunLumiKey const &right) const
IndexIntoFile const * indexIntoFile_
bool operator==(SortedRunOrLumiItr const &right) const
int processHistoryIDIndex_
std::vector< RunOrLumiIndexes > & runOrLumiIndexes() const
int indexToGetEntry() const
virtual LuminosityBlockNumber_t peekAheadAtLumi() const =0
EntryNumber_t beginEvents_
void fillUnsortedEventNumbers() const
void reduceProcessHistoryIDs()
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.
virtual int processHistoryIDIndex() const
EntryNumber_t orderPHIDRun() const
std::vector< EventNumber_t > unsortedEventNumbers_
virtual bool isSameLumi(int index1, int index2) const =0
LuminosityBlockNumber_t lumi() const
void setIndexToEventRange(int value)
virtual IndexIntoFileItrImpl * clone() const
IndexRunLumiEventKey(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
virtual ~IndexIntoFileItrImpl()
unsigned int LuminosityBlockNumber_t
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
std::vector< ProcessHistoryID > const & processHistoryIDs() const
static int position[TOTALCHAMBERS][3]
static EventNumber_t const invalidEvent
virtual EntryNumber_t peekAheadAtEventEntry() const =0
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
IndexIntoFile const * indexIntoFile() const
int processHistoryIDIndex() const
bool operator<(RunOrLumiEntry const &right) const
int & currentIndex() const
virtual LuminosityBlockNumber_t lumi() const =0
RunOrLumiIndexes(int processHistoryIDIndex, RunNumber_t run, LuminosityBlockNumber_t lumi, int indexToGetEntry)
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
long long indexToEvent() const
double intersection(double r12)
void setOrderPHIDRun(EntryNumber_t v)
virtual EntryType getRunOrLumiEntryType(int index) const =0
static RunNumber_t const invalidRun
boost::shared_ptr< EventFinder > eventFinder_
void setIndexToEvent(long long value)
virtual EventNumber_t getEventNumberOfEntry(EntryNumber_t entry) const =0
int processHistoryIDIndex_
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
EntryNumber_t orderPHIDRunLumi() const
int indexToEventRange() const
virtual IndexIntoFileItrImpl * clone() const =0
std::vector< RunOrLumiEntry > runOrLumiEntries_
EventNumber_t event() const
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_
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
LuminosityBlockNumber_t lumi_
std::pair< std::string, MonitorElement * > entry
virtual bool isSameRun(int index1, int index2) const =0
EventNumber_t event() const
int processHistoryIDIndex() const
void fillEventEntries() const
void setOrderPHIDRunLumi(EntryNumber_t v)
IndexIntoFileItrImpl(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
virtual EntryNumber_t peekAheadAtEventEntry() const
virtual bool skipLumiInRun()=0
void fillRunOrLumiIndexes() const
std::map< IndexRunKey, EntryNumber_t > runToFirstEntry_
virtual bool isSameRun(int index1, int index2) const
bool operator==(IndexIntoFileItrImpl const &right) const
bool previousLumiWithEvents()
void set_intersection(IndexIntoFile const &indexIntoFile, std::set< IndexRunLumiEventKey > &intersection) const
virtual EntryNumber_t entry() const =0
int processHistoryIDIndex() const
SortedRunOrLumiItr & operator++()
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
void setProcessHistoryIDIndex(int v)
virtual IndexIntoFileItrImpl * clone() const
virtual bool skipLumiInRun()
IndexIntoFileItr & operator++()
Move to next event to be processed.
void setEndEventNumbers(long long v)
virtual RunNumber_t run() const
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()
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
virtual bool isSameLumi(int index1, int index2) const
virtual EntryType getRunOrLumiEntryType(int index) const
IndexIntoFileItrSorted(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
virtual LuminosityBlockNumber_t peekAheadAtLumi() const
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
bool operator<(IndexRunKey const &right) const
EntryNumber_t firstEventEntryThisRun()
void copyPosition(IndexIntoFileItrImpl const &position)
std::vector< EventEntry > eventEntries_
virtual bool previousEventRange()
EntryNumber_t firstEventEntryThisLumi() const
EventNumber_t getEventNumberOfEntry(EntryNumber_t entry) const
void setEventFinder(boost::shared_ptr< EventFinder > ptr) const
virtual int processHistoryIDIndex() const
virtual LuminosityBlockNumber_t lumi() const
void fillEventNumbers() const
LuminosityBlockNumber_t lumi_
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_
IndexIntoFileItr(IndexIntoFile const *indexIntoFile, SortOrder sortOrder, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
IndexIntoFile const * indexIntoFile() const
bool operator<(IndexRunLumiEventKey const &right) const
SortedRunOrLumiItr endRunOrLumi() const
bool operator()(IndexIntoFile::RunOrLumiIndexes const &lh, IndexIntoFile::RunOrLumiIndexes const &rh)
bool skipToNextEventInLumi()
std::map< IndexRunLumiKey, EntryNumber_t > & lumiToFirstEntry() const
virtual bool previousEventRange()
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
virtual bool setToLastEventInRange(int index)
EntryNumber_t entry() const
LuminosityBlockNumber_t lumi_
void getRange(long long &beginEventNumbers, long long &endEventNumbers, EntryNumber_t &beginEventEntry, EntryNumber_t &endEventEntry)
EntryNumber_t & endEvents() const
virtual RunNumber_t run() const =0
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)
IndexIntoFileItrNoSort(IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
virtual void initializeLumi_()
int processHistoryIDIndex_
int processHistoryIDIndex_
RunOrLumiIndexes const & runOrLumiIndexes() const