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 481 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 1007 of file IndexIntoFile.cc.

1013  :
1015  size_(static_cast<int>(indexIntoFile_->runOrLumiEntries_.size())),
1016  type_(entryType),
1021  nEvents_(nEvents) {
1022  }
IndexIntoFile const * indexIntoFile() const
std::vector< RunOrLumiEntry > runOrLumiEntries_
edm::IndexIntoFile::IndexIntoFileItrImpl::~IndexIntoFileItrImpl ( )
virtual

Definition at line 1024 of file IndexIntoFile.cc.

1024 {}

Member Function Documentation

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

Definition at line 1305 of file IndexIntoFile.cc.

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

1305  {
1306  if(type_ == kEnd) return;
1307  assert(indexToRun_ != invalidIndex);
1308 
1309  // A preliminary step is to advance to the last run entry for
1310  // this run (actually this step is not needed in the
1311  // context I expect this to be called in, just being careful)
1312  int startSearch = indexToRun_;
1313  for(int i = 1; startSearch + i < size_; ++i) {
1314  if(getRunOrLumiEntryType(startSearch + i) == kRun &&
1315  isSameRun(indexToRun_, startSearch + i)) {
1316  indexToRun_ = startSearch + i;
1317  } else {
1318  break;
1319  }
1320  }
1321 
1322  if(type_ == kRun && indexToLumi_ != invalidIndex) {
1323  type_ = kLumi;
1324  return;
1325  }
1326 
1327  startSearch = indexToLumi_;
1328  if(startSearch == invalidIndex) startSearch = indexToRun_;
1329  for(int i = 1; startSearch + i < size_; ++i) {
1330  if(getRunOrLumiEntryType(startSearch + i) == kRun) {
1331  if(!isSameRun(indexToRun_, startSearch + i)) {
1332  type_ = kRun;
1333  indexToRun_ = startSearch + i;
1334  initializeRun();
1335  return;
1336  }
1337  } else if(indexToLumi_ != invalidIndex) {
1338  if(!isSameLumi(indexToLumi_, startSearch + i)) {
1339  type_ = kLumi;
1340  indexToLumi_ = startSearch + i;
1341  initializeLumi();
1342  return;
1343  }
1344  }
1345  }
1346  setInvalid();
1347  }
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 1290 of file IndexIntoFile.cc.

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

1290  {
1291  if(type_ == kEnd) return;
1292  for(int i = 1; indexToRun_ + i < size_; ++i) {
1294  if(!isSameRun(indexToRun_, indexToRun_ + i)) {
1295  type_ = kRun;
1296  indexToRun_ += i;
1297  initializeRun();
1298  return;
1299  }
1300  }
1301  }
1302  setInvalid();
1303  }
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 1395 of file IndexIntoFile.cc.

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

1395  {
1396  type_ = position.type_;
1397  indexToRun_ = position.indexToRun_;
1398  indexToLumi_ = position.indexToLumi_;
1399  indexToEventRange_ = position.indexToEventRange_;
1400  indexToEvent_ = position.indexToEvent_;
1401  nEvents_ = position.nEvents_;
1402  }
static int position[TOTALCHAMBERS][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 1261 of file IndexIntoFile.cc.

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

1261  {
1262  if(indexToLumi() == invalidIndex) return invalidEntry;
1263 
1264  int saveIndexToLumi = indexToLumi();
1265  int saveIndexToEventRange = indexToEventRange();
1266  long long saveIndexToEvent = indexToEvent();
1267  long long saveNEvents = nEvents();
1268 
1269  for(int i = 1; indexToLumi() - i > 0; ++i) {
1270  if(getRunOrLumiEntryType(indexToLumi_ - i) == kRun) break;
1271  if(!isSameLumi(indexToLumi(), indexToLumi() - i)) break;
1273  }
1274  initializeLumi();
1275 
1277 
1278  if(indexToEvent() < nEvents()) {
1279  returnValue = peekAheadAtEventEntry();
1280  }
1281 
1282  setIndexToLumi(saveIndexToLumi);
1283  setIndexToEventRange(saveIndexToEventRange);
1284  setIndexToEvent(saveIndexToEvent);
1285  setNEvents(saveNEvents);
1286 
1287  return returnValue;
1288  }
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 1234 of file IndexIntoFile.cc.

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

1234  {
1235  if(indexToLumi() == invalidIndex) return invalidEntry;
1236 
1237  int saveIndexToLumi = indexToLumi();
1238  int saveIndexToEventRange = indexToEventRange();
1239  long long saveIndexToEvent = indexToEvent();
1240  long long saveNEvents = nEvents();
1241 
1242  initializeRun();
1243 
1245 
1246  do {
1247  if(indexToEvent() < nEvents()) {
1248  returnValue = peekAheadAtEventEntry();
1249  break;
1250  }
1251  } while(skipLumiInRun());
1252 
1253  setIndexToLumi(saveIndexToLumi);
1254  setIndexToEventRange(saveIndexToEventRange);
1255  setIndexToEvent(saveIndexToEvent);
1256  setNEvents(saveNEvents);
1257 
1258  return returnValue;
1259  }
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 495 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 528 of file IndexIntoFile.h.

References indexIntoFile_.

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

Definition at line 536 of file IndexIntoFile.h.

References indexToEvent_.

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

Definition at line 535 of file IndexIntoFile.h.

References indexToEventRange_.

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

Definition at line 534 of file IndexIntoFile.h.

References indexToLumi_.

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

Definition at line 532 of file IndexIntoFile.h.

References indexToRun_.

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

Definition at line 524 of file IndexIntoFile.h.

References initializeLumi_().

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

Definition at line 1358 of file IndexIntoFile.cc.

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

1358  {
1359 
1362  indexToEvent_ = 0;
1363  nEvents_ = 0;
1364 
1365  for(int i = 1; (i + indexToRun_) < size_; ++i) {
1367  bool sameRun = isSameRun(indexToRun_, indexToRun_ + i);
1368 
1369  if(entryType == kRun) {
1370  if(sameRun) {
1371  continue;
1372  } else {
1373  break;
1374  }
1375  } else {
1377  initializeLumi();
1378  return;
1379  }
1380  }
1381  }
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 537 of file IndexIntoFile.h.

References nEvents_.

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

Definition at line 1026 of file IndexIntoFile.cc.

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

1026  {
1027 
1028  if(type_ == kEvent) {
1029  if((indexToEvent_ + 1) < nEvents_) {
1030  ++indexToEvent_;
1031  } else {
1032  bool found = nextEventRange();
1033 
1034  if(!found) {
1036 
1037  if(type_ == kLumi) {
1038  ++indexToLumi_;
1039  initializeLumi();
1040  } else if(type_ == kRun) {
1041  indexToRun_ = indexToLumi_ + 1;
1042  initializeRun();
1043  } else {
1044  setInvalid(); // type_ is kEnd
1045  }
1046  }
1047  }
1048  } else if(type_ == kLumi) {
1049 
1050  if(indexToLumi_ + 1 == size_) {
1051  if(indexToEvent_ < nEvents_) {
1052  type_ = kEvent;
1053  } else {
1054  setInvalid();
1055  }
1056  } else {
1057 
1059 
1060  if(nextType == kLumi && isSameLumi(indexToLumi_, indexToLumi_ + 1)) {
1061  ++indexToLumi_;
1062  } else if(indexToEvent_ < nEvents_) {
1063  type_ = kEvent;
1064  } else if(nextType == kRun) {
1065  type_ = kRun;
1066  indexToRun_ = indexToLumi_ + 1;
1067  initializeRun();
1068  } else {
1069  ++indexToLumi_;
1070  initializeLumi();
1071  }
1072  }
1073  } else if(type_ == kRun) {
1075  bool sameRun = isSameRun(indexToRun_, indexToRun_ + 1);
1076  if(nextType == kRun && sameRun) {
1077  ++indexToRun_;
1078  } else if(nextType == kRun && !sameRun) {
1079  ++indexToRun_;
1080  initializeRun();
1081  } else if(nextType == kLumi) {
1082  type_ = kLumi;
1083  } else {
1084  setInvalid();
1085  }
1086  }
1087  }
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 1383 of file IndexIntoFile.cc.

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

1383  {
1384  return (indexIntoFile_ == right.indexIntoFile_ &&
1385  size_ == right.size_ &&
1386  type_ == right.type_ &&
1387  indexToRun_ == right.indexToRun_ &&
1388  indexToLumi_ == right.indexToLumi_ &&
1389  indexToEventRange_ == right.indexToEventRange_ &&
1390  indexToEvent_ == right.indexToEvent_ &&
1391  nEvents_ == right.nEvents_);
1392  }
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 1182 of file IndexIntoFile.cc.

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

1182  {
1183  // Find the correct place to start the search
1184  int newLumi = indexToLumi();
1185  if(newLumi == invalidIndex) {
1186  newLumi = indexToRun() == invalidIndex ? size() - 1 : indexToRun();
1187  } else {
1188  while(getRunOrLumiEntryType(newLumi - 1) == kLumi &&
1189  isSameLumi(newLumi, newLumi - 1)) {
1190  --newLumi;
1191  }
1192  --newLumi;
1193  }
1194  if(newLumi <= 0) return false;
1195 
1196  // Look backwards for a lumi with events
1197  for( ; newLumi > 0; --newLumi) {
1198  if(getRunOrLumiEntryType(newLumi) == kRun) {
1199  continue;
1200  }
1201  if(setToLastEventInRange(newLumi)) {
1202  break; // found it
1203  }
1204  }
1205  if(newLumi == 0) return false;
1206 
1207  // Finish initializing the iterator
1208  while(getRunOrLumiEntryType(newLumi - 1) == kLumi &&
1209  isSameLumi(newLumi, newLumi - 1)) {
1210  --newLumi;
1211  }
1212  setIndexToLumi(newLumi);
1213 
1214  if(type() != kEnd &&
1215  isSameRun(newLumi, indexToRun())) {
1216  if(type() == kEvent) type_ = kLumi;
1217  return true;
1218  }
1219  int newRun = newLumi;
1220  while(newRun > 0 && getRunOrLumiEntryType(newRun - 1) == kLumi) {
1221  --newRun;
1222  }
1223  --newRun;
1224  assert(getRunOrLumiEntryType(newRun) == kRun);
1225  while(getRunOrLumiEntryType(newRun - 1) == kRun &&
1226  isSameRun(newRun - 1, newLumi)) {
1227  --newRun;
1228  }
1229  indexToRun_ = newRun;
1230  type_ = kRun;
1231  return true;
1232  }
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 529 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 1145 of file IndexIntoFile.cc.

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

1148  {
1149  // Look for previous events in the current lumi
1150  if(indexToEvent_ > 0) {
1151  --indexToEvent_;
1152  } else if(!previousEventRange()) {
1153 
1154  // Look for previous events in previous lumis
1155  if(!previousLumiWithEvents()) {
1156 
1157  // If we get here there are no previous events in the file
1158 
1159  if(!indexIntoFile_->empty()) {
1160  // Set the iterator to the beginning of the file
1161  type_ = kRun;
1162  indexToRun_ = 0;
1163  initializeRun();
1164  }
1165  phIndexOfEvent = invalidIndex;
1166  runOfEvent = invalidRun;
1167  lumiOfEvent = invalidLumi;
1168  eventEntry = invalidEntry;
1169  return;
1170  }
1171  }
1172  // Found a previous event and we have set the iterator so that this event
1173  // will be the next event process. (There may or may not be a run and/or
1174  // a lumi processed first).
1175  // Return information about this event
1176  phIndexOfEvent = processHistoryIDIndex();
1177  runOfEvent = run();
1178  lumiOfEvent = peekAheadAtLumi();
1179  eventEntry = peekAheadAtEventEntry();
1180  }
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 1089 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, and DTTTrigCorrFirst::run.

1092  {
1093  if(indexToEvent_ < nEvents_) {
1094  phIndexOfSkippedEvent = processHistoryIDIndex();
1095  runOfSkippedEvent = run();
1096  lumiOfSkippedEvent = peekAheadAtLumi();
1097  skippedEventEntry = peekAheadAtEventEntry();
1098 
1099  if((indexToEvent_ + 1) < nEvents_) {
1100  ++indexToEvent_;
1101  return;
1102  } else if(nextEventRange()) {
1103  return;
1104  } else if(type_ == kRun || type_ == kLumi) {
1105  if(skipLumiInRun()) {
1106  return;
1107  }
1108  } else if(type_ == kEvent) {
1109  next();
1110  return;
1111  }
1112  advanceToNextRun();
1113  return;
1114  }
1115 
1116  if(type_ == kRun) {
1117  while(skipLumiInRun()) {
1118  if(indexToEvent_ < nEvents_) {
1119  skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1120  return;
1121  }
1122  }
1123  }
1124 
1125  while(indexToEvent_ >= nEvents_ && type_ != kEnd) {
1126  while(skipLumiInRun()) {
1127  if(indexToEvent_ < nEvents_) {
1128  skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1129  return;
1130  }
1131  }
1132  advanceToNextRun();
1133  }
1134  if(type_ == kEnd) {
1135  phIndexOfSkippedEvent = invalidIndex;
1136  runOfSkippedEvent = invalidRun;
1137  lumiOfSkippedEvent = invalidLumi;
1138  skippedEventEntry = invalidEntry;
1139  return;
1140  }
1141  skipEventForward(phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1142  return;
1143  }
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 1349 of file IndexIntoFile.cc.

1349  {
1350  if(indexToEvent_ >= nEvents_) return false;
1351  if((indexToEvent_ + 1) < nEvents_) {
1352  ++indexToEvent_;
1353  return true;
1354  }
1355  return nextEventRange();
1356  }
EntryType edm::IndexIntoFile::IndexIntoFileItrImpl::type ( ) const
inline

Member Data Documentation

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

Definition at line 561 of file IndexIntoFile.h.

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

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

Definition at line 568 of file IndexIntoFile.h.

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

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

Definition at line 567 of file IndexIntoFile.h.

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

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

Definition at line 566 of file IndexIntoFile.h.

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

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

Definition at line 565 of file IndexIntoFile.h.

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

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

Definition at line 569 of file IndexIntoFile.h.

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

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

Definition at line 562 of file IndexIntoFile.h.

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

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