CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/DataFormats/FWLite/interface/EntryFinder.h

Go to the documentation of this file.
00001 #ifndef DataFormats_FWLite_EntryFinder_h
00002 #define DataFormats_FWLite_EntryFinder_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     FWLite/DataFormats
00006 // Class  :     EntryFinder 
00007 //
00016 //
00017 // Original Author:  Bill Tanenbaum
00018 //
00019 #if !defined(__CINT__) && !defined(__MAKECINT__)
00020 // system include files
00021 
00022 // user include files
00023 #include "DataFormats/Provenance/interface/FileIndex.h"
00024 #include "DataFormats/Provenance/interface/IndexIntoFile.h"
00025 
00026 // forward declarations
00027 
00028 namespace fwlite {
00029    class BranchMapReader;
00030    class EntryFinder {
00031    public:
00032      EntryFinder();
00033      ~EntryFinder();
00034      typedef edm::IndexIntoFile::EntryNumber_t EntryNumber_t;
00035      bool empty() const {return indexIntoFile_.empty() && fileIndex_.empty();}
00036      EntryNumber_t findEvent(edm::RunNumber_t const& run, edm::LuminosityBlockNumber_t const& lumi, edm::EventNumber_t const& event) const;
00037      EntryNumber_t findLumi(edm::RunNumber_t const& run, edm::LuminosityBlockNumber_t const& lumi) const;
00038      EntryNumber_t findRun(edm::RunNumber_t const& run) const;
00039      void fillIndex(BranchMapReader const& branchMap);
00040      static EntryNumber_t const invalidEntry = -1LL;
00041    private:
00042      edm::IndexIntoFile indexIntoFile_;
00043      edm::FileIndex fileIndex_;
00044    };
00045 }
00046 #endif /*__CINT__ */
00047 #endif