CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

edm::Timestamp Class Reference

#include <Timestamp.h>

List of all members.

Public Member Functions

unsigned int microsecondOffset () const
 Microseconds offset within second.
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.
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.

                                       : 
   timeLow_(static_cast<unsigned int>(kLowMask & iValue)),
   timeHigh_(static_cast<unsigned int>(iValue >> 32))
{
}
Timestamp::Timestamp ( )
Timestamp::~Timestamp ( ) [virtual]

Definition at line 48 of file Timestamp.cc.

{
}

Member Function Documentation

const Timestamp & Timestamp::beginOfTime ( ) [static]

Definition at line 96 of file Timestamp.cc.

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

                       {
   static Timestamp s_beginOfTime(1);
   return s_beginOfTime;
}
const Timestamp & Timestamp::endOfTime ( ) [static]

Definition at line 88 of file Timestamp.cc.

References cond::rpcobtemp::temp.

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

                     {
   //calculate 2^N -1 where N is number of bits in TimeValue_t
   // by doing 2^(N-1) - 1 + 2^(N-1)
   const TimeValue_t temp = TimeValue_t(1) << (sizeof(TimeValue_t)/sizeof(char) * 8 - 1);
   static Timestamp s_endOfTime((temp -1) + temp);
   return s_endOfTime;
}
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_.

                                {
        return timeLow_;
      }
bool edm::Timestamp::operator!= ( Timestamp const &  iRHS) const [inline]

Definition at line 56 of file Timestamp.h.

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

Definition at line 60 of file Timestamp.h.

References timeHigh_, and timeLow_.

                                                  {
         if(timeHigh_ == iRHS.timeHigh_) {
            return timeLow_ < iRHS.timeLow_;
         }
         return timeHigh_ < iRHS.timeHigh_;
      }
bool edm::Timestamp::operator<= ( Timestamp const &  iRHS) const [inline]

Definition at line 66 of file Timestamp.h.

References timeHigh_, and timeLow_.

                                                   {
         if(timeHigh_ == iRHS.timeHigh_) {
            return timeLow_ <= iRHS.timeLow_;
         }
         return timeHigh_ <= iRHS.timeHigh_;
      }
bool edm::Timestamp::operator== ( Timestamp const &  iRHS) const [inline]

Definition at line 52 of file Timestamp.h.

References timeHigh_, and timeLow_.

                                                   {
         return timeHigh_ == iRHS.timeHigh_ &&
         timeLow_ == iRHS.timeLow_;
      }
bool edm::Timestamp::operator> ( Timestamp const &  iRHS) const [inline]

Definition at line 72 of file Timestamp.h.

References timeHigh_, and timeLow_.

                                                  {
         if(timeHigh_ == iRHS.timeHigh_) {
            return timeLow_ > iRHS.timeLow_;
         }
         return timeHigh_ > iRHS.timeHigh_;
      }
bool edm::Timestamp::operator>= ( Timestamp const &  iRHS) const [inline]

Definition at line 78 of file Timestamp.h.

References timeHigh_, and timeLow_.

                                                   {
         if(timeHigh_ == iRHS.timeHigh_) {
            return timeLow_ >= iRHS.timeLow_;
         }
         return timeHigh_ >= iRHS.timeHigh_;
      }
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(), and ESTrendTask::updateTime().

                       {
        return timeHigh_;
      }
TimeValue_t Timestamp::value ( ) const

Definition at line 72 of file Timestamp.cc.

References timeHigh_, and timeLow_.

Referenced by SiStripHitEffFromCalibTree::algoAnalyze(), SiStripGainFromData::algoAnalyze(), evf::EvFRecordUnpacker::analyze(), XmasToDQMEventInfo::analyze(), TrackerDpgAnalysis::analyze(), SiStripQualityStatistics::analyze(), EcnaAnalyzer::analyze(), SiPixelHistoricInfoEDAClient::analyze(), EcalCosmicsHists::analyze(), EcalGetLaserData::analyze(), EcalStatusAnalyzer::analyze(), ZDCMonitorModule::analyze(), ZDCMonitorClient::analyze(), DTDigiTask::analyze(), CastorMonitorModule::analyze(), BeamMonitor::beginLuminosityBlock(), Vx3DHLTAnalyzer::beginLuminosityBlock(), BeamMonitorBx::beginLuminosityBlock(), BeamMonitorBx::beginRun(), BeamMonitor::beginRun(), XmasToDQMEventInfo::beginRun(), DQMEventMsgBuilder::DQMEventMsgBuilder(), BeamMonitorBx::endLuminosityBlock(), PhiSymmetryCalibration::endLuminosityBlock(), BeamMonitor::endLuminosityBlock(), Vx3DHLTAnalyzer::endLuminosityBlock(), PhiSymmetryCalibration::endRun(), HLTPrescaleRecorder::endRun(), HLXMonitor::FillEventInfo(), HSCPTreeBuilder::filter(), EcalLaserDbService::getLaserCorrection(), fireworks::getLocalTime(), popcon::EcalLaserHandler::getNewObjects(), popcon::RpcDataT::getNewObjects(), popcon::RpcDataS::getNewObjects(), popcon::RpcDataUXC::getNewObjects(), popcon::RpcObGasData::getNewObjects(), popcon::RpcDataFebmap::getNewObjects(), popcon::RpcDataV::getNewObjects(), popcon::RPCObPVSSmapData::getNewObjects(), popcon::RpcDataI::getNewObjects(), popcon::RpcDataGasMix::getNewObjects(), fireworks::getTimeGMT(), 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(), BeamFitter::readEvent(), ESTrivialConditionRetriever::setIntervalFor(), EcalTrivialConditionRetriever::setIntervalFor(), edm::eventsetup::DependentRecordIntervalFinder::setIntervalFor(), stampToReal(), RPCRunIOV::toDAQ(), edm::AsciiOutputModule::write(), and LaserSorter::writeEventHeader().

                       {
   TimeValue_t returnValue = timeHigh_;
   returnValue = returnValue << 32;
   returnValue += timeLow_;
   return returnValue;
}

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]