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
DumpTowerInfoContainer.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DumpTowerInfoContainer.cc
1
#include "
DumpTowerInfoContainer.h
"
2
3
#include <
phool/PHIODataNode.h
>
4
5
#include <calobase/TowerInfo.h>
6
#include <calobase/TowerInfoContainer.h>
7
8
#include <ostream>
9
#include <string>
10
11
using
MyNode_t
=
PHIODataNode<TowerInfoContainer>
;
12
13
DumpTowerInfoContainer::DumpTowerInfoContainer
(
const
std::string
&NodeName)
14
:
DumpObject
(NodeName)
15
{
16
return
;
17
}
18
19
int
DumpTowerInfoContainer::process_Node
(
PHNode
*myNode)
20
{
21
TowerInfoContainer
*towerinfocontainer =
nullptr
;
22
MyNode_t
*thisNode =
static_cast<
MyNode_t
*
>
(myNode);
23
if
(thisNode)
24
{
25
towerinfocontainer = thisNode->
getData
();
26
}
27
if
(towerinfocontainer)
28
{
29
unsigned
int
nchannels = towerinfocontainer->
size
();
30
*
fout
<<
"size: "
<< towerinfocontainer->
size
() << std::endl;
31
for
(
unsigned
int
channel
= 0;
channel
< nchannels;
channel
++)
32
{
33
TowerInfo
*rawtwr = towerinfocontainer->
get_tower_at_channel
(
channel
);
34
*
fout
<<
"time: "
<< rawtwr->
get_time
() << std::endl;
35
*
fout
<<
"energy: "
<< rawtwr->
get_energy
() << std::endl;
36
*
fout
<<
"time_float: "
<< rawtwr->
get_time_float
() << std::endl;
37
*
fout
<<
"chi2: "
<< rawtwr->
get_chi2
() << std::endl;
38
*
fout
<<
"pedestal: "
<< rawtwr->
get_pedestal
() << std::endl;
39
*
fout
<<
"isHot: "
<< rawtwr->
get_isHot
() << std::endl;
40
*
fout
<<
"isBadTime: "
<< rawtwr->
get_isBadTime
() << std::endl;
41
*
fout
<<
"isNotInstr: "
<< rawtwr->
get_isNotInstr
() << std::endl;
42
*
fout
<<
"isGood: "
<< rawtwr->
get_isGood
() << std::endl;
43
*
fout
<<
"status: "
<<
static_cast<
unsigned
int
>
(rawtwr->
get_status
()) << std::endl;
44
*
fout
<<
"nsample: "
<< rawtwr->
get_nsample
() << std::endl;
45
for
(
int
j
= 0;
j
< rawtwr->
get_nsample
();
j
++)
46
{
47
*
fout
<<
"waveform_value["
<<
j
<<
"]: "
<< rawtwr->
get_waveform_value
(
j
) << std::endl;
48
}
49
}
50
}
51
return
0;
52
}
coresoftware
blob
master
offline
packages
NodeDump
DumpTowerInfoContainer.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration