/
TimingServiceBase.h
58 lines (43 loc) · 1.4 KB
/
TimingServiceBase.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef FWCore_Utilities_TimingServiceBase_h
#define FWCore_Utilities_TimingServiceBase_h
// -*- C++ -*-
//
// Package: FWCore/Utilities
// Class : TimingServiceBase
//
/**\class TimingServiceBase TimingServiceBase.h "TimingServiceBase.h"
Description: Base class for Timing Services
Usage:
Provides an interface to allow
*/
//
// Original Author: Chris Jones
// Created: Wed, 11 Jun 2014 14:50:33 GMT
//
// system include files
// user include files
#include "FWCore/Utilities/interface/StreamID.h"
// forward declarations
namespace edm {
class TimingServiceBase
{
public:
TimingServiceBase();
virtual ~TimingServiceBase();
// ---------- member functions ---------------------------
///Extra CPU time used by a job but not seen by cmsRun
/// The value should be in seconds.
/// This function is safe to call from multiple threads
virtual void addToCPUTime(double iTime) = 0;
///CPU time used by this process and all its children.
/// The value returned should be in seconds.
virtual double getTotalCPU() const = 0;
static void jobStarted();
static double jobStartTime() { return s_jobStartTime; }
private:
TimingServiceBase(const TimingServiceBase&) =delete; // stop default
const TimingServiceBase& operator=(const TimingServiceBase&) =delete; // stop default
static double s_jobStartTime;
};
}
#endif