CMS 3D CMS Logo

Defines | Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/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.

Defines

#define SIZE_MAX   ((size_t) -1)
#define SSIZE_MAX   ((ssize_t) (SIZE_MAX / 2))

Functions

static std::string now ()

Define Documentation

#define SIZE_MAX   ((size_t) -1)

Definition at line 29 of file WatcherStreamFileReader.cc.

#define SSIZE_MAX   ((ssize_t) (SIZE_MAX / 2))

Definition at line 32 of file WatcherStreamFileReader.cc.


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();
}