CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
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.

Macros

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

Functions

static std::string now ()
 

Macro Definition 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().

110  {
111  struct timeval t;
112  gettimeofday(&t, 0);
113 
114  char buf[256];
115  strftime(buf, sizeof(buf), "%F %R %S s", localtime(&t.tv_sec));
116  buf[sizeof(buf)-1] = 0;
117 
118  stringstream buf2;
119  buf2 << buf << " " << ((t.tv_usec+500)/1000) << " ms";
120 
121  return buf2.str();
122 }