Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
blob
master
calibrations
generators
offline
database
framework
ffamodules
ffaobjects
ffarawmodules
ffarawobjects
frog
fun4all
fun4allraw
fun4allutils
TimerStats.cc
TimerStats.h
phool
phoolraw
packages
QA
simulation
validation
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TimerStats.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TimerStats.cc
1
#include "
TimerStats.h
"
2
3
#include <
cdbobjects/CDBTTree.h
>
4
5
#include <
ffaobjects/EventHeader.h
>
6
7
#include <
fun4all/Fun4AllReturnCodes.h
>
8
#include <
fun4all/Fun4AllServer.h
>
9
#include <
fun4all/SubsysReco.h
>
// for SubsysReco
10
11
#include <
phool/PHCompositeNode.h
>
12
#include <
phool/PHIODataNode.h
>
// for PHIODataNode
13
#include <
phool/getClass.h
>
14
15
#include <map>
// for _Rb_tree_iterator
16
17
TimerStats::TimerStats
(
const
std::string
&
name
)
18
:
SubsysReco
(name)
19
{
20
}
21
22
int
TimerStats::InitRun
(
PHCompositeNode
*
/*topNode*/
)
23
{
24
delete
cdbttree
;
// make cppcheck happy, deleting a null ptr
25
cdbttree
=
new
CDBTTree
(
outfilename
);
26
return
Fun4AllReturnCodes::EVENT_OK
;
27
}
28
29
int
TimerStats::process_event
(
PHCompositeNode
*topNode)
30
{
31
iev
++;
32
Fun4AllServer
*se =
Fun4AllServer::instance
();
33
EventHeader
*evtheader = findNode::getClass<EventHeader>(topNode,
"EventHeader"
);
34
if
(evtheader)
35
{
36
iev
= evtheader->
get_EvtSequence
();
37
}
38
else
39
{
40
iev
++;
41
}
42
for
(
auto
iter = se->
timer_begin
(); iter != se->
timer_end
(); ++iter)
43
{
44
cdbttree
->
SetFloatValue
(
iev
, iter->first, iter->second.elapsed());
45
}
46
return
Fun4AllReturnCodes::EVENT_OK
;
47
}
48
49
int
TimerStats::End
(
PHCompositeNode
*
/*topNode*/
)
50
{
51
cdbttree
->
Commit
();
52
cdbttree
->
WriteCDBTTree
();
53
delete
cdbttree
;
54
return
Fun4AllReturnCodes::EVENT_OK
;
55
}
coresoftware
blob
master
offline
framework
fun4allutils
TimerStats.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:05
using
1.8.2 with
sPHENIX GitHub integration