#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 | ( | ) |
Tm::Tm | ( | struct tm * | initTm | ) |
struct tm Tm::c_tm | ( | ) | const |
uint64_t Tm::cmsNanoSeconds | ( | ) | const |
Definition at line 90 of file Tm.cc.
Referenced by popcon::EcalLaser_weekly_Handler::getNewObjects(), and popcon::EcalLaserHandler::getNewObjects().
void Tm::dumpTm | ( | ) |
|
inline |
int Tm::isNull | ( | ) | const |
uint64_t Tm::microsTime | ( | ) | const |
Definition at line 94 of file Tm.cc.
References mps_fire::result, alignCSCRings::s, and x.
Referenced by DataReducer< T >::getReducedDataList(), RunDCSMagnetDat::nowMicroseconds(), RunDCSLVDat::nowMicroseconds(), RunDCSHVDat::nowMicroseconds(), operator+=(), operator-=(), operator<(), operator<=(), RunDCSLVDat::setStatusForBarrel(), RunDCSHVDat::setStatusForBarrel(), RunDCSLVDat::setStatusForEndcaps(), and RunDCSHVDat::setStatusForEndcaps().
|
inlinestatic |
|
inline |
|
inline |
|
inline |
Definition at line 108 of file Tm.h.
References microsTime(), seconds(), and setToMicrosTime().
|
inline |
Definition at line 103 of file Tm.h.
References microsTime(), seconds(), and setToMicrosTime().
|
inline |
|
inline |
|
inline |
Definition at line 95 of file Tm.h.
References m_tm, and submitPVValidationJobs::t.
|
inlinestatic |
void Tm::setNull | ( | ) |
Definition at line 52 of file Tm.cc.
Referenced by LMFSextuple::LMFSextuple().
void Tm::setToCurrentGMTime | ( | ) |
Definition at line 139 of file Tm.cc.
References submitPVValidationJobs::t, and hcalRecHitTable_cff::time.
Referenced by LMFRunIOV::initialize(), RunDCSMagnetDat::nowMicroseconds(), RunDCSLVDat::nowMicroseconds(), RunDCSHVDat::nowMicroseconds(), and EcalPedOffset::writeDb().
void Tm::setToCurrentLocalTime | ( | ) |
Definition at line 134 of file Tm.cc.
References submitPVValidationJobs::t, and hcalRecHitTable_cff::time.
void Tm::setToGMTime | ( | time_t | t | ) |
void Tm::setToLocalTime | ( | time_t | t | ) |
void Tm::setToMicrosTime | ( | uint64_t | micros | ) |
Definition at line 126 of file Tm.cc.
References submitPVValidationJobs::t.
Referenced by operator+=(), and operator-=().
|
noexcept |
Definition at line 148 of file Tm.cc.
References MillePedeFileConverter_cfg::e, mps_check::msg, and alignCSCRings::s.
Referenced by LMFCorrCoefDat::fetchBetween(), RunDCSHVDat::fillTheMapByTime(), and LMFLmrSubIOV::getIOVIDsLaterThan().
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 64 of file Tm.cc.
References c_tm(), setToGMTime(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by LMFSeqDat::fetchByRunNumber(), RunDCSHVDat::fillTheMapByTime(), LMFRunIOV::initialize(), EcalTPGDBApp::printIOV(), and LMFRunIOV::setSubRunEnd().
|
friend |
|
private |
Definition at line 122 of file Tm.h.
Referenced by operator==().
|
staticprivate |
Definition at line 14 of file Tm.h.
Referenced by negInfinity().
|
staticprivate |
Definition at line 16 of file Tm.h.
Referenced by plusInfinity().