File indexing completed on 2024-04-06 12:04:09
0001 #ifndef DataFormats_FWLite_EntryFinder_h
0002 #define DataFormats_FWLite_EntryFinder_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include "DataFormats/Provenance/interface/FileIndex.h"
0023 #include "DataFormats/Provenance/interface/IndexIntoFile.h"
0024
0025
0026
0027 namespace fwlite {
0028 class BranchMapReader;
0029 class EntryFinder {
0030 public:
0031 EntryFinder();
0032 ~EntryFinder();
0033 typedef edm::IndexIntoFile::EntryNumber_t EntryNumber_t;
0034 bool empty() const { return indexIntoFile_.empty() && fileIndex_.empty(); }
0035 EntryNumber_t findEvent(edm::RunNumber_t const& run,
0036 edm::LuminosityBlockNumber_t const& lumi,
0037 edm::EventNumber_t const& event) const;
0038 EntryNumber_t findLumi(edm::RunNumber_t const& run, edm::LuminosityBlockNumber_t const& lumi) const;
0039 EntryNumber_t findRun(edm::RunNumber_t const& run) const;
0040 void fillIndex(BranchMapReader& branchMap);
0041 static EntryNumber_t const invalidEntry = -1LL;
0042
0043 private:
0044 edm::IndexIntoFile indexIntoFile_;
0045 edm::FileIndex fileIndex_;
0046 };
0047 }
0048 #endif