CMS 3D CMS Logo

DateHandler Class Reference

#include <OnlineDB/EcalCondDB/interface/DateHandler.h>

List of all members.

Public Member Functions

 DateHandler (oracle::occi::Environment *env, oracle::occi::Connection *conn)
Tm dateToTm (oracle::occi::Date &date) const
 Translate an oracle Date object to a Tm object.
oracle::occi::Date getCurrentDate ()
 Get the current system date.
oracle::occi::Date getNegInfDate () const
Tm getNegInfTm () const
oracle::occi::Date getPlusInfDate () const
Tm getPlusInfTm () const
oracle::occi::Date maxDate ()
 The maximum oracle Date.
oracle::occi::Date minDate ()
 The minimum oracle Date.
oracle::occi::Date tmToDate (const Tm &inTm) const
 Translate a Tm object to a oracle Date object.
 ~DateHandler ()

Private Member Functions

 DateHandler ()

Private Attributes

oracle::occi::Connection * m_conn
oracle::occi::Environment * m_env
Tm NEG_INF
oracle::occi::Date NEG_INF_DATE
Tm PLUS_INF
oracle::occi::Date PLUS_INF_DATE


Detailed Description

Definition at line 8 of file DateHandler.h.


Constructor & Destructor Documentation

DateHandler::DateHandler ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn 
)

DateHandler::~DateHandler (  ) 

Definition at line 18 of file DateHandler.cc.

00018 {}

DateHandler::DateHandler (  )  [private]


Member Function Documentation

Tm DateHandler::dateToTm ( oracle::occi::Date &  date  )  const

Translate an oracle Date object to a Tm object.

Referenced by ODCond2ConfInfo::fetchData(), FEConfigLUTInfo::fetchData(), FEConfigLinInfo::fetchData(), FEConfigPedInfo::fetchData(), FEConfigSlidingInfo::fetchData(), FEConfigWeightInfo::fetchData(), FEConfigFgrInfo::fetchData(), FEConfigWeightInfo::fetchLastData(), FEConfigSlidingInfo::fetchLastData(), FEConfigFgrInfo::fetchLastData(), FEConfigLUTInfo::fetchLastData(), FEConfigPedInfo::fetchLastData(), FEConfigLinInfo::fetchLastData(), MonRunList::fetchLastNRuns(), LMFRunList::fetchLastNRuns(), MonRunList::fetchRuns(), RunList::fetchRuns(), LMFRunList::fetchRuns(), DCSPTMTempList::fetchValuesForECID(), DCSPTMTempList::fetchValuesForECIDAndTime(), FEConfigPedInfo::setByID(), FEConfigLUTInfo::setByID(), RunIOV::setByID(), FEConfigSlidingInfo::setByID(), LMFRunIOV::setByID(), MonRunIOV::setByID(), ODRunConfigInfo::setByID(), FEConfigLinInfo::setByID(), FEConfigWeightInfo::setByID(), CaliIOV::setByID(), DCUIOV::setByID(), FEConfigFgrInfo::setByID(), RunIOV::setByRecentData(), RunIOV::setByRun(), LMFRunIOV::setByRun(), MonRunIOV::setByRun(), CaliIOV::setByTm(), and DCUIOV::setByTm().

oracle::occi::Date DateHandler::getCurrentDate (  )  [inline]

Get the current system date.

Definition at line 22 of file DateHandler.h.

References m_env.

00023     {
00024       return oracle::occi::Date(oracle::occi::Date::getSystemDate(m_env));
00025     }

oracle::occi::Date DateHandler::getNegInfDate (  )  const [inline]

Definition at line 16 of file DateHandler.h.

References NEG_INF_DATE.

00016 { return NEG_INF_DATE; }

Tm DateHandler::getNegInfTm (  )  const [inline]

Definition at line 14 of file DateHandler.h.

References NEG_INF.

00014 { return NEG_INF; }

oracle::occi::Date DateHandler::getPlusInfDate (  )  const [inline]

Definition at line 17 of file DateHandler.h.

References PLUS_INF_DATE.

00017 { return PLUS_INF_DATE; }

Tm DateHandler::getPlusInfTm (  )  const [inline]

Definition at line 15 of file DateHandler.h.

References PLUS_INF.

Referenced by CaliIOV::fetchID(), RunIOV::fetchID(), LMFRunIOV::fetchID(), DCUIOV::fetchID(), MonRunIOV::fetchID(), RunIOV::updateEndTimeDB(), DCUIOV::writeDB(), RunIOV::writeDB(), CaliIOV::writeDB(), LMFRunIOV::writeDB(), and MonRunIOV::writeDB().

00015 { return PLUS_INF; }

oracle::occi::Date DateHandler::maxDate (  )  [inline]

The maximum oracle Date.

Definition at line 38 of file DateHandler.h.

References m_env.

00039     {
00040       return oracle::occi::Date(m_env, 9999, 12, 31, 23, 59, 59);
00041     }

oracle::occi::Date DateHandler::minDate (  )  [inline]

The minimum oracle Date.

Definition at line 30 of file DateHandler.h.

References m_env.

00031     { 
00032       return oracle::occi::Date(m_env, 1970, 1, 1, 0, 0, 0); 
00033     }

Date DateHandler::tmToDate ( const Tm inTm  )  const

Translate a Tm object to a oracle Date object.

Definition at line 20 of file DateHandler.cc.

References Tm::c_tm(), Tm::isNull(), and m_env.

Referenced by CaliIOV::fetchID(), RunIOV::fetchID(), LMFRunIOV::fetchID(), DCUIOV::fetchID(), MonRunIOV::fetchID(), DCSPTMTempList::fetchValuesForECIDAndTime(), CaliIOV::setByTm(), DCUIOV::setByTm(), RunIOV::updateEndTimeDB(), DCUIOV::writeDB(), RunIOV::writeDB(), CaliIOV::writeDB(), LMFRunIOV::writeDB(), ODCond2ConfInfo::writeDB(), and MonRunIOV::writeDB().

00021 {
00022   if (inTm.isNull()) {
00023     return Date();
00024   } else {
00025     struct tm ctm = inTm.c_tm();
00026     return Date(m_env, ctm.tm_year + 1900, ctm.tm_mon + 1, ctm.tm_mday, 
00027                 ctm.tm_hour, ctm.tm_min, ctm.tm_sec);
00028   }
00029 }


Member Data Documentation

oracle::occi::Connection* DateHandler::m_conn [private]

Definition at line 55 of file DateHandler.h.

oracle::occi::Environment* DateHandler::m_env [private]

Definition at line 56 of file DateHandler.h.

Referenced by getCurrentDate(), maxDate(), minDate(), and tmToDate().

Tm DateHandler::NEG_INF [private]

Definition at line 59 of file DateHandler.h.

Referenced by getNegInfTm().

oracle::occi::Date DateHandler::NEG_INF_DATE [private]

Definition at line 61 of file DateHandler.h.

Referenced by getNegInfDate().

Tm DateHandler::PLUS_INF [private]

Definition at line 58 of file DateHandler.h.

Referenced by getPlusInfTm().

oracle::occi::Date DateHandler::PLUS_INF_DATE [private]

Definition at line 60 of file DateHandler.h.

Referenced by getPlusInfDate().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:40 2009 for CMSSW by  doxygen 1.5.4