CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::IndexIntoFile::IndexIntoFileItrImpl Class Referenceabstract

#include <IndexIntoFile.h>

Inheritance diagram for edm::IndexIntoFile::IndexIntoFileItrImpl:
edm::IndexIntoFile::IndexIntoFileItrNoSort edm::IndexIntoFile::IndexIntoFileItrSorted

Public Member Functions

void advanceToNextLumiOrRun ()
 
void advanceToNextRun ()
 
virtual IndexIntoFileItrImplclone () const =0
 
void copyPosition (IndexIntoFileItrImpl const &position)
 
virtual EntryNumber_t entry () const =0
 
EntryNumber_t firstEventEntryThisLumi ()
 
EntryNumber_t firstEventEntryThisRun ()
 
EntryType getEntryType () const
 
IndexIntoFile const * indexIntoFile () const
 
 IndexIntoFileItrImpl (IndexIntoFile const *indexIntoFile, EntryType entryType, int indexToRun, int indexToLumi, int indexToEventRange, long long indexToEvent, long long nEvents)
 
long long indexToEvent () const
 
int indexToEventRange () const
 
int indexToLumi () const
 
int indexToRun () const
 
void initializeLumi ()
 
void initializeRun ()
 
virtual LuminosityBlockNumber_t lumi () const =0
 
long long nEvents () const
 
void next ()
 
bool operator== (IndexIntoFileItrImpl const &right) const
 
virtual EntryNumber_t peekAheadAtEventEntry () const =0
 
virtual LuminosityBlockNumber_t peekAheadAtLumi () const =0
 
virtual int processHistoryIDIndex () const =0
 
virtual RunNumber_t run () const =0
 
int size () const
 
void skipEventBackward (int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
 
void skipEventForward (int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
 
virtual bool skipLumiInRun ()=0
 
bool skipToNextEventInLumi ()
 
EntryType type () const
 
virtual ~IndexIntoFileItrImpl ()
 

Protected Member Functions

void setIndexToEvent (long long value)
 
void setIndexToEventRange (int value)
 
void setIndexToLumi (int value)
 
void setInvalid ()
 
void setNEvents (long long value)
 

Private Member Functions

virtual EntryType getRunOrLumiEntryType (int index) const =0
 
virtual void initializeLumi_ ()=0
 
virtual bool isSameLumi (int index1, int index2) const =0
 
virtual bool isSameRun (int index1, int index2) const =0
 
virtual bool nextEventRange ()=0
 
virtual bool previousEventRange ()=0
 
bool previousLumiWithEvents ()
 
virtual bool setToLastEventInRange (int index)=0
 

Private Attributes

IndexIntoFile const * indexIntoFile_
 
long long indexToEvent_
 
int indexToEventRange_
 
int indexToLumi_
 
int indexToRun_
 
long long nEvents_
 
int size_
 
EntryType type_
 

Detailed Description

Definition at line 484 of file IndexIntoFile.h.

Constructor & Destructor Documentation

edm::IndexIntoFile::IndexIntoFileItrImpl::IndexIntoFileItrImpl ( IndexIntoFile const *  indexIntoFile,
EntryType  entryType,
int  indexToRun,
int  indexToLumi,
int  indexToEventRange,
long long  indexToEvent,
long long  nEvents 
)

Definition at line 988 of file IndexIntoFile.cc.

994  :
996  size_(static_cast<int>(indexIntoFile_->runOrLumiEntries_.size())),
997  type_(entryType),
1002  nEvents_(nEvents) {
1003  }
IndexIntoFile const * indexIntoFile() const
std::vector< RunOrLumiEntry > runOrLumiEntries_
edm::IndexIntoFile::IndexIntoFileItrImpl::~IndexIntoFileItrImpl ( )
virtual

Definition at line 1005 of file IndexIntoFile.cc.

1005 {}

Member Function Documentation

void edm::IndexIntoFile::IndexIntoFileItrImpl::advanceToNextLumiOrRun ( )

Definition at line 1286 of file IndexIntoFile.cc.

References i, edm::IndexIntoFile::invalidIndex, edm::IndexIntoFile::kEnd, edm::IndexIntoFile::kLumi, edm::IndexIntoFile::kRun, and edm::size_().

1286  {
1287  if(type_ == kEnd) return;
1288  assert(indexToRun_ != invalidIndex);
1289 
1290  // A preliminary step is to advance to the last run entry for
1291  // this run (actually this step is not needed in the
1292  // context I expect this to be called in, just being careful)
1293  int startSearch = indexToRun_;
1294  for(int i = 1; startSearch + i < size_; ++i) {
1295  if(getRunOrLumiEntryType(startSearch + i) == kRun &&
1296  isSameRun(indexToRun_, startSearch + i)) {
1297  indexToRun_ = startSearch + i;
1298  } else {
1299  break;
1300  }
1301  }
1302 
1303  if(type_ == kRun && indexToLumi_ != invalidIndex) {
1304  type_ = kLumi;
1305  return;
1306  }
1307 
1308  startSearch = indexToLumi_;
1309  if(startSearch == invalidIndex) startSearch = indexToRun_;
1310  for(int i = 1; startSearch + i < size_; ++i) {
1311  if(getRunOrLumiEntryType(startSearch + i) == kRun) {
1312  if(!isSameRun(indexToRun_, startSearch + i)) {
1313  type_ = kRun;
1314  indexToRun_ = startSearch + i;
1315  initializeRun();
1316  return;
1317  }
1318  } else if(indexToLumi_ != invalidIndex) {
1319  if(!isSameLumi(indexToLumi_, startSearch + i)) {
1320  type_ = kLumi;
1321  indexToLumi_ = startSearch + i;
1322  initializeLumi();
1323  return;
1324  }
1325  }
1326  }
1327  setInvalid();
1328  }
int i
Definition: DBlmapReader.cc:9
static int const invalidIndex
virtual bool isSameLumi(int index1, int index2) const =0
virtual EntryType getRunOrLumiEntryType(int index) const =0
virtual bool isSameRun(int index1, int index2) const =0
void edm::IndexIntoFile::IndexIntoFileItrImpl::advanceToNextRun ( )

Definition at line 1271 of file IndexIntoFile.cc.

References i, edm::IndexIntoFile::kEnd, edm::IndexIntoFile::kRun, and edm::size_().

1271  {
1272  if(type_ == kEnd) return;
1273  for(int i = 1; indexToRun_ + i < size_; ++i) {
1275  if(!isSameRun(indexToRun_, indexToRun_ + i)) {
1276  type_ = kRun;
1277  indexToRun_ += i;
1278  initializeRun();
1279  return;
1280  }
1281  }
1282  }
1283  setInvalid();
1284  }
int i
Definition: DBlmapReader.cc:9
virtual EntryType getRunOrLumiEntryType(int index) const =0
virtual bool isSameRun(int index1, int index2) const =0
virtual IndexIntoFileItrImpl* edm::IndexIntoFile::IndexIntoFileItrImpl::clone ( ) const
pure virtual
void edm::IndexIntoFile::IndexIntoFileItrImpl::copyPosition ( IndexIntoFileItrImpl const &  position)

Definition at line 1376 of file IndexIntoFile.cc.

References indexToEvent_, indexToEventRange_, indexToLumi_, indexToRun_, nEvents_, and type_.

1376  {
1377  type_ = position.type_;
1378  indexToRun_ = position.indexToRun_;
1379  indexToLumi_ = position.indexToLumi_;
1380  indexToEventRange_ = position.indexToEventRange_;
1381  indexToEvent_ = position.indexToEvent_;
1382  nEvents_ = position.nEvents_;
1383  }
static int position[264][3]
Definition: ReadPGInfo.cc:509
virtual EntryNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::entry ( ) const
pure virtual
IndexIntoFile::EntryNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::firstEventEntryThisLumi ( )

Definition at line 1242 of file IndexIntoFile.cc.

References i, edm::IndexIntoFile::invalidEntry, edm::IndexIntoFile::invalidIndex, edm::IndexIntoFile::kRun, and nEvents.

1242  {
1243  if(indexToLumi() == invalidIndex) return invalidEntry;
1244 
1245  int saveIndexToLumi = indexToLumi();
1246  int saveIndexToEventRange = indexToEventRange();
1247  long long saveIndexToEvent = indexToEvent();
1248  long long saveNEvents = nEvents();
1249 
1250  for(int i = 1; indexToLumi() - i > 0; ++i) {
1251  if(getRunOrLumiEntryType(indexToLumi_ - i) == kRun) break;
1252  if(!isSameLumi(indexToLumi(), indexToLumi() - i)) break;
1254  }
1255  initializeLumi();
1256 
1258 
1259  if(indexToEvent() < nEvents()) {
1260  returnValue = peekAheadAtEventEntry();
1261  }
1262 
1263  setIndexToLumi(saveIndexToLumi);
1264  setIndexToEventRange(saveIndexToEventRange);
1265  setIndexToEvent(saveIndexToEvent);
1266  setNEvents(saveNEvents);
1267 
1268  return returnValue;
1269  }
int i
Definition: DBlmapReader.cc:9
static int const invalidIndex
virtual bool isSameLumi(int index1, int index2) const =0
long long EntryNumber_t
virtual EntryNumber_t peekAheadAtEventEntry() const =0
virtual EntryType getRunOrLumiEntryType(int index) const =0
static EntryNumber_t const invalidEntry
IndexIntoFile::EntryNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::firstEventEntryThisRun ( )

Definition at line 1215 of file IndexIntoFile.cc.

References edm::IndexIntoFile::invalidEntry, edm::IndexIntoFile::invalidIndex, and nEvents.

1215  {
1216  if(indexToLumi() == invalidIndex) return invalidEntry;
1217 
1218  int saveIndexToLumi = indexToLumi();
1219  int saveIndexToEventRange = indexToEventRange();
1220  long long saveIndexToEvent = indexToEvent();
1221  long long saveNEvents = nEvents();
1222 
1223  initializeRun();
1224 
1226 
1227  do {
1228  if(indexToEvent() < nEvents()) {
1229  returnValue = peekAheadAtEventEntry();
1230  break;
1231  }
1232  } while(skipLumiInRun());
1233 
1234  setIndexToLumi(saveIndexToLumi);
1235  setIndexToEventRange(saveIndexToEventRange);
1236  setIndexToEvent(saveIndexToEvent);
1237  setNEvents(saveNEvents);
1238 
1239  return returnValue;
1240  }
static int const invalidIndex
long long EntryNumber_t
virtual EntryNumber_t peekAheadAtEventEntry() const =0
static EntryNumber_t const invalidEntry
EntryType edm::IndexIntoFile::IndexIntoFileItrImpl::getEntryType ( ) const
inline

Definition at line 498 of file IndexIntoFile.h.

References type_.

virtual EntryType edm::IndexIntoFile::IndexIntoFileItrImpl::getRunOrLumiEntryType ( int  index) const
privatepure virtual
IndexIntoFile const* edm::IndexIntoFile::IndexIntoFileItrImpl::indexIntoFile ( ) const
inline

Definition at line 531 of file IndexIntoFile.h.

References indexIntoFile_.

531 { return indexIntoFile_; }
long long edm::IndexIntoFile::IndexIntoFileItrImpl::indexToEvent ( ) const
inline

Definition at line 539 of file IndexIntoFile.h.

References indexToEvent_.

int edm::IndexIntoFile::IndexIntoFileItrImpl::indexToEventRange ( ) const
inline

Definition at line 538 of file IndexIntoFile.h.

References indexToEventRange_.

int edm::IndexIntoFile::IndexIntoFileItrImpl::indexToLumi ( ) const
inline

Definition at line 537 of file IndexIntoFile.h.

References indexToLumi_.

int edm::IndexIntoFile::IndexIntoFileItrImpl::indexToRun ( ) const
inline

Definition at line 535 of file IndexIntoFile.h.

References indexToRun_.

void edm::IndexIntoFile::IndexIntoFileItrImpl::initializeLumi ( )
inline

Definition at line 527 of file IndexIntoFile.h.

References initializeLumi_().

virtual void edm::IndexIntoFile::IndexIntoFileItrImpl::initializeLumi_ ( )
privatepure virtual
void edm::IndexIntoFile::IndexIntoFileItrImpl::initializeRun ( )

Definition at line 1339 of file IndexIntoFile.cc.

References i, edm::IndexIntoFile::invalidIndex, edm::IndexIntoFile::kRun, and edm::size_().

1339  {
1340 
1343  indexToEvent_ = 0;
1344  nEvents_ = 0;
1345 
1346  for(int i = 1; (i + indexToRun_) < size_; ++i) {
1348  bool sameRun = isSameRun(indexToRun_, indexToRun_ + i);
1349 
1350  if(entryType == kRun) {
1351  if(sameRun) {
1352  continue;
1353  } else {
1354  break;
1355  }
1356  } else {
1358  initializeLumi();
1359  return;
1360  }
1361  }
1362  }
int i
Definition: DBlmapReader.cc:9
static int const invalidIndex
virtual EntryType getRunOrLumiEntryType(int index) const =0
virtual bool isSameRun(int index1, int index2) const =0
virtual bool edm::IndexIntoFile::IndexIntoFileItrImpl::isSameLumi ( int  index1,
int  index2 
) const
privatepure virtual
virtual bool edm::IndexIntoFile::IndexIntoFileItrImpl::isSameRun ( int  index1,
int  index2 
) const
privatepure virtual
virtual LuminosityBlockNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::lumi ( ) const
pure virtual
long long edm::IndexIntoFile::IndexIntoFileItrImpl::nEvents ( ) const
inline

Definition at line 540 of file IndexIntoFile.h.

References nEvents_.

void edm::IndexIntoFile::IndexIntoFileItrImpl::next ( void  )

Definition at line 1007 of file IndexIntoFile.cc.

References newFWLiteAna::found, edm::IndexIntoFile::kEvent, edm::IndexIntoFile::kLumi, edm::IndexIntoFile::kRun, and edm::size_().

Referenced by BeautifulSoup.PageElement::_invert().

1007  {
1008 
1009  if(type_ == kEvent) {
1010  if((indexToEvent_ + 1) < nEvents_) {
1011  ++indexToEvent_;
1012  } else {
1013  bool found = nextEventRange();
1014 
1015  if(!found) {
1017 
1018  if(type_ == kLumi) {
1019  ++indexToLumi_;
1020  initializeLumi();
1021  } else if(type_ == kRun) {
1022  indexToRun_ = indexToLumi_ + 1;
1023  initializeRun();
1024  } else {
1025  setInvalid(); // type_ is kEnd
1026  }
1027  }
1028  }
1029  } else if(type_ == kLumi) {
1030 
1031  if(indexToLumi_ + 1 == size_) {
1032  if(indexToEvent_ < nEvents_) {
1033  type_ = kEvent;
1034  } else {
1035  setInvalid();
1036  }
1037  } else {
1038 
1040 
1041  if(nextType == kLumi && isSameLumi(indexToLumi_, indexToLumi_ + 1)) {
1042  ++indexToLumi_;
1043  } else if(indexToEvent_ < nEvents_) {
1044  type_ = kEvent;
1045  } else if(nextType == kRun) {
1046  type_ = kRun;
1047  indexToRun_ = indexToLumi_ + 1;
1048  initializeRun();
1049  } else {
1050  ++indexToLumi_;
1051  initializeLumi();
1052  }
1053  }
1054  } else if(type_ == kRun) {
1056  bool sameRun = isSameRun(indexToRun_, indexToRun_ + 1);
1057  if(nextType == kRun && sameRun) {
1058  ++indexToRun_;
1059  } else if(nextType == kRun && !sameRun) {
1060  ++indexToRun_;
1061  initializeRun();
1062  } else if(nextType == kLumi) {
1063  type_ = kLumi;
1064  } else {
1065  setInvalid();
1066  }
1067  }
1068  }
virtual bool isSameLumi(int index1, int index2) const =0
virtual EntryType getRunOrLumiEntryType(int index) const =0
virtual bool isSameRun(int index1, int index2) const =0
virtual bool edm::IndexIntoFile::IndexIntoFileItrImpl::nextEventRange ( )
privatepure virtual
bool edm::IndexIntoFile::IndexIntoFileItrImpl::operator== ( IndexIntoFileItrImpl const &  right) const

Definition at line 1364 of file IndexIntoFile.cc.

References indexIntoFile_, indexToEvent_, indexToEventRange_, indexToLumi_, indexToRun_, nEvents_, edm::size_(), size_, and type_.

1364  {
1365  return (indexIntoFile_ == right.indexIntoFile_ &&
1366  size_ == right.size_ &&
1367  type_ == right.type_ &&
1368  indexToRun_ == right.indexToRun_ &&
1369  indexToLumi_ == right.indexToLumi_ &&
1370  indexToEventRange_ == right.indexToEventRange_ &&
1371  indexToEvent_ == right.indexToEvent_ &&
1372  nEvents_ == right.nEvents_);
1373  }
virtual EntryNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::peekAheadAtEventEntry ( ) const
pure virtual
virtual LuminosityBlockNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::peekAheadAtLumi ( ) const
pure virtual
virtual bool edm::IndexIntoFile::IndexIntoFileItrImpl::previousEventRange ( )
privatepure virtual
bool edm::IndexIntoFile::IndexIntoFileItrImpl::previousLumiWithEvents ( )
private

Definition at line 1163 of file IndexIntoFile.cc.

References edm::IndexIntoFile::invalidIndex, edm::IndexIntoFile::kEnd, edm::IndexIntoFile::kEvent, edm::IndexIntoFile::kLumi, edm::IndexIntoFile::kRun, and findQualityFiles::size.

1163  {
1164  // Find the correct place to start the search
1165  int newLumi = indexToLumi();
1166  if(newLumi == invalidIndex) {
1167  newLumi = indexToRun() == invalidIndex ? size() - 1 : indexToRun();
1168  } else {
1169  while(getRunOrLumiEntryType(newLumi - 1) == kLumi &&
1170  isSameLumi(newLumi, newLumi - 1)) {
1171  --newLumi;
1172  }
1173  --newLumi;
1174  }
1175  if(newLumi <= 0) return false;
1176 
1177  // Look backwards for a lumi with events
1178  for( ; newLumi > 0; --newLumi) {
1179  if(getRunOrLumiEntryType(newLumi) == kRun) {
1180  continue;
1181  }
1182  if(setToLastEventInRange(newLumi)) {
1183  break; // found it
1184  }
1185  }
1186  if(newLumi == 0) return false;
1187 
1188  // Finish initializing the iterator
1189  while(getRunOrLumiEntryType(newLumi - 1) == kLumi &&
1190  isSameLumi(newLumi, newLumi - 1)) {
1191  --newLumi;
1192  }
1193  setIndexToLumi(newLumi);
1194 
1195  if(type() != kEnd &&
1196  isSameRun(newLumi, indexToRun())) {
1197  if(type() == kEvent) type_ = kLumi;
1198  return true;
1199  }
1200  int newRun = newLumi;
1201  while(newRun > 0 && getRunOrLumiEntryType(newRun - 1) == kLumi) {
1202  --newRun;
1203  }
1204  --newRun;
1205  assert(getRunOrLumiEntryType(newRun) == kRun);
1206  while(getRunOrLumiEntryType(newRun - 1) == kRun &&
1207  isSameRun(newRun - 1, newLumi)) {
1208  --newRun;
1209  }
1210  indexToRun_ = newRun;
1211  type_ = kRun;
1212  return true;
1213  }
static int const invalidIndex
virtual bool setToLastEventInRange(int index)=0
virtual bool isSameLumi(int index1, int index2) const =0
virtual EntryType getRunOrLumiEntryType(int index) const =0
virtual bool isSameRun(int index1, int index2) const =0
virtual int edm::IndexIntoFile::IndexIntoFileItrImpl::processHistoryIDIndex ( ) const
pure virtual
virtual RunNumber_t edm::IndexIntoFile::IndexIntoFileItrImpl::run ( ) const
pure virtual
void edm::IndexIntoFile::IndexIntoFileItrImpl::setIndexToEvent ( long long  value)
inlineprotected
void edm::IndexIntoFile::IndexIntoFileItrImpl::setIndexToEventRange ( int  value)
inlineprotected
void edm::IndexIntoFile::IndexIntoFileItrImpl::setIndexToLumi ( int  value)
inlineprotected
void edm::IndexIntoFile::IndexIntoFileItrImpl::setInvalid ( void  )
protected
void edm::IndexIntoFile::IndexIntoFileItrImpl::setNEvents ( long long  value)
inlineprotected
virtual bool edm::IndexIntoFile::IndexIntoFileItrImpl::setToLastEventInRange ( int  index)
privatepure virtual
int edm::IndexIntoFile::IndexIntoFileItrImpl::size ( void  ) const
inline

Definition at line 532 of file IndexIntoFile.h.

References size_.

void edm::IndexIntoFile::IndexIntoFileItrImpl::skipEventBackward ( int &  phIndexOfEvent,
RunNumber_t runOfEvent,
LuminosityBlockNumber_t lumiOfEvent,
EntryNumber_t eventEntry 
)

Definition at line 1126 of file IndexIntoFile.cc.

References edm::IndexIntoFile::invalidEntry, edm::IndexIntoFile::invalidIndex, edm::IndexIntoFile::invalidLumi, edm::IndexIntoFile::invalidRun, edm::IndexIntoFile::kRun, and DTTTrigCorrFirst::run.

1129  {
1130  // Look for previous events in the current lumi
1131  if(indexToEvent_ > 0) {
1132  --indexToEvent_;
1133  } else if(!previousEventRange()) {
1134 
1135  // Look for previous events in previous lumis
1136  if(!previousLumiWithEvents()) {
1137 
1138  // If we get here there are no previous events in the file
1139 
1140  if(!indexIntoFile_->empty()) {
1141  // Set the iterator to the beginning of the file
1142  type_ = kRun;
1143  indexToRun_ = 0;
1144  initializeRun();
1145  }
1146  phIndexOfEvent = invalidIndex;
1147  runOfEvent = invalidRun;
1148  lumiOfEvent = invalidLumi;
1149  eventEntry = invalidEntry;
1150  return;
1151  }
1152  }
1153  // Found a previous event and we have set the iterator so that this event
1154  // will be the next event process. (There may or may not be a run and/or
1155  // a lumi processed first).
1156  // Return information about this event
1157  phIndexOfEvent = processHistoryIDIndex();
1158  runOfEvent = run();
1159  lumiOfEvent = peekAheadAtLumi();
1160  eventEntry = peekAheadAtEventEntry();
1161  }
static int const invalidIndex
virtual int processHistoryIDIndex() const =0
bool empty() const
True if no runs, lumis, or events are in the file.
virtual LuminosityBlockNumber_t peekAheadAtLumi() const =0
virtual EntryNumber_t peekAheadAtEventEntry() const =0
static RunNumber_t const invalidRun
static EntryNumber_t const invalidEntry
static LuminosityBlockNumber_t const invalidLumi
virtual RunNumber_t run() const =0
void edm::IndexIntoFile::IndexIntoFileItrImpl::skipEventForward ( int &  phIndexOfSkippedEvent,
RunNumber_t runOfSkippedEvent,
LuminosityBlockNumber_t lumiOfSkippedEvent,
EntryNumber_t skippedEventEntry 
)

Definition at line 1070 of file IndexIntoFile.cc.

References edm::IndexIntoFile::invalidEntry, edm::IndexIntoFile::invalidIndex, edm::IndexIntoFile::invalidLumi, edm::IndexIntoFile::invalidRun, edm::IndexIntoFile::kEnd, edm::IndexIntoFile::kEvent, edm::IndexIntoFile::kLumi, edm::IndexIntoFile::kRun, GetRecoTauVFromDQM_MC_cff::next, and DTTTrigCorrFirst::run.

1073  {
1074  if(indexToEvent_ < nEvents_) {
1075  phIndexOfSkippedEvent = processHistoryIDIndex();
1076  runOfSkippedEvent = run();
1077  lumiOfSkippedEvent = peekAheadAtLumi();
1078  skippedEventEntry = peekAheadAtEventEntry();
1079 
1080  if((indexToEvent_ + 1) < nEvents_) {
1081  ++indexToEvent_;
1082  return;
1083  } else if(nextEventRange()) {
1084  return;
1085  } else if(type_ == kRun || type_ == kLumi) {
1086  if(skipLumiInRun()) {
1087  return;
1088  }
1089  } else if(type_ == kEvent) {
1090  next();
1091  return;
1092  }
1093  advanceToNextRun();
1094  return;
1095  }
1096 
1097  if(type_ == kRun) {
1098  while(skipLumiInRun()) {
1099  if(indexToEvent_ < nEvents_) {
1100  skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1101  return;
1102  }
1103  }
1104  }
1105 
1106  while(indexToEvent_ >= nEvents_ && type_ != kEnd) {
1107  while(skipLumiInRun()) {
1108  if(indexToEvent_ < nEvents_) {
1109  skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1110  return;
1111  }
1112  }
1113  advanceToNextRun();
1114  }
1115  if(type_ == kEnd) {
1116  phIndexOfSkippedEvent = invalidIndex;
1117  runOfSkippedEvent = invalidRun;
1118  lumiOfSkippedEvent = invalidLumi;
1119  skippedEventEntry = invalidEntry;
1120  return;
1121  }
1122  skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1123  return;
1124  }
static int const invalidIndex
virtual int processHistoryIDIndex() const =0
virtual LuminosityBlockNumber_t peekAheadAtLumi() const =0
virtual EntryNumber_t peekAheadAtEventEntry() const =0
static RunNumber_t const invalidRun
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
static EntryNumber_t const invalidEntry
static LuminosityBlockNumber_t const invalidLumi
virtual RunNumber_t run() const =0
virtual bool edm::IndexIntoFile::IndexIntoFileItrImpl::skipLumiInRun ( )
pure virtual
bool edm::IndexIntoFile::IndexIntoFileItrImpl::skipToNextEventInLumi ( )

Definition at line 1330 of file IndexIntoFile.cc.

1330  {
1331  if(indexToEvent_ >= nEvents_) return false;
1332  if((indexToEvent_ + 1) < nEvents_) {
1333  ++indexToEvent_;
1334  return true;
1335  }
1336  return nextEventRange();
1337  }
EntryType edm::IndexIntoFile::IndexIntoFileItrImpl::type ( ) const
inline

Member Data Documentation

IndexIntoFile const* edm::IndexIntoFile::IndexIntoFileItrImpl::indexIntoFile_
private

Definition at line 564 of file IndexIntoFile.h.

Referenced by indexIntoFile(), and operator==().

long long edm::IndexIntoFile::IndexIntoFileItrImpl::indexToEvent_
private

Definition at line 571 of file IndexIntoFile.h.

Referenced by copyPosition(), indexToEvent(), operator==(), and setIndexToEvent().

int edm::IndexIntoFile::IndexIntoFileItrImpl::indexToEventRange_
private

Definition at line 570 of file IndexIntoFile.h.

Referenced by copyPosition(), indexToEventRange(), operator==(), and setIndexToEventRange().

int edm::IndexIntoFile::IndexIntoFileItrImpl::indexToLumi_
private

Definition at line 569 of file IndexIntoFile.h.

Referenced by copyPosition(), indexToLumi(), operator==(), and setIndexToLumi().

int edm::IndexIntoFile::IndexIntoFileItrImpl::indexToRun_
private

Definition at line 568 of file IndexIntoFile.h.

Referenced by copyPosition(), indexToRun(), and operator==().

long long edm::IndexIntoFile::IndexIntoFileItrImpl::nEvents_
private

Definition at line 572 of file IndexIntoFile.h.

Referenced by copyPosition(), nEvents(), operator==(), and setNEvents().

int edm::IndexIntoFile::IndexIntoFileItrImpl::size_
private

Definition at line 565 of file IndexIntoFile.h.

Referenced by operator==(), and size().

EntryType edm::IndexIntoFile::IndexIntoFileItrImpl::type_
private