Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "FWCore/Framework/interface/IOVSyncValue.h"
00017 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00018 #include "FWCore/Utilities/interface/Exception.h"
00019
00020
00021
00022
00023 namespace edm {
00024
00025
00026
00027
00028
00029
00030
00031
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
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
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
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 }