EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FairDbTimerManager.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FairDbTimerManager.cxx
1
2
#include "
FairDbTimer.h
"
3
#include "
FairDbTimerManager.h
"
4
5
ClassImp
(
FairDbTimerManager
)
6
7
8
FairDbTimerManager
FairDbTimerManager
::gTimerManager;
9
10
FairDbTimerManager
::
FairDbTimerManager
() :
11
fEnabled(kTRUE),
12
fSubWatchEnabled(kFALSE),
13
fTimers()
14
{
15
}
16
17
FairDbTimerManager::~FairDbTimerManager
()
18
{
19
while
( this->
GetCurrent
() ) { this->
Pop
(); }
20
21
}
22
23
FairDbTimer
*
FairDbTimerManager::GetCurrent
()
24
{
25
26
return
fTimers
.empty() ? 0 : *(
fTimers
.begin());
27
}
28
29
FairDbTimer
*
FairDbTimerManager::Pop
()
30
{
31
if
(
fTimers
.empty() ) {
return
0; }
32
33
FairDbTimer
* timer = this->
GetCurrent
();
34
delete
timer;
35
timer = 0;
36
fTimers
.pop_front();
37
timer = this->
GetCurrent
();
38
if
( timer ) { timer->
Resume
(); }
39
return
timer;
40
41
}
42
43
44
FairDbTimer
*
FairDbTimerManager::Push
()
45
{
46
47
FairDbTimer
* timer = this->
GetCurrent
();
48
if
( timer ) { timer->
Suspend
(); }
49
fTimers
.push_front(
new
FairDbTimer
);
50
return
this->
GetCurrent
();
51
52
}
53
54
void
FairDbTimerManager::RecBegin
(
string
tableName, UInt_t rowSize)
55
{
56
57
if
( !
fEnabled
) {
return
; }
58
FairDbTimer
* timer = this->
Push
();
59
timer->
RecBegin
(tableName, rowSize);
60
}
61
62
void
FairDbTimerManager::RecEnd
(UInt_t numRows)
63
{
64
65
if
( !
fEnabled
) {
return
; }
66
67
68
FairDbTimer
* timer = this->
GetCurrent
();
69
if
( timer ) { timer->
RecEnd
(numRows); }
70
timer = this->
Pop
();
71
72
}
73
74
void
FairDbTimerManager::RecFillAgg
(Int_t aggno)
75
{
76
if
( !
fEnabled
) {
return
; }
77
78
79
}
80
81
82
void
FairDbTimerManager::RecMainQuery
()
83
{
84
85
if
( !
fEnabled
) {
return
; }
86
FairDbTimer
* timer = this->
GetCurrent
();
87
if
( timer ) { timer->
RecMainQuery
(); }
88
89
}
90
91
92
void
FairDbTimerManager::StartSubWatch
(UInt_t subWatch)
93
{
94
95
if
( !
fEnabled
) {
return
; }
96
FairDbTimer
* timer = this->
GetCurrent
();
97
if
( timer ) { timer->
StartSubWatch
(subWatch); }
98
99
}
100
101
EicRoot
blob
master
dbase
dbInterface
FairDbTimerManager.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration