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
 
virtual ~Timestamp ()
 

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:101
static const TimeValue_t kLowMask(0xFFFFFFFF)
unsigned int timeLow_
Definition: Timestamp.h:100
Timestamp::Timestamp ( )

Definition at line 39 of file Timestamp.cc.

41 {
42 }
unsigned int timeHigh_
Definition: Timestamp.h:101
unsigned int timeLow_
Definition: Timestamp.h:100
static Timestamp const & invalidTimestamp()
Definition: Timestamp.cc:83
Timestamp::~Timestamp ( )
virtual

Definition at line 48 of file Timestamp.cc.

49 {
50 }

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 cond::rpcobtemp::temp.

Referenced by fwlite::IOVSyncValue::endOfTime(), edm::IOVSyncValue::endOfTime(), EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), 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
const Timestamp & Timestamp::invalidTimestamp ( )
static
unsigned int edm::Timestamp::microsecondOffset ( ) const
inline

Microseconds offset within second.

Definition at line 45 of file Timestamp.h.

References timeLow_.

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

Definition at line 56 of file Timestamp.h.

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

Definition at line 60 of file Timestamp.h.

References timeHigh_, and timeLow_.

60  {
61  if(timeHigh_ == iRHS.timeHigh_) {
62  return timeLow_ < iRHS.timeLow_;
63  }
64  return timeHigh_ < iRHS.timeHigh_;
65  }
unsigned int timeHigh_
Definition: Timestamp.h:101
unsigned int timeLow_
Definition: Timestamp.h:100
bool edm::Timestamp::operator<= ( Timestamp const &  iRHS) const
inline

Definition at line 66 of file Timestamp.h.

References timeHigh_, and timeLow_.

66  {
67  if(timeHigh_ == iRHS.timeHigh_) {
68  return timeLow_ <= iRHS.timeLow_;
69  }
70  return timeHigh_ <= iRHS.timeHigh_;
71  }
unsigned int timeHigh_
Definition: Timestamp.h:101
unsigned int timeLow_
Definition: Timestamp.h:100
bool edm::Timestamp::operator== ( Timestamp const &  iRHS) const
inline

Definition at line 52 of file Timestamp.h.

References timeHigh_, and timeLow_.

52  {
53  return timeHigh_ == iRHS.timeHigh_ &&
54  timeLow_ == iRHS.timeLow_;
55  }
unsigned int timeHigh_
Definition: Timestamp.h:101
unsigned int timeLow_
Definition: Timestamp.h:100
bool edm::Timestamp::operator> ( Timestamp const &  iRHS) const
inline

Definition at line 72 of file Timestamp.h.

References timeHigh_, and timeLow_.

72  {
73  if(timeHigh_ == iRHS.timeHigh_) {
74  return timeLow_ > iRHS.timeLow_;
75  }
76  return timeHigh_ > iRHS.timeHigh_;
77  }
unsigned int timeHigh_
Definition: Timestamp.h:101
unsigned int timeLow_
Definition: Timestamp.h:100
bool edm::Timestamp::operator>= ( Timestamp const &  iRHS) const
inline

Definition at line 78 of file Timestamp.h.

References timeHigh_, and timeLow_.

78  {
79  if(timeHigh_ == iRHS.timeHigh_) {
80  return timeLow_ >= iRHS.timeLow_;
81  }
82  return timeHigh_ >= iRHS.timeHigh_;
83  }
unsigned int timeHigh_
Definition: Timestamp.h:101
unsigned int timeLow_
Definition: Timestamp.h:100
unsigned int edm::Timestamp::unixTime ( ) const
inline

Time in seconds since January 1, 1970.

Definition at line 39 of file Timestamp.h.

References timeHigh_.

Referenced by edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor().

39  {
40  return timeHigh_;
41  }
unsigned int timeHigh_
Definition: Timestamp.h:101
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(), ZDCMonitorModule::analyze(), XmasToDQMEventInfo::analyze(), DTDigiTask::analyze(), EcalCosmicsHists::analyze(), EcnaAnalyzer::analyze(), CastorMonitorModule::analyze(), TrackerDpgAnalysis::analyze(), AlcaBeamSpotProducer::beginLuminosityBlock(), BeamSpotAnalyzer::beginLuminosityBlock(), BeamMonitor::beginLuminosityBlock(), BeamMonitorBx::beginLuminosityBlock(), Vx3DHLTAnalyzer::beginLuminosityBlock(), BeamMonitor::beginRun(), BeamMonitorBx::beginRun(), XmasToDQMEventInfo::beginRun(), python.Vispa.Views.PropertyView.FileProperty::buttonClicked(), Types.string::configValue(), Types.FileInPath::configValue(), DQMEventMsgBuilder::DQMEventMsgBuilder(), Mixins.UsingBlock::dumpPython(), AlcaBeamSpotProducer::endLuminosityBlock(), BeamSpotAnalyzer::endLuminosityBlock(), BeamMonitor::endLuminosityBlock(), PhiSymmetryCalibration::endLuminosityBlock(), BeamMonitorBx::endLuminosityBlock(), Vx3DHLTAnalyzer::endLuminosityBlock(), HLTPrescaleRecorder::endRun(), PhiSymmetryCalibration::endRun(), HLXMonitor::FillEventInfo(), HSCPTreeBuilder::filter(), cond::fromIOVSyncValue(), EcalLaserDbService::getLaserCorrection(), fireworks::getLocalTime(), popcon::RpcObGasData::getNewObjects(), popcon::RpcDataGasMix::getNewObjects(), popcon::RPCObPVSSmapData::getNewObjects(), popcon::RpcDataI::getNewObjects(), popcon::RpcDataS::getNewObjects(), popcon::RpcDataT::getNewObjects(), popcon::RpcDataFebmap::getNewObjects(), popcon::RpcDataUXC::getNewObjects(), popcon::RpcDataV::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(), python.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(), HcalHardcodeCalibrations::setIntervalFor(), HiTrivialConditionRetriever::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), ESTrivialConditionRetriever::setIntervalFor(), FWLiteESSource::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), stampToReal(), 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:101
unsigned long long TimeValue_t
Definition: Timestamp.h:27
unsigned int timeLow_
Definition: Timestamp.h:100

Member Data Documentation

unsigned int edm::Timestamp::timeHigh_
private

Definition at line 101 of file Timestamp.h.

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

unsigned int edm::Timestamp::timeLow_
private