CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
StorageAccount.cc File Reference
#include "Utilities/StorageFactory/interface/StorageAccount.h"
#include <mutex>
#include <sstream>
#include <unistd.h>
#include <sys/time.h>

Go to the source code of this file.

Functions

static std::string d2str (double d)
 
static std::string i2str (int i)
 
static double timeRealNanoSecs (void)
 

Variables

static std::mutex s_mutex
 
StorageAccount::StorageStats s_stats
 

Function Documentation

static std::string d2str ( double  d)
static

Definition at line 29 of file StorageAccount.cc.

References ztail::d, and tree::t.

Referenced by StorageAccount::fillSummary().

29  {
30  std::ostringstream t;
31  t << d;
32  return t.str();
33 }
tuple t
Definition: tree.py:139
tuple d
Definition: ztail.py:151
static std::string i2str ( int  i)
static

Definition at line 23 of file StorageAccount.cc.

References i, and tree::t.

Referenced by StorageAccount::fillSummary().

23  {
24  std::ostringstream t;
25  t << i;
26  return t.str();
27 }
tuple t
Definition: tree.py:139
int i
Definition: DBlmapReader.cc:9
static double timeRealNanoSecs ( void  )
static

Definition at line 10 of file StorageAccount.cc.

References CLOCK_REALTIME.

Referenced by StorageAccount::Stamp::tick().

10  {
11 #if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)
12  struct timespec tm;
13  if (clock_gettime(CLOCK_REALTIME, &tm) == 0)
14  return tm.tv_sec * 1e9 + tm.tv_nsec;
15 #else
16  struct timeval tm;
17  if (gettimeofday(&tm, 0) == 0)
18  return tm.tv_sec * 1e9 + tm.tv_usec * 1e3;
19 #endif
20  return 0;
21 }
#define CLOCK_REALTIME
Definition: TimerService.h:32

Variable Documentation

std::mutex s_mutex
static