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
DumpTpcRawHitContainer.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DumpTpcRawHitContainer.cc
1
#include "
DumpTpcRawHitContainer.h
"
2
3
#include <
phool/PHIODataNode.h
>
4
5
#include <
ffarawobjects/TpcRawHit.h
>
6
#include <
ffarawobjects/TpcRawHitContainer.h
>
7
8
#include <ostream>
9
#include <string>
10
11
using
MyNode_t
=
PHIODataNode<TpcRawHitContainer>
;
12
13
DumpTpcRawHitContainer::DumpTpcRawHitContainer
(
const
std::string
&NodeName)
14
:
DumpObject
(NodeName)
15
{
16
return
;
17
}
18
19
int
DumpTpcRawHitContainer::process_Node
(
PHNode
*myNode)
20
{
21
TpcRawHitContainer
*tpcrawhitcontainer =
nullptr
;
22
MyNode_t
*thisNode =
static_cast<
MyNode_t
*
>
(myNode);
23
if
(thisNode)
24
{
25
tpcrawhitcontainer = thisNode->
getData
();
26
}
27
if
(tpcrawhitcontainer)
28
{
29
unsigned
int
nhits = tpcrawhitcontainer->
get_nhits
();
30
*
fout
<<
"size: "
<< tpcrawhitcontainer->
get_nhits
() << std::endl;
31
for
(
unsigned
int
ihit
= 0;
ihit
< nhits;
ihit
++)
32
{
33
TpcRawHit
*rawhit = tpcrawhitcontainer->
get_hit
(
ihit
);
34
*
fout
<<
"bco: "
<< rawhit->
get_bco
() << std::endl;
35
*
fout
<<
"gtm_bco: "
<< rawhit->
get_gtm_bco
() << std::endl;
36
*
fout
<<
"packetid: "
<< rawhit->
get_packetid
() << std::endl;
37
*
fout
<<
"fee: "
<< rawhit->
get_fee
() << std::endl;
38
*
fout
<<
"sampaaddress: "
<< rawhit->
get_sampaaddress
() << std::endl;
39
*
fout
<<
"sampachannel: "
<< rawhit->
get_sampachannel
() << std::endl;
40
auto
nsamples
= rawhit->
get_samples
();
41
*
fout
<<
"samples: "
<< rawhit->
get_samples
() << std::endl;
42
for
(
auto
isamp = 0; isamp <
nsamples
; isamp++)
43
{
44
*
fout
<<
"adc["
<< isamp <<
"] = "
<< rawhit->
get_adc
(isamp) << std::endl;
45
}
46
}
47
}
48
return
0;
49
}
coresoftware
blob
master
offline
packages
NodeDump
DumpTpcRawHitContainer.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration