Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:06

0001 #ifndef Framework_ValidityInterval_h
0002 #define Framework_ValidityInterval_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     ValidityInterval
0007 //
0008 /**\class ValidityInterval ValidityInterval.h FWCore/Framework/interface/ValidityInterval.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Author:      Chris Jones
0018 // Created:     Tue Mar 29 14:47:25 EST 2005
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/IOVSyncValue.h"
0025 
0026 // forward declarations
0027 namespace edm {
0028   class ValidityInterval {
0029   public:
0030     ValidityInterval();
0031     ValidityInterval(const IOVSyncValue& iFirst, const IOVSyncValue& iLast);
0032     //virtual ~ValidityInterval();
0033 
0034     // ---------- const member functions ---------------------
0035     bool validFor(const IOVSyncValue&) const;
0036 
0037     const IOVSyncValue& first() const { return first_; }
0038     const IOVSyncValue& last() const { return last_; }
0039 
0040     bool operator==(const ValidityInterval& iRHS) const { return iRHS.first_ == first_ && iRHS.last_ == last_; }
0041     bool operator!=(const ValidityInterval& iRHS) const { return !(*this == iRHS); }
0042 
0043     // ---------- static member functions --------------------
0044     static const ValidityInterval& invalidInterval();
0045 
0046     // ---------- member functions ---------------------------
0047     void setFirst(const IOVSyncValue& iTime) { first_ = iTime; }
0048     void setLast(const IOVSyncValue& iTime) { last_ = iTime; }
0049 
0050   private:
0051     //ValidityInterval(const ValidityInterval&); // stop default
0052 
0053     //const ValidityInterval& operator=(const ValidityInterval&); // stop default
0054 
0055     // ---------- member data --------------------------------
0056     IOVSyncValue first_;
0057     IOVSyncValue last_;
0058   };
0059 
0060 }  // namespace edm
0061 #endif