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
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
blob
master
newbasic
mvtx_decoder
A_Event.cc
A_Event.h
all.h
BoolDefs.h
buffer.cc
buffer.h
BufferConstants.h
caen_correction.cc
caen_correction.h
Cframe.C
Cframe.h
CframeV1.C
CframeV1.h
changehitformat.cc
changeid.cc
Cpacket.C
Cpacket.h
CpacketV1.C
CpacketV1.h
dataBlock.C
dataBlock.h
dataBlockHdr.h
dataBlockPublic.h
date_filter_msg_buffer.cc
date_filter_msg_buffer.h
ddump.cc
decoding_routines.cc
decoding_routines.h
devicedefs.h
dlist.cc
dpipe.cc
dpipe_filter.h
errorBlock.C
errorBlock.h
Event.h
event_io.h
eventClient.cc
eventcombiner.cc
Eventiterator.h
eventLinkDef.h
eventReceiverClient.cc
eventReceiverClient.h
eventServer.cc
EventTypes.h
evt_mnemonic.cc
EvtConstants.h
EvtStructures.h
fakeFrame.C
fakeFrame.h
fileEventiterator.cc
fileEventiterator.h
filter_msg_buffer.cc
filter_msg_buffer.h
formatError.C
formatError.h
formatIO.C
formatIO.h
frameHdr.h
frameHdrV1.h
framePackets.C
framePackets.h
framePublic.h
frameRoutines.C
frameRoutines.h
frameSourceIds.h
frameV1Public.h
gen_utilities.h
generalDefinitions.h
gzbuffer.cc
gzbuffer.h
listEventiterator.cc
listEventiterator.h
lzobuffer.cc
lzobuffer.h
md5.cc
md5.h
mizar.h
msg_buffer.cc
msg_buffer.h
msg_control.cc
msg_control.h
msg_profile.h
msgLinkDef.h
msgqueue.C
oamlBuffer.cc
oamlBuffer.h
oBuffer.cc
oBuffer.h
odd_filter.cc
oEvent.cc
oEvent.h
ogzBuffer.cc
ogzBuffer.h
olzoBuffer.cc
olzoBuffer.h
oncs_mnemonic.cc
oncsBuffer.cc
oncsBuffer.h
oncsCollection.h
oncsdefs.h
oncsEvent.cc
oncsEvent.h
oncsEventiterator.cc
oncsEventiterator.h
oncsEvtConstants.h
oncsEvtStructures.h
oncsStructures.h
oncsSub_id2evt.cc
oncsSub_id2evt.h
oncsSub_id4evt.cc
oncsSub_id4evt.h
oncsSub_idbspetdata.cc
oncsSub_idbspetdata.h
oncsSub_idcaenv1742.cc
oncsSub_idcaenv1742.h
oncsSub_idcaenv792.cc
oncsSub_idcaenv792.h
oncsSub_idcstr.cc
oncsSub_idcstr.h
oncsSub_iddigitizerv1.cc
oncsSub_iddigitizerv1.h
oncsSub_iddreamv0.cc
oncsSub_iddreamv0.h
oncsSub_iddrs4v1.cc
oncsSub_iddrs4v1.h
oncsSub_idfnalmwpc.cc
oncsSub_idfnalmwpc.h
oncsSub_idfnalmwpcv2.cc
oncsSub_idfnalmwpcv2.h
oncsSub_idgl1v0.cc
oncsSub_idgl1v0.h
oncsSub_idinttv0.cc
oncsSub_idinttv0.h
oncsSub_idmvtxv0.cc
oncsSub_idmvtxv0.h
oncsSub_idmvtxv1.cc
oncsSub_idmvtxv1.h
oncsSub_idmvtxv2.cc
oncsSub_idmvtxv2.h
oncsSub_idmvtxv3.cc
oncsSub_idmvtxv3.h
oncsSub_idrcpetdata.cc
oncsSub_idrcpetdata.h
oncsSub_idsis3300.cc
oncsSub_idsis3300.h
oncsSub_idsis3300r.cc
oncsSub_idsis3300r.h
oncsSub_idsrs_v01.cc
oncsSub_idsrs_v01.h
oncsSub_idtpcfeev1.cc
oncsSub_idtpcfeev1.h
oncsSub_idtpcfeev2.cc
oncsSub_idtpcfeev2.h
oncsSub_idtpcfeev3.cc
oncsSub_idtpcfeev3.h
oncsSub_iduppetdata.cc
oncsSub_iduppetdata.h
oncsSub_iduppetdata_v104.cc
oncsSub_iduppetdata_v104.h
oncsSub_iduppetparams.cc
oncsSub_iduppetparams.h
oncsSubConstants.h
oncsSubevent.cc
oncsSubevent.h
ophBuffer.cc
ophBuffer.h
ospBuffer.cc
ospBuffer.h
ospEvent.cc
ospEvent.h
packet.h
packet_A.cc
packet_A.h
packet_cdevbpm.cc
packet_cdevbpm.h
packet_cdevbuckets.cc
packet_cdevbuckets.h
packet_cdevdvm.cc
packet_cdevdvm.h
packet_cdevir.cc
packet_cdevir.h
packet_cdevmadch.cc
packet_cdevmadch.h
packet_cdevpolarimeter.cc
packet_cdevpolarimeter.h
packet_cdevpoltarget.cc
packet_cdevpoltarget.h
packet_cdevring.cc
packet_cdevring.h
packet_cdevringnopol.cc
packet_cdevringnopol.h
packet_cdevwcm.cc
packet_cdevwcm.h
packet_collection.h
packet_fvtx_dcm0.cc
packet_fvtx_dcm0.h
packet_gl1.cc
packet_gl1.h
packet_gl1_evclocks.cc
packet_gl1_evclocks.h
packet_gl1p.cc
packet_gl1p.h
packet_gl1psum.cc
packet_gl1psum.h
packet_hbd_fpga.cc
packet_hbd_fpga.h
packet_hbd_fpgashort.cc
packet_hbd_fpgashort.h
packet_id2evt.cc
packet_id2evt.h
packet_id4evt.cc
packet_id4evt.h
packet_id4scaler.cc
packet_id4scaler.h
packet_idcstr.cc
packet_idcstr.h
packet_iddigitizerv2.cc
packet_iddigitizerv2.h
packet_iddigitizerv3.cc
packet_iddigitizerv3.h
packet_idll1v1.cc
packet_idll1v1.h
packet_mnemonic.cc
packet_starscaler.cc
packet_starscaler.h
packet_w124.cc
packet_w124.h
packetConstants.h
packetHdr.h
packetHdrV1.h
packetHeaders.h
packetPublic.h
packetRoutines.C
packetRoutines.h
packetV1Public.h
phenixOnline.h
phenixTypes.h
PHmd5Utils.cc
PHmd5Utils.h
PHmd5Value.cc
PHmd5Value.h
prdf2prdf.cc
prdfBuffer.cc
prdfBuffer.h
prdfcheck.cc
prdfsplit.cc
printmsg.h
rcdaqEventiterator.cc
rcdaqEventiterator.h
remote_msg_buffer.cc
remote_msg_buffer.h
simpleRandom.cc
simpleRandom.h
strnstr.cc
strnstr.h
strptime.cc
testEventiterator.cc
testEventiterator.h
pmonitor
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
packet_idcstr.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file packet_idcstr.cc
1
#include "
packet_idcstr.h
"
2
#include <stdio.h>
3
4
Packet_idcstr::Packet_idcstr
(
PACKET_ptr
data
)
5
:
Packet_w1
(data)
6
{
7
sarray
= 0;
8
}
9
10
Packet_idcstr::~Packet_idcstr
()
11
{
12
if
(
sarray
)
delete
[]
sarray
;
13
}
14
15
16
int
Packet_idcstr::iValue
(
const
int
i
)
17
{
18
19
int
n
;
20
if
( !
sarray
)
decode
( &n);
21
22
if
( i < 0 || i >=
allocated_length
)
23
{
24
return
0;
25
}
26
27
int
c
=
sarray
[
i
];
28
return
c
;
29
30
}
31
32
33
34
int
*
Packet_idcstr::decode
(
int
*nwout)
35
{
36
37
int
dlength
=
getDataLength
();
38
39
// std::cout << __FILE__ << " " << __LINE__ << " datalength: "
40
// << getDataLength() << " padding " << getPadding() << std::endl;
41
42
if
( dlength <=0) dlength =1;
// need at least an array of 1
43
44
unsigned
char
*SubeventData = (
unsigned
char
* )
findPacketDataStart
(
packet
);
45
sarray
=
new
unsigned
char
[dlength+1];
46
memcpy (
sarray
, SubeventData,dlength);
47
sarray
[
dlength
] = 0;
48
allocated_length
=
dlength
;
49
50
return
0;
51
52
}
53
54
void
Packet_idcstr::dump
(
OSTREAM
&
os
)
55
{
56
57
int
n
;
58
if
( !
sarray
)
decode
( &n);
59
60
os.write( (
const
char
*)
sarray
,
allocated_length
);
61
os <<
std::flush
;
62
63
}
64
online_distribution
blob
master
newbasic
packet_idcstr.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:28
using
1.8.2 with
sPHENIX GitHub integration