CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
edm::Timestamp Class Reference

#include <Timestamp.h>

Public Member Functions

unsigned int microsecondOffset () const
 Microseconds offset within second. More...
 
bool operator!= (Timestamp const &iRHS) const
 
bool operator< (Timestamp const &iRHS) const
 
bool operator<= (Timestamp const &iRHS) const
 
bool operator== (Timestamp const &iRHS) const
 
bool operator> (Timestamp const &iRHS) const
 
bool operator>= (Timestamp const &iRHS) const
 
 Timestamp (TimeValue_t iValue)
 
 Timestamp ()
 
unsigned int unixTime () const
 Time in seconds since January 1, 1970. More...
 
TimeValue_t value () const
 

Static Public Member Functions

static Timestamp beginOfTime ()
 
static Timestamp endOfTime ()
 
static Timestamp invalidTimestamp ()
 

Private Attributes

unsigned int timeHigh_
 
unsigned int timeLow_
 

Static Private Attributes

static const TimeValue_t kLowMask = 0xFFFFFFFF
 

Detailed Description

Definition at line 23 of file Timestamp.h.

Constructor & Destructor Documentation

◆ Timestamp() [1/2]

edm::Timestamp::Timestamp ( TimeValue_t  iValue)
inlineexplicit

Definition at line 27 of file Timestamp.h.

28  : timeLow_(static_cast<unsigned int>(kLowMask & iValue)), timeHigh_(static_cast<unsigned int>(iValue >> 32)) {}
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83
static const TimeValue_t kLowMask
Definition: Timestamp.h:24

◆ Timestamp() [2/2]

edm::Timestamp::Timestamp ( )
inline

Definition at line 30 of file Timestamp.h.

Referenced by beginOfTime(), endOfTime(), and invalidTimestamp().

static Timestamp invalidTimestamp()
Definition: Timestamp.h:75
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83

Member Function Documentation

◆ beginOfTime()

static Timestamp edm::Timestamp::beginOfTime ( )
inlinestatic

◆ endOfTime()

static Timestamp edm::Timestamp::endOfTime ( )
inlinestatic

◆ invalidTimestamp()

static Timestamp edm::Timestamp::invalidTimestamp ( )
inlinestatic

Definition at line 75 of file Timestamp.h.

References Timestamp().

Referenced by edm::conversion(), DAQSource::DAQSource(), edm::StreamerInputSource::deserializeEvent(), FedRawDataInputSource::FedRawDataInputSource(), edm::OccurrenceTraits< ProcessBlockPrincipal, BranchActionGlobalBegin >::makeGlobalContext(), edm::OccurrenceTraits< ProcessBlockPrincipal, BranchActionProcessBlockInput >::makeGlobalContext(), edm::OccurrenceTraits< ProcessBlockPrincipal, BranchActionGlobalEnd >::makeGlobalContext(), FedRawDataInputSource::maybeOpenNewLumiSection(), DAQSource::maybeOpenNewLumiSection(), edm::LuminosityBlockAuxiliary::mergeAuxiliary(), edm::RunAuxiliary::mergeNewTimestampsIntoThis_(), edm::ThrowingSource::readLuminosityBlockAuxiliary_(), LH5Source::readLuminosityBlockAuxiliary_(), LHESource::readLuminosityBlockAuxiliary_(), edmtest::SourceWithWaits::readLuminosityBlockAuxiliary_(), edm::RootFile::readLuminosityBlockAuxiliary_(), edm::ThrowingSource::readRunAuxiliary_(), LHESource::readRunAuxiliary_(), LH5Source::readRunAuxiliary_(), edmtest::SourceWithWaits::readRunAuxiliary_(), edm::RootFile::readRunAuxiliary_(), fwlite::Record::Record(), edm::RunAuxiliary::setBeginTime(), edm::LuminosityBlockAuxiliary::setBeginTime(), edm::RunAuxiliary::setEndTime(), edm::LuminosityBlockAuxiliary::setEndTime(), fwlite::Record::syncTo(), edm::OutputModuleCommunicatorT< T >::writeProcessBlockAsync(), and edm::Schedule::writeProcessBlockAsync().

75 { return Timestamp(0); }

◆ microsecondOffset()

unsigned int edm::Timestamp::microsecondOffset ( ) const
inline

Microseconds offset within second.

Definition at line 36 of file Timestamp.h.

References timeLow_.

Referenced by cond::hdf5::convertSyncValue(), and edm::operator<<().

36 { return timeLow_; }
unsigned int timeLow_
Definition: Timestamp.h:83

◆ operator!=()

bool edm::Timestamp::operator!= ( Timestamp const &  iRHS) const
inline

Definition at line 47 of file Timestamp.h.

47 { return !(*this == iRHS); }

◆ operator<()

bool edm::Timestamp::operator< ( Timestamp const &  iRHS) const
inline

Definition at line 49 of file Timestamp.h.

References timeHigh_, and timeLow_.

49  {
50  if (timeHigh_ == iRHS.timeHigh_) {
51  return timeLow_ < iRHS.timeLow_;
52  }
53  return timeHigh_ < iRHS.timeHigh_;
54  }
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83

◆ operator<=()

bool edm::Timestamp::operator<= ( Timestamp const &  iRHS) const
inline

Definition at line 55 of file Timestamp.h.

References timeHigh_, and timeLow_.

55  {
56  if (timeHigh_ == iRHS.timeHigh_) {
57  return timeLow_ <= iRHS.timeLow_;
58  }
59  return timeHigh_ <= iRHS.timeHigh_;
60  }
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83

◆ operator==()

bool edm::Timestamp::operator== ( Timestamp const &  iRHS) const
inline

Definition at line 46 of file Timestamp.h.

References timeHigh_, and timeLow_.

46 { return timeHigh_ == iRHS.timeHigh_ && timeLow_ == iRHS.timeLow_; }
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83

◆ operator>()

bool edm::Timestamp::operator> ( Timestamp const &  iRHS) const
inline

Definition at line 61 of file Timestamp.h.

References timeHigh_, and timeLow_.

61  {
62  if (timeHigh_ == iRHS.timeHigh_) {
63  return timeLow_ > iRHS.timeLow_;
64  }
65  return timeHigh_ > iRHS.timeHigh_;
66  }
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83

◆ operator>=()

bool edm::Timestamp::operator>= ( Timestamp const &  iRHS) const
inline

Definition at line 67 of file Timestamp.h.

References timeHigh_, and timeLow_.

67  {
68  if (timeHigh_ == iRHS.timeHigh_) {
69  return timeLow_ >= iRHS.timeLow_;
70  }
71  return timeHigh_ >= iRHS.timeHigh_;
72  }
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83

◆ unixTime()

unsigned int edm::Timestamp::unixTime ( ) const
inline

◆ value()

TimeValue_t edm::Timestamp::value ( ) const
inline

Definition at line 38 of file Timestamp.h.

References timeHigh_, and timeLow_.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), average.Average::average(), ecaldqm::OccupancyTask::beginEvent(), AlcaBeamSpotProducer::beginLuminosityBlock(), BeamSpotAnalyzer::beginLuminosityBlock(), BeamMonitorBx::beginLuminosityBlock(), FakeBeamMonitor::beginLuminosityBlock(), BeamMonitor::beginLuminosityBlock(), FakeBeamMonitor::bookHistograms(), BeamMonitor::bookHistograms(), TrackingMonitor::bookHistograms(), Types.string::configValue(), Types.FileInPath::configValue(), Vx3DHLTAnalyzer::dqmBeginLuminosityBlock(), Vx3DHLTAnalyzer::dqmEndLuminosityBlock(), Mixins.UsingBlock::dumpPython(), BeamSpotAnalyzer::endLuminosityBlock(), BeamMonitorBx::endLuminosityBlock(), FakeBeamMonitor::endLuminosityBlock(), BeamMonitor::endLuminosityBlock(), AlcaBeamSpotProducer::endLuminosityBlockProduce(), HLTPrescaleRecorder::endRun(), EcalLaserDbService::getLaserCorrection(), popcon::RpcObGasData::getNewObjects(), popcon::RPCObPVSSmapData::getNewObjects(), popcon::RpcDataI::getNewObjects(), popcon::RpcDataS::getNewObjects(), popcon::RpcDataUXC::getNewObjects(), popcon::RpcDataT::getNewObjects(), popcon::RpcDataV::getNewObjects(), popcon::RpcDataFebmap::getNewObjects(), popcon::RpcDataGasMix::getNewObjects(), popcon::EcalLaser_weekly_Handler::getNewObjects(), popcon::EcalLaserHandler::getNewObjects(), EcalSignalGenerator< EEDigitizerTraits >::initializeEvent(), Mixins.UsingBlock::insertInto(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), edm::service::Tracer::postEvent(), edm::service::Tracer::postGlobalBeginLumi(), edm::service::Tracer::postGlobalBeginRun(), edm::service::Tracer::postGlobalEndLumi(), edm::service::Tracer::postGlobalEndRun(), edm::service::Tracer::postGlobalWriteLumi(), edm::service::Tracer::postGlobalWriteRun(), edm::service::Tracer::postStreamBeginLumi(), edm::service::Tracer::postStreamBeginRun(), edm::service::Tracer::postStreamEndLumi(), edm::service::Tracer::postStreamEndRun(), edm::service::Tracer::preEvent(), cond::service::PoolDBOutputService::preEventProcessing(), edm::service::Tracer::preGlobalBeginLumi(), edm::service::Tracer::preGlobalBeginRun(), edm::service::Tracer::preGlobalEndLumi(), edm::service::Tracer::preGlobalEndRun(), edm::service::Tracer::preGlobalWriteLumi(), edm::service::Tracer::preGlobalWriteRun(), edm::service::Tracer::preStreamBeginLumi(), edm::service::Tracer::preStreamBeginRun(), edm::service::Tracer::preStreamEndLumi(), edm::service::Tracer::preStreamEndRun(), publishObjects(), HiTrivialConditionRetriever::setIntervalFor(), CastorHardcodeCalibrations::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), CondDBESSource::setIntervalFor(), FWLiteESSource::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), edm::service::Tracer::Tracer(), LaserSorter::writeEventHeader(), DQMRootOutputModule::writeLuminosityBlock(), and DQMRootOutputModule::writeRun().

38  {
39  TimeValue_t returnValue = timeHigh_;
40  returnValue = returnValue << 32;
41  returnValue += timeLow_;
42  return returnValue;
43  }
unsigned int timeHigh_
Definition: Timestamp.h:84
unsigned int timeLow_
Definition: Timestamp.h:83
unsigned long long TimeValue_t

Member Data Documentation

◆ kLowMask

const TimeValue_t edm::Timestamp::kLowMask = 0xFFFFFFFF
staticprivate

Definition at line 24 of file Timestamp.h.

◆ timeHigh_

unsigned int edm::Timestamp::timeHigh_
private

Definition at line 84 of file Timestamp.h.

Referenced by operator<(), operator<=(), operator==(), operator>(), operator>=(), unixTime(), and value().

◆ timeLow_

unsigned int edm::Timestamp::timeLow_
private