CMS 3D CMS Logo

HCAL_HLX::TimeStamp Class Reference

#include <RecoLuminosity/TCPReceiver/interface/TimeStamp.h>

Inheritance diagram for HCAL_HLX::TimeStamp:

HCAL_HLX::HTMLGenerator HCAL_HLX::ROOTFileBase HCAL_HLX::ROOTFileMerger HCAL_HLX::ROOTSchema

List of all members.

Public Member Functions

std::string TimeStampLong ()
std::string TimeStampYYYYMM ()
std::string TimeStampYYYYMMDD ()


Detailed Description

Definition at line 8 of file TimeStamp.h.


Member Function Documentation

std::string HCAL_HLX::TimeStamp::TimeStampLong (  ) 

Definition at line 6 of file TimeStamp.cc.

Referenced by HCAL_HLX::HTMLGenerator::GenerateIndexPage(), and HCAL_HLX::HTMLGenerator::GenerateRunPage().

00006                                           {
00007 
00008   time_t rawtime;
00009   time(&rawtime);
00010 
00011   return ctime(&rawtime);
00012 }

std::string HCAL_HLX::TimeStamp::TimeStampYYYYMM (  ) 

Definition at line 31 of file TimeStamp.cc.

References NULL, and out.

Referenced by HCAL_HLX::ROOTFileMerger::CreateInputFileName(), HCAL_HLX::ROOTFileBase::CreateLSFileName(), and HCAL_HLX::ROOTFileBase::CreateRunFileName().

00031                                             {
00032 
00033   time_t rawtime;
00034   struct tm* timeinfo;
00035 
00036   rawtime = time(NULL);
00037   timeinfo = localtime(&rawtime);
00038 
00039   std::ostringstream out;
00040   out.str(std::string());
00041   out << std::setfill('0') << std::setw(4) << timeinfo->tm_year + 1900;
00042   out << std::setfill('0') << std::setw(2) << timeinfo->tm_mon + 1;
00043 
00044   return out.str();
00045 }

std::string HCAL_HLX::TimeStamp::TimeStampYYYYMMDD (  ) 

Definition at line 14 of file TimeStamp.cc.

References NULL, and out.

Referenced by HCAL_HLX::ROOTFileMerger::CreateInputFileName(), HCAL_HLX::ROOTFileBase::CreateLSFileName(), and HCAL_HLX::ROOTFileBase::CreateRunFileName().

00014                                               {
00015 
00016   time_t rawtime;
00017   struct tm* timeinfo;
00018 
00019   rawtime = time(NULL);
00020   timeinfo = localtime(&rawtime);
00021 
00022   std::ostringstream out;
00023   out.str(std::string());
00024   out << std::setfill('0') << std::setw(4) << timeinfo->tm_year + 1900;
00025   out << std::setfill('0') << std::setw(2) << timeinfo->tm_mon + 1;
00026   out << std::setfill('0') << std::setw(2) << timeinfo->tm_mday;
00027 
00028   return out.str();
00029 }


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