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 <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

◆ SIZE_MAX

#define SIZE_MAX   ((size_t) - 1)

Definition at line 30 of file WatcherStreamFileReader.cc.

◆ SSIZE_MAX

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

Definition at line 33 of file WatcherStreamFileReader.cc.

Function Documentation

◆ now()

static std::string now ( )
static

Definition at line 101 of file WatcherStreamFileReader.cc.

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

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

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