CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/CalibCalorimetry/EcalLaserSorting/src/WatcherStreamFileReader.cc File Reference

#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/StreamerInputFile.h"
#include "CalibCalorimetry/EcalLaserSorting/interface/WatcherStreamFileReader.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
#include <libgen.h>
#include <fstream>

Go to the source code of this file.

Functions

static std::string now ()

Function Documentation

static std::string now ( ) [static]

Definition at line 110 of file WatcherStreamFileReader.cc.

Referenced by WatcherStreamFileReader::closeFile(), and WatcherStreamFileReader::getInputFile().

                      {
  struct timeval t;
  gettimeofday(&t, 0);
 
  char buf[256];
  strftime(buf, sizeof(buf), "%F %R %S s", localtime(&t.tv_sec));
  buf[sizeof(buf)-1] = 0;

  stringstream buf2;
  buf2 << buf << " " << ((t.tv_usec+500)/1000)  << " ms";

  return buf2.str();
}