File indexing completed on 2024-04-06 12:12:06
0001 #ifndef Framework_ValidityInterval_h
0002 #define Framework_ValidityInterval_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "FWCore/Framework/interface/IOVSyncValue.h"
0025
0026
0027 namespace edm {
0028 class ValidityInterval {
0029 public:
0030 ValidityInterval();
0031 ValidityInterval(const IOVSyncValue& iFirst, const IOVSyncValue& iLast);
0032
0033
0034
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
0044 static const ValidityInterval& invalidInterval();
0045
0046
0047 void setFirst(const IOVSyncValue& iTime) { first_ = iTime; }
0048 void setLast(const IOVSyncValue& iTime) { last_ = iTime; }
0049
0050 private:
0051
0052
0053
0054
0055
0056 IOVSyncValue first_;
0057 IOVSyncValue last_;
0058 };
0059
0060 }
0061 #endif