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
oncsSub_idsis3300r.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file oncsSub_idsis3300r.cc
1
#include "
oncsSub_idsis3300r.h
"
2
3
oncsSub_idsis3300r::oncsSub_idsis3300r
(
subevtdata_ptr
data
)
4
:
oncsSub_idsis3300
(data)
5
{
6
samples
= 0;
7
decoded
= 0;
8
9
}
10
11
int
*
oncsSub_idsis3300r::decode
(
int
*
p
)
12
{
13
if
(
decoded
)
14
{
15
p = 0;
16
return
0;
17
}
18
int
c
,
i
;
19
20
decoded
= 1;
21
22
int
*SubeventData = &
SubeventHdr
->
data
;
23
24
samples
= (*SubeventData) & 0xffff;
25
wraparound
= (*SubeventData) >> 16;
26
27
for
( c = 0; c < 4; c++)
28
{
29
30
for
( i = 0; i<
samples
; i++)
31
{
32
v
[c*2].push_back ( (SubeventData[ c* samples + i+1] >> 16) & 0x3fff );
33
v
[c*2+1].push_back ( SubeventData[ c* samples + i+1] & 0x3fff );
34
}
35
}
36
37
p = 0;
38
return
0;
39
}
40
41
int
oncsSub_idsis3300r::iValue
(
const
int
ch ,
const
int
s
)
42
{
43
if
(
decoded
== 0 )
decoded_data1
=
decode
(&
data1_length
);
44
45
if
( ch < 0 || ch >7 )
return
0;
46
if
( s < 0 || s >=
samples
)
return
0;
47
48
return
v
[ch][
s
];
49
50
}
51
online_distribution
blob
master
newbasic
oncsSub_idsis3300r.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:27
using
1.8.2 with
sPHENIX GitHub integration