CMS 3D CMS Logo

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 <cstdlib>
#include <cstdio>
#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

◆ SIZE_MAX

#define SIZE_MAX   ((size_t)-1)

Definition at line 28 of file WatcherStreamFileReader.cc.

◆ SSIZE_MAX

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

Definition at line 31 of file WatcherStreamFileReader.cc.

Function Documentation

◆ now()

static std::string now ( )
static

Definition at line 99 of file WatcherStreamFileReader.cc.

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

References visDQMUpload::buf, and OrderedSet::t.

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

OrderedSet.t
t
Definition: OrderedSet.py:90
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154