CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 <cerrno>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <fstream>
#include <libgen.h>
#include <memory>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

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 100 of file WatcherStreamFileReader.cc.

References visDQMUpload::buf.

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

100  {
101  struct timeval t;
102  gettimeofday(&t, nullptr);
103 
104  char buf[256];
105  strftime(buf, sizeof(buf), "%F %R %S s", localtime(&t.tv_sec));
106  buf[sizeof(buf) - 1] = 0;
107 
108  stringstream buf2;
109  buf2 << buf << " " << ((t.tv_usec + 500) / 1000) << " ms";
110 
111  return buf2.str();
112 }