CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Framework/src/IOVSyncValue.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Framework
00004 // Class  :     IOVSyncValue
00005 // 
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Wed Aug  3 18:35:35 EDT 2005
00011 //
00012 
00013 // system include files
00014 
00015 // user include files
00016 #include "FWCore/Framework/interface/IOVSyncValue.h"
00017 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00018 #include "FWCore/Utilities/interface/Exception.h"
00019 
00020 //
00021 // constants, enums and typedefs
00022 //
00023 namespace edm {
00024 
00025 //
00026 // static data member definitions
00027 //
00028 
00029 
00030 //
00031 // constructors and destructor
00032 //
00033 IOVSyncValue::IOVSyncValue(): eventID_(), time_(),
00034 haveID_(true), haveTime_(true)
00035 {
00036 }
00037 
00038 IOVSyncValue::IOVSyncValue(const EventID& iID) : eventID_(iID), time_(),
00039 haveID_(true), haveTime_(false)
00040 {
00041 }
00042 
00043 IOVSyncValue::IOVSyncValue(const Timestamp& iTime) : eventID_(), time_(iTime),
00044 haveID_(false), haveTime_(true)
00045 {
00046 }
00047 
00048 IOVSyncValue::IOVSyncValue(const EventID& iID, const Timestamp& iTime) :
00049 eventID_(iID), time_(iTime),
00050 haveID_(true), haveTime_(true)
00051 {
00052 }
00053 
00054 // IOVSyncValue::IOVSyncValue(const IOVSyncValue& rhs)
00055 // {
00056 //    // do actual copying here;
00057 // }
00058 
00059 //IOVSyncValue::~IOVSyncValue()
00060 //{
00061 //}
00062 
00063 //
00064 // assignment operators
00065 //
00066 // const IOVSyncValue& IOVSyncValue::operator=(const IOVSyncValue& rhs)
00067 // {
00068 //   //An exception safe implementation is
00069 //   IOVSyncValue temp(rhs);
00070 //   swap(rhs);
00071 //
00072 //   return *this;
00073 // }
00074 
00075 //
00076 // member functions
00077 //
00078 
00079 //
00080 // const member functions
00081 //
00082 void 
00083 IOVSyncValue::throwInvalidComparison() const {
00084   throw cms::Exception("InvalidIOVSyncValueComparison")
00085     <<"Attempted to compare a time-only and a run/lumi/event-only IOVSyncValue. Please report this error to the framework experts.";
00086 }
00087 
00088 //
00089 // static member functions
00090 //
00091 const IOVSyncValue&
00092 IOVSyncValue::invalidIOVSyncValue() {
00093    static IOVSyncValue s_invalid;
00094    return s_invalid;
00095 }
00096 const IOVSyncValue&
00097 IOVSyncValue::endOfTime() {
00098    static IOVSyncValue s_endOfTime(EventID(0xFFFFFFFFUL, LuminosityBlockID::maxLuminosityBlockNumber(), EventID::maxEventNumber()),
00099                                    Timestamp::endOfTime());
00100    return s_endOfTime;
00101 }
00102 const IOVSyncValue&
00103 IOVSyncValue::beginOfTime() {
00104    static IOVSyncValue s_beginOfTime(EventID(1,0,0), Timestamp::beginOfTime());
00105    return s_beginOfTime;
00106 }
00107 }