Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Dumper.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Dumper.cc
1
#include "
Dumper.h
"
2
#include "
PHNodeDump.h
"
3
4
#include <
fun4all/SubsysReco.h
>
5
6
#include <
phool/PHCompositeNode.h
>
7
#include <
phool/PHNode.h
>
8
#include <
phool/PHNodeIterator.h
>
9
10
#include <vector>
11
12
Dumper::Dumper
(
const
std::string
&
name
)
13
:
SubsysReco
(name)
14
{
15
nodedump
=
new
PHNodeDump
();
16
return
;
17
}
18
19
Dumper::~Dumper
()
20
{
21
delete
nodedump
;
22
return
;
23
}
24
25
int
Dumper::process_event
(
PHCompositeNode
*topNode)
26
{
27
PHNodeIterator
iter(topNode);
28
nodedump
->
GetGlobalVars
(topNode);
29
PHCompositeNode
*dstNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"DST"
));
30
if
(dstNode)
31
{
32
iter.
cd
(
"DST"
);
33
iter.
forEach
(*
nodedump
);
34
iter.
cd
();
35
}
36
return
0;
37
}
38
39
int
Dumper::End
(
PHCompositeNode
*topNode)
40
{
41
PHNodeIterator
nodeiter(topNode);
42
std::vector<std::string> DumpNodeList;
43
DumpNodeList.emplace_back(
"RUN"
);
44
DumpNodeList.emplace_back(
"PAR"
);
45
nodedump
->
PrintEvtSeq
(0);
46
for
(
const
auto
&iter : DumpNodeList)
47
{
48
if
(nodeiter.
cd
(iter))
49
{
50
nodeiter.
forEach
(*
nodedump
);
51
nodeiter.
cd
();
52
}
53
}
54
nodedump
->
CloseOutputFiles
();
55
return
0;
56
}
57
58
void
Dumper::SetOutDir
(
const
std::string
&outdir)
59
{
60
nodedump
->
SetOutDir
(outdir);
61
return
;
62
}
63
64
void
Dumper::SetPrecision
(
const
int
digits)
65
{
66
nodedump
->
SetPrecision
(digits);
67
return
;
68
}
69
70
int
Dumper::AddIgnore
(
const
std::string
&
name
)
71
{
72
return
nodedump
->
AddIgnore
(name);
73
}
74
75
int
Dumper::Select
(
const
std::string
&
name
)
76
{
77
return
nodedump
->
Select
(name);
78
}
coresoftware
blob
master
offline
packages
NodeDump
Dumper.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration