Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Package:     FWLite
0004 // Class  :     IOVSyncValue
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Wed Aug  3 18:35:35 EDT 2005
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "DataFormats/FWLite/interface/IOVSyncValue.h"
0017 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
0018 
0019 //
0020 // constants, enums and typedefs
0021 //
0022 namespace fwlite {
0023 
0024   //
0025   // static data member definitions
0026   //
0027 
0028   //
0029   // constructors and destructor
0030   //
0031   IOVSyncValue::IOVSyncValue() : eventID_(), time_(), haveID_(true), haveTime_(true) {}
0032 
0033   IOVSyncValue::IOVSyncValue(const edm::EventID& iID) : eventID_(iID), time_(), haveID_(true), haveTime_(false) {}
0034 
0035   IOVSyncValue::IOVSyncValue(const edm::Timestamp& iTime) : eventID_(), time_(iTime), haveID_(false), haveTime_(true) {}
0036 
0037   IOVSyncValue::IOVSyncValue(const edm::EventID& iID, const edm::Timestamp& iTime)
0038       : eventID_(iID), time_(iTime), haveID_(true), haveTime_(true) {}
0039 
0040   // IOVSyncValue::IOVSyncValue(const IOVSyncValue& rhs)
0041   // {
0042   //    // do actual copying here;
0043   // }
0044 
0045   //IOVSyncValue::~IOVSyncValue()
0046   //{
0047   //}
0048 
0049   //
0050   // assignment operators
0051   //
0052   // const IOVSyncValue& IOVSyncValue::operator=(const IOVSyncValue& rhs)
0053   // {
0054   //   //An exception safe implementation is
0055   //   IOVSyncValue temp(rhs);
0056   //   swap(rhs);
0057   //
0058   //   return *this;
0059   // }
0060 
0061   //
0062   // member functions
0063   //
0064 
0065   //
0066   // const member functions
0067   //
0068 
0069   //
0070   // static member functions
0071   //
0072   const IOVSyncValue& IOVSyncValue::invalidIOVSyncValue() {
0073     static const IOVSyncValue s_invalid;
0074     return s_invalid;
0075   }
0076   const IOVSyncValue& IOVSyncValue::endOfTime() {
0077     static const IOVSyncValue s_endOfTime(
0078         edm::EventID(0xFFFFFFFFUL, edm::LuminosityBlockID::maxLuminosityBlockNumber(), edm::EventID::maxEventNumber()),
0079         edm::Timestamp::endOfTime());
0080     return s_endOfTime;
0081   }
0082   const IOVSyncValue& IOVSyncValue::beginOfTime() {
0083     static const IOVSyncValue s_beginOfTime(edm::EventID(1, 0, 0), edm::Timestamp::beginOfTime());
0084     return s_beginOfTime;
0085   }
0086 }  // namespace fwlite