BOSS
7.0.9
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Clock.h
Go to the documentation of this file.
1
// $Id: Clock.h,v 1.1.1.1 2005/10/17 06:11:40 maqm Exp $
2
//
3
// Original Author: Sawyer Gillespie
4
// hgillesp@u.washington.edu
5
//
6
7
#ifndef _H_CLOCK
8
#define _H_CLOCK 1
9
10
#if _MSC_VER >= 1000
11
#pragma once
12
#endif
// _MSC_VER >= 1000
13
14
// includes
15
#include <cmath>
16
17
// forward declarations
18
typedef
double
ClockWord
;
19
20
// class Clock
21
// This is a general class for representing a clock value in terms
22
// of some integral number of counts (ie. CPU cycles).
23
//
24
class
Clock
25
{
26
public
:
27
Clock
()
28
: m_time(0), m_freq(2.E7)
29
{}
30
31
virtual
ClockWord
count
(
double
t
)
32
{
33
m_time +=
t
;
34
return
m_time;
35
}
36
37
virtual
ClockWord
count
(
unsigned
int
c)
38
{
39
m_time += c * 1./m_freq;
40
return
m_time;
41
}
42
43
virtual
void
reset
()
44
{
45
m_time = 0;
46
}
47
48
double
freq
()
const
49
{
50
return
m_freq;
51
}
52
53
virtual
unsigned
int
cycles
()
54
{
55
return
static_cast<
unsigned
>
(ceil(m_time / m_freq));
56
}
57
58
virtual
double
elapsed
()
59
{
60
return
m_time;
61
}
62
63
private
:
64
ClockWord
m_time;
// current elapsed time in clock cycles
65
double
m_freq;
// frequency in Hz
66
};
67
68
#endif
ClockWord
double ClockWord
Definition:
Clock.h:18
t
TTree * t
Definition:
binning.cxx:23
Clock
Definition:
Clock.h:25
Clock::elapsed
virtual double elapsed()
Definition:
Clock.h:58
Clock::cycles
virtual unsigned int cycles()
Definition:
Clock.h:53
Clock::count
virtual ClockWord count(unsigned int c)
Definition:
Clock.h:37
Clock::reset
virtual void reset()
Definition:
Clock.h:43
Clock::count
virtual ClockWord count(double t)
Definition:
Clock.h:31
Clock::Clock
Clock()
Definition:
Clock.h:27
Clock::freq
double freq() const
Definition:
Clock.h:48
source
Calibration
facilities
facilities-00-00-04
facilities
Clock.h
Generated by
1.9.6