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 ()
 
 Timestamp (TimeValue_t iValue)
 
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 30 of file Timestamp.h.

Constructor & Destructor Documentation

◆ Timestamp() [1/2]

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

Definition at line 34 of file Timestamp.h.

35  : timeLow_(static_cast<unsigned int>(kLowMask & iValue)), timeHigh_(static_cast<unsigned int>(iValue >> 32)) {}

◆ Timestamp() [2/2]

edm::Timestamp::Timestamp ( )
inline

Member Function Documentation

◆ beginOfTime()

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

◆ endOfTime()

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

◆ invalidTimestamp()

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

◆ microsecondOffset()

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

Microseconds offset within second.

Definition at line 43 of file Timestamp.h.

43 { return timeLow_; }

References timeLow_.

Referenced by edm::operator<<().

◆ operator!=()

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

Definition at line 54 of file Timestamp.h.

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

◆ operator<()

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

Definition at line 56 of file Timestamp.h.

56  {
57  if (timeHigh_ == iRHS.timeHigh_) {
58  return timeLow_ < iRHS.timeLow_;
59  }
60  return timeHigh_ < iRHS.timeHigh_;
61  }

References timeHigh_, and timeLow_.

◆ operator<=()

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

Definition at line 62 of file Timestamp.h.

62  {
63  if (timeHigh_ == iRHS.timeHigh_) {
64  return timeLow_ <= iRHS.timeLow_;
65  }
66  return timeHigh_ <= iRHS.timeHigh_;
67  }

References timeHigh_, and timeLow_.

◆ operator==()

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

Definition at line 53 of file Timestamp.h.

53 { return timeHigh_ == iRHS.timeHigh_ && timeLow_ == iRHS.timeLow_; }

References timeHigh_, and timeLow_.

◆ operator>()

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

Definition at line 68 of file Timestamp.h.

68  {
69  if (timeHigh_ == iRHS.timeHigh_) {
70  return timeLow_ > iRHS.timeLow_;
71  }
72  return timeHigh_ > iRHS.timeHigh_;
73  }

References timeHigh_, and timeLow_.

◆ operator>=()

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

Definition at line 74 of file Timestamp.h.

74  {
75  if (timeHigh_ == iRHS.timeHigh_) {
76  return timeLow_ >= iRHS.timeLow_;
77  }
78  return timeHigh_ >= iRHS.timeHigh_;
79  }

References timeHigh_, and timeLow_.

◆ unixTime()

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

Time in seconds since January 1, 1970.

Definition at line 40 of file Timestamp.h.

40 { return timeHigh_; }

References timeHigh_.

Referenced by edm::operator<<(), operator<<(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), and CTPPSRPAlignmentCorrectionsDataESSourceXML::setIntervalFor().

◆ value()

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

Definition at line 45 of file Timestamp.h.

45  {
46  TimeValue_t returnValue = timeHigh_;
47  returnValue = returnValue << 32;
48  returnValue += timeLow_;
49  return returnValue;
50  }

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(), AlcaBeamSpotProducer::beginLuminosityBlock(), BeamSpotAnalyzer::beginLuminosityBlock(), BeamMonitor::beginLuminosityBlock(), BeamMonitorBx::beginLuminosityBlock(), BeamMonitor::bookHistograms(), Types.string::configValue(), Types.FileInPath::configValue(), Vx3DHLTAnalyzer::dqmBeginLuminosityBlock(), Vx3DHLTAnalyzer::dqmEndLuminosityBlock(), Mixins.UsingBlock::dumpPython(), BeamSpotAnalyzer::endLuminosityBlock(), PhiSymmetryCalibration::endLuminosityBlock(), BeamMonitor::endLuminosityBlock(), BeamMonitorBx::endLuminosityBlock(), AlcaBeamSpotProducer::endLuminosityBlockProduce(), HLTPrescaleRecorder::endRun(), EcalLaserDbService::getLaserCorrection(), popcon::RpcDataGasMix::getNewObjects(), popcon::RpcObGasData::getNewObjects(), popcon::RPCObPVSSmapData::getNewObjects(), popcon::RpcDataI::getNewObjects(), popcon::RpcDataT::getNewObjects(), popcon::RpcDataS::getNewObjects(), popcon::RpcDataUXC::getNewObjects(), popcon::RpcDataV::getNewObjects(), popcon::RpcDataFebmap::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(), CastorHardcodeCalibrations::setIntervalFor(), HiTrivialConditionRetriever::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().

Member Data Documentation

◆ kLowMask

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

Definition at line 31 of file Timestamp.h.

◆ timeHigh_

unsigned int edm::Timestamp::timeHigh_
private

Definition at line 97 of file Timestamp.h.

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

◆ timeLow_

unsigned int edm::Timestamp::timeLow_
private
TimeValue_t
unsigned long long TimeValue_t
Definition: EcalHitResponse.h:15
edm::Timestamp::timeLow_
unsigned int timeLow_
Definition: Timestamp.h:96
edm::Timestamp::Timestamp
Timestamp()
Definition: Timestamp.h:37
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
edm::Timestamp::kLowMask
static const TimeValue_t kLowMask
Definition: Timestamp.h:31
edm::Timestamp::invalidTimestamp
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
edm::Timestamp::timeHigh_
unsigned int timeHigh_
Definition: Timestamp.h:97