CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/FWCore/Framework/interface/ValidityInterval.h

Go to the documentation of this file.
00001 #ifndef Framework_ValidityInterval_h
00002 #define Framework_ValidityInterval_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     ValidityInterval
00007 // 
00016 //
00017 // Author:      Chris Jones
00018 // Created:     Tue Mar 29 14:47:25 EST 2005
00019 //
00020 
00021 // system include files
00022 
00023 // user include files
00024 #include "FWCore/Framework/interface/IOVSyncValue.h"
00025 
00026 // forward declarations
00027 namespace edm {
00028 class ValidityInterval
00029 {
00030 
00031    public:
00032       ValidityInterval();
00033       ValidityInterval(const IOVSyncValue& iFirst,
00034                        const IOVSyncValue& iLast);
00035       //virtual ~ValidityInterval();
00036 
00037       // ---------- const member functions ---------------------
00038       bool validFor(const IOVSyncValue&) const;
00039       
00040       const IOVSyncValue& first() const { return first_; }
00041       const IOVSyncValue& last() const { return last_; }
00042       
00043       bool operator==(const ValidityInterval& iRHS) const {
00044          return iRHS.first_ == first_ && 
00045          iRHS.last_ == last_ ;
00046       }
00047       bool operator!=(const ValidityInterval& iRHS) const {
00048          return ! (*this == iRHS);
00049       }
00050       
00051       // ---------- static member functions --------------------
00052       static const ValidityInterval& invalidInterval();
00053       
00054       // ---------- member functions ---------------------------
00055       void setFirst(const IOVSyncValue& iTime) {
00056          first_ = iTime;
00057       }
00058       void setLast(const IOVSyncValue& iTime) {
00059          last_ = iTime;
00060       }
00061       
00062    private:
00063       //ValidityInterval(const ValidityInterval&); // stop default
00064 
00065       //const ValidityInterval& operator=(const ValidityInterval&); // stop default
00066 
00067       // ---------- member data --------------------------------
00068       IOVSyncValue first_;
00069       IOVSyncValue last_;
00070 };
00071 
00072 }
00073 #endif