CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/FWCore/Framework/src/ValidityInterval.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Framework
00004 // Class  :     ValidityInterval
00005 // 
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Author:      Chris Jones
00010 // Created:     Tue Mar 29 14:47:31 EST 2005
00011 //
00012 
00013 // system include files
00014 
00015 // user include files
00016 #include "FWCore/Framework/interface/ValidityInterval.h"
00017 
00018 namespace edm {
00019 //
00020 // constants, enums and typedefs
00021 //
00022 
00023 //
00024 // static data member definitions
00025 //
00026 
00027 //
00028 // constructors and destructor
00029 //
00030    ValidityInterval::ValidityInterval() :
00031    first_(IOVSyncValue::invalidIOVSyncValue()),
00032    last_(IOVSyncValue::invalidIOVSyncValue())
00033 {
00034 }
00035 
00036 ValidityInterval::ValidityInterval(const IOVSyncValue& iFirst,
00037                                    const IOVSyncValue& iLast) :
00038 first_(iFirst), last_(iLast)
00039 {
00040 }
00041 
00042 // ValidityInterval::ValidityInterval(const ValidityInterval& rhs)
00043 // {
00044 //    // do actual copying here;
00045 // }
00046 
00047 //ValidityInterval::~ValidityInterval()
00048 //{
00049 //}
00050 
00051 //
00052 // assignment operators
00053 //
00054 // const ValidityInterval& ValidityInterval::operator=(const ValidityInterval& rhs)
00055 // {
00056 //   //An exception safe implementation is
00057 //   ValidityInterval temp(rhs);
00058 //   swap(rhs);
00059 //
00060 //   return *this;
00061 // }
00062 
00063 //
00064 // member functions
00065 //
00066 
00067 //
00068 // const member functions
00069 //
00070 bool
00071 ValidityInterval::validFor(const IOVSyncValue& iInstance) const
00072 {
00073    return first_ <= iInstance && iInstance <= last_;
00074 }
00075    
00076 //
00077 // static member functions
00078 //
00079 const ValidityInterval& 
00080 ValidityInterval::invalidInterval()
00081 {
00082    static const ValidityInterval s_invalid;
00083    return s_invalid;
00084 }
00085 
00086 }