Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:04

0001 // -*- C++ -*-
0002 //
0003 // Package:     Framework
0004 // Class  :     ValidityInterval
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Author:      Chris Jones
0010 // Created:     Tue Mar 29 14:47:31 EST 2005
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "FWCore/Framework/interface/ValidityInterval.h"
0017 
0018 namespace edm {
0019   //
0020   // constants, enums and typedefs
0021   //
0022 
0023   //
0024   // static data member definitions
0025   //
0026 
0027   //
0028   // constructors and destructor
0029   //
0030   ValidityInterval::ValidityInterval()
0031       : first_(IOVSyncValue::invalidIOVSyncValue()), last_(IOVSyncValue::invalidIOVSyncValue()) {}
0032 
0033   ValidityInterval::ValidityInterval(const IOVSyncValue& iFirst, const IOVSyncValue& iLast)
0034       : first_(iFirst), last_(iLast) {}
0035 
0036   // ValidityInterval::ValidityInterval(const ValidityInterval& rhs)
0037   // {
0038   //    // do actual copying here;
0039   // }
0040 
0041   //ValidityInterval::~ValidityInterval()
0042   //{
0043   //}
0044 
0045   //
0046   // assignment operators
0047   //
0048   // const ValidityInterval& ValidityInterval::operator=(const ValidityInterval& rhs)
0049   // {
0050   //   //An exception safe implementation is
0051   //   ValidityInterval temp(rhs);
0052   //   swap(rhs);
0053   //
0054   //   return *this;
0055   // }
0056 
0057   //
0058   // member functions
0059   //
0060 
0061   //
0062   // const member functions
0063   //
0064   bool ValidityInterval::validFor(const IOVSyncValue& iInstance) const {
0065     return first_ <= iInstance && iInstance <= last_;
0066   }
0067 
0068   //
0069   // static member functions
0070   //
0071   const ValidityInterval& ValidityInterval::invalidInterval() {
0072     static const ValidityInterval s_invalid;
0073     return s_invalid;
0074   }
0075 
0076 }  // namespace edm