CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | 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 const & beginOfTime ()
 
static Timestamp const & endOfTime ()
 
static Timestamp const & invalidTimestamp ()
 

Private Attributes

unsigned int timeHigh_
 
unsigned int timeLow_
 

Detailed Description

Definition at line 29 of file Timestamp.h.

Constructor & Destructor Documentation

Timestamp::Timestamp ( TimeValue_t  iValue)
explicit

Definition at line 33 of file Timestamp.cc.

33  :
34  timeLow_(static_cast<unsigned int>(kLowMask & iValue)),
35  timeHigh_(static_cast<unsigned int>(iValue >> 32))
36 {
37 }
unsigned int timeHigh_
Definition: Timestamp.h:99
static const TimeValue_t kLowMask(0xFFFFFFFF)
unsigned int timeLow_
Definition: Timestamp.h:98
Timestamp::Timestamp ( )

Definition at line 39 of file Timestamp.cc.

41 {
42 }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
static Timestamp const & invalidTimestamp()
Definition: Timestamp.cc:83

Member Function Documentation

const Timestamp & Timestamp::beginOfTime ( )
static

Definition at line 96 of file Timestamp.cc.

Referenced by fwlite::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::beginOfTime(), edm::DaqSource::DaqSource(), and edm::RawInputSource::RawInputSource().

96  {
97  static Timestamp s_beginOfTime(1);
98  return s_beginOfTime;
99 }
const Timestamp & Timestamp::endOfTime ( )
static

Definition at line 88 of file Timestamp.cc.

References groupFilesInBlocks::temp.

Referenced by fwlite::IOVSyncValue::endOfTime(), edm::IOVSyncValue::endOfTime(), EcalTestDevDB::generateEcalLinearCorrections(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), EcalTrivialConditionRetriever::produceEcalLinearCorrections(), and publishObjects().

88  {
89  //calculate 2^N -1 where N is number of bits in TimeValue_t
90  // by doing 2^(N-1) - 1 + 2^(N-1)
91  const TimeValue_t temp = TimeValue_t(1) << (sizeof(TimeValue_t)/sizeof(char) * 8 - 1);
92  static Timestamp s_endOfTime((temp -1) + temp);
93  return s_endOfTime;
94 }
unsigned long long TimeValue_t
Definition: Timestamp.h:27
unsigned long long TimeValue_t
const Timestamp & Timestamp::invalidTimestamp ( )
static
unsigned int edm::Timestamp::microsecondOffset ( ) const
inline

Microseconds offset within second.

Definition at line 43 of file Timestamp.h.

References timeLow_.

43  {
44  return timeLow_;
45  }
unsigned int timeLow_
Definition: Timestamp.h:98
bool edm::Timestamp::operator!= ( Timestamp const &  iRHS) const
inline

Definition at line 54 of file Timestamp.h.

54  {
55  return !(*this == iRHS);
56  }
bool edm::Timestamp::operator< ( Timestamp const &  iRHS) const
inline

Definition at line 58 of file Timestamp.h.

References timeHigh_, and timeLow_.

58  {
59  if(timeHigh_ == iRHS.timeHigh_) {
60  return timeLow_ < iRHS.timeLow_;
61  }
62  return timeHigh_ < iRHS.timeHigh_;
63  }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
bool edm::Timestamp::operator<= ( Timestamp const &  iRHS) const
inline

Definition at line 64 of file Timestamp.h.

References timeHigh_, and timeLow_.

64  {
65  if(timeHigh_ == iRHS.timeHigh_) {
66  return timeLow_ <= iRHS.timeLow_;
67  }
68  return timeHigh_ <= iRHS.timeHigh_;
69  }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
bool edm::Timestamp::operator== ( Timestamp const &  iRHS) const
inline

Definition at line 50 of file Timestamp.h.

References timeHigh_, and timeLow_.

50  {
51  return timeHigh_ == iRHS.timeHigh_ &&
52  timeLow_ == iRHS.timeLow_;
53  }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
bool edm::Timestamp::operator> ( Timestamp const &  iRHS) const
inline

Definition at line 70 of file Timestamp.h.

References timeHigh_, and timeLow_.

70  {
71  if(timeHigh_ == iRHS.timeHigh_) {
72  return timeLow_ > iRHS.timeLow_;
73  }
74  return timeHigh_ > iRHS.timeHigh_;
75  }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
bool edm::Timestamp::operator>= ( Timestamp const &  iRHS) const
inline

Definition at line 76 of file Timestamp.h.

References timeHigh_, and timeLow_.

76  {
77  if(timeHigh_ == iRHS.timeHigh_) {
78  return timeLow_ >= iRHS.timeLow_;
79  }
80  return timeHigh_ >= iRHS.timeHigh_;
81  }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
unsigned int edm::Timestamp::unixTime ( ) const
inline

Time in seconds since January 1, 1970.

Definition at line 37 of file Timestamp.h.

References timeHigh_.

Referenced by edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), and ESTrendTask::updateTime().

37  {
38  return timeHigh_;
39  }
unsigned int timeHigh_
Definition: Timestamp.h:99
TimeValue_t Timestamp::value ( ) const

Definition at line 72 of file Timestamp.cc.

References timeHigh_, and timeLow_.

Referenced by SiStripGainFromData::algoAnalyze(), SiStripHitEffFromCalibTree::algoAnalyze(), EcalStatusAnalyzer::analyze(), evf::EvFRecordUnpacker::analyze(), SiPixelHistoricInfoEDAClient::analyze(), SiStripQualityStatistics::analyze(), ZDCMonitorClient::analyze(), EcalGetLaserData::analyze(), DTNoiseCalibration::analyze(), ZDCMonitorModule::analyze(), XmasToDQMEventInfo::analyze(), DTDigiTask::analyze(), EcalCosmicsHists::analyze(), CastorMonitorModule::analyze(), TrackerDpgAnalysis::analyze(), EcnaAnalyzer::analyze(), AlcaBeamSpotProducer::beginLuminosityBlock(), BeamSpotAnalyzer::beginLuminosityBlock(), BeamMonitor::beginLuminosityBlock(), BeamMonitorBx::beginLuminosityBlock(), Vx3DHLTAnalyzer::beginLuminosityBlock(), BeamMonitor::beginRun(), DTNoiseCalibration::beginRun(), BeamMonitorBx::beginRun(), XmasToDQMEventInfo::beginRun(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), Types.string::configValue(), Types.FileInPath::configValue(), DQMEventMsgBuilder::DQMEventMsgBuilder(), Mixins.UsingBlock::dumpPython(), BeamSpotAnalyzer::endLuminosityBlock(), BeamMonitor::endLuminosityBlock(), PhiSymmetryCalibration::endLuminosityBlock(), BeamMonitorBx::endLuminosityBlock(), Vx3DHLTAnalyzer::endLuminosityBlock(), AlcaBeamSpotProducer::endLuminosityBlockProduce(), PhiSymmetryCalibration::endRun(), HLTPrescaleRecorder::endRun(), HLXMonitor::FillEventInfo(), HSCPTreeBuilder::filter(), cond::fromIOVSyncValue(), EcalLaserDbService::getLaserCorrection(), fireworks::getLocalTime(), popcon::RpcDataI::getNewObjects(), popcon::RpcDataS::getNewObjects(), popcon::RpcDataT::getNewObjects(), popcon::RpcDataUXC::getNewObjects(), popcon::RpcDataV::getNewObjects(), popcon::RpcDataFebmap::getNewObjects(), popcon::RpcDataGasMix::getNewObjects(), popcon::RpcObGasData::getNewObjects(), popcon::RPCObPVSSmapData::getNewObjects(), popcon::EcalLaser_weekly_Handler::getNewObjects(), popcon::EcalLaserHandler::getNewObjects(), fireworks::getTimeGMT(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Mixins.UsingBlock::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(), Vispa.Views.PropertyView.FileProperty::labelDoubleClicked(), edm::service::Tracer::preBeginLumi(), edm::service::Tracer::preBeginRun(), edm::service::Tracer::preEndLumi(), edm::service::Tracer::preEndRun(), edm::service::Tracer::preEvent(), cond::service::PoolDBOutputService::preEventProcessing(), edm::PrintEventSetupContent::print(), L1GlobalTrigger::produce(), publishObjects(), BeamFitter::readEvent(), CastorHardcodeCalibrations::setIntervalFor(), CondDBESSource::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), HcalHardcodeCalibrations::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), FWLiteESSource::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), stampToReal(), cond::PayLoadInspector< DataT >::summary(), RPCRunIOV::toDAQ(), edm::AsciiOutputModule::write(), LaserSorter::writeEventHeader(), DQMRootOutputModule::writeLuminosityBlock(), and DQMRootOutputModule::writeRun().

72  {
73  TimeValue_t returnValue = timeHigh_;
74  returnValue = returnValue << 32;
75  returnValue += timeLow_;
76  return returnValue;
77 }
unsigned int timeHigh_
Definition: Timestamp.h:99
unsigned int timeLow_
Definition: Timestamp.h:98
unsigned long long TimeValue_t

Member Data Documentation

unsigned int edm::Timestamp::timeHigh_
private

Definition at line 99 of file Timestamp.h.

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

unsigned int edm::Timestamp::timeLow_
private