#include <Tm.h>
Public Member Functions | |
struct tm | c_tm () const |
uint64_t | cmsNanoSeconds () const |
void | dumpTm () |
uint64_t | epoch () const |
int | isNull () const |
uint64_t | microsTime () const |
bool | operator!= (const Tm &t) const |
const Tm | operator+ (int seconds) |
Tm & | operator+= (int seconds) |
Tm & | operator-= (int seconds) |
bool | operator< (const Tm &t) const |
bool | operator<= (const Tm &t) const |
bool | operator== (const Tm &t) const |
void | setNull () |
void | setToCmsNanoTime (uint64_t nanos) |
void | setToCurrentGMTime () |
void | setToCurrentLocalTime () |
void | setToGMTime (time_t t) |
void | setToLocalTime (time_t t) |
void | setToMicrosTime (uint64_t micros) |
void | setToString (const std::string s) noexcept(false) |
std::string | str () const |
Tm () | |
Tm (struct tm *initTm) | |
Tm (uint64_t micros) | |
uint64_t | unixTime () const |
virtual | ~Tm () |
Static Public Member Functions | |
static Tm | negInfinity () |
static Tm | plusInfinity () |
Private Attributes | |
struct tm | m_tm |
Static Private Attributes | |
static const uint64_t | NEG_INF_MICROS = 0 |
static const uint64_t | PLUS_INF_MICROS = (uint64_t)INT_MAX * 1000000 |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Tm &t) |
Tm::Tm | ( | ) |
Definition at line 24 of file Tm.cc.
Referenced by negInfinity(), and plusInfinity().
Tm::Tm | ( | struct tm * | initTm | ) |
struct tm Tm::c_tm | ( | ) | const |
uint64_t Tm::cmsNanoSeconds | ( | ) | const |
Definition at line 116 of file Tm.cc.
Referenced by epoch(), popcon::EcalLaser_weekly_Handler::getNewObjects(), and popcon::EcalLaserHandler::getNewObjects().
void Tm::dumpTm | ( | ) |
|
inline |
Definition at line 66 of file Tm.h.
References cmsNanoSeconds(), dumpTm(), microsTime(), noexcept, alignCSCRings::s, setToCmsNanoTime(), setToCurrentGMTime(), setToCurrentLocalTime(), setToGMTime(), setToLocalTime(), setToMicrosTime(), setToString(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, and unixTime().
int Tm::isNull | ( | ) | const |
uint64_t Tm::microsTime | ( | ) | const |
Definition at line 126 of file Tm.cc.
References mps_fire::result, alignCSCRings::s, and x.
Referenced by epoch(), popcon::EcalLaserHandler::getNewObjects(), DataReducer< T >::getReducedDataList(), RunDCSMagnetDat::nowMicroseconds(), RunDCSLVDat::nowMicroseconds(), RunDCSHVDat::nowMicroseconds(), operator+=(), operator-=(), DataReducer< T >::MyData< U >::operator<(), operator<(), operator<=(), RunDCSHVDat::setStatusForBarrel(), RunDCSLVDat::setStatusForBarrel(), RunDCSLVDat::setStatusForEndcaps(), and RunDCSHVDat::setStatusForEndcaps().
|
inlinestatic |
Definition at line 52 of file Tm.h.
References str(), AlCaHLTBitMon_QueryRunRegistry::string, Tm(), and unixTime().
|
inline |
|
inline |
Definition at line 133 of file Tm.h.
References operator<<, MillePedeFileConverter_cfg::out, and seconds().
|
inline |
Definition at line 128 of file Tm.h.
References microsTime(), and setToMicrosTime().
|
inline |
Definition at line 123 of file Tm.h.
References microsTime(), and setToMicrosTime().
|
inline |
|
inline |
|
inline |
|
inlinestatic |
void Tm::setNull | ( | ) |
Definition at line 74 of file Tm.cc.
Referenced by LMFSextuple::LMFSextuple().
void Tm::setToCmsNanoTime | ( | uint64_t | nanos | ) |
void Tm::setToCurrentGMTime | ( | ) |
Definition at line 177 of file Tm.cc.
References NULL, lumiQTWidget::t, and ntuplemaker::time.
Referenced by epoch(), LMFRunIOV::initialize(), RunDCSMagnetDat::nowMicroseconds(), RunDCSLVDat::nowMicroseconds(), RunDCSHVDat::nowMicroseconds(), and EcalPedOffset::writeDb().
void Tm::setToCurrentLocalTime | ( | ) |
Definition at line 171 of file Tm.cc.
References NULL, lumiQTWidget::t, and ntuplemaker::time.
Referenced by epoch(), and popcon::EcalLaserHandler::getNewObjects().
void Tm::setToGMTime | ( | time_t | t | ) |
void Tm::setToMicrosTime | ( | uint64_t | micros | ) |
Definition at line 162 of file Tm.cc.
References lumiQTWidget::t.
Referenced by epoch(), operator+=(), and operator-=().
|
noexcept |
Definition at line 193 of file Tm.cc.
References MillePedeFileConverter_cfg::e, mps_alisetup::msg, and alignCSCRings::s.
Referenced by epoch(), LMFCorrCoefDat::fetchAfter(), LMFCorrCoefDat::fetchBetween(), RunDCSHVDat::fillTheMapByTime(), LMFRunIOV::getDBInsertionTime(), LMFLmrSubIOV::getIOVIDsLaterThan(), popcon::EcalLaserHandler::getNewObjects(), LMFLmrSubIOV::getParameters(), LMFSeqDat::getSequenceStart(), LMFSeqDat::getSequenceStop(), LMFRunIOV::getSubRunEnd(), and LMFRunIOV::getSubRunStart().
string Tm::str | ( | ) | const |
"One hour shif" fix Create a temporary dummy object that is in GMT and use it to generate the output. This is to avoid the "one hour shift" related to the Summer time and the value of m_tm.tm_isdst, see [1]. It guaranties that the output is always in GMT / UTC. [1] https://hypernews.cern.ch/HyperNews/CMS/get/ecalDB/66.html
Definition at line 89 of file Tm.cc.
References c_tm(), setToGMTime(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by LMFCorrCoefDat::fetchBetween(), LMFSeqDat::fetchByRunNumber(), RunDCSHVDat::fillTheMapByTime(), LMFCorrCoefDat::getCorrections(), popcon::EcalLaserHandler::getNewObjects(), LMFRunIOV::getParameters(), LMFSeqDat::getParameters(), DataReducer< T >::getReducedDataList(), LMFRunIOV::initialize(), LMFSeqDat::LMFSeqDat(), negInfinity(), operator<<(), EcalTPGDBApp::printIOV(), LMFUnique::sequencePostfix(), LMFSeqDat::setSequenceStart(), LMFSeqDat::setSequenceStop(), LMFRunIOV::setSubRunEnd(), and LMFRunIOV::setSubRunStart().
uint64_t Tm::unixTime | ( | ) | const |
|
friend |
GO: the maximum UNIX time is restricted to INT_MAX, corresponding to 2038-01-19 03:14:07. Take it into account in str()
Definition at line 18 of file Tm.cc.
Referenced by operator+().
|
private |
Definition at line 142 of file Tm.h.
Referenced by operator==().